gpa calculator with c++

18
BTEC HND in Electrical/Electronic & Mechanical Engineering Unit / Module Unit 34: Programming Concepts Assessment Assignment 1 – Developing a Structured Program in C++ to Compute the GPA (Grade Point Average) Lecturer Dr. D. P. Chandima Student Name ID Date Handed Over 25/03/2010 Date Due 07/05/20 10 Initial Submission Date Re-Submission Date Student to Tick if Grading Opportuni ty Criteria Met? Assessor Feedback Initi ally On Resubmissio n P2 P3 P4 M2 M3 D1 D3 Programming Concept – Assignment 1 International College of Business and Technology

Upload: ushan-senevirathne

Post on 26-Aug-2014

188 views

Category:

Documents


1 download

DESCRIPTION

BTEC HND in Electrical/Electronic & Mechanical EngineeringUnit / Module Assessment Lecturer Student Name Date Handed Over Initial Submission Date Student to Tick if Attempted Criteria Met? Grading Opportunity Assessor Feedback 25/03/2010 Date Due Re-Submission Date Unit 34: Programming Concepts Assignment 1 – Developing a Structured Program in C++ to Compute the GPA (Grade Point Average) Dr. D. P. Chandima ID 07/05/2010InitiallyOn ResubmissionP2 P3 P4 M2 M3 D1 D3 Assessed By(Name): Signat

TRANSCRIPT

BTEC HND in Electrical/Electronic & Mechanical EngineeringUnit / Module Assessment Lecturer Student Name Date Handed Over Initial Submission Date Student to Tick if Attempted Criteria Met? Grading Opportunity Assessor Feedback 25/03/2010 Date Due Re-Submission Date Unit 34: Programming Concepts Assignment 1 Developing a Structured Program in C++ to Compute the GPA (Grade Point Average) Dr. D. P. Chandima ID 07/05/2010

Initially

On Resubmission

P2 P3 P4 M2 M3 D1 D3 Assessed By(Name): Signature: Student Signature & Comments: Date:

Important Information for StudentsProgramming Concept Assignment 1 International College of Business and Technology

BTEC HND in Electrical/Electronic & Mechanical Engineering

The criteria each task relates to are shown against that task where possible. Please note that plagiarism is treated as a serious offence and therefore the work you produce must be individual and original although may work in groups in some instances (Please refer to Student Handbook on Plagiarism & Cheating). All sources of information must be referenced using Harvard referencing where a reference list/Bibliography should be included at the end of the assignment. Please note that the submission date given for this assignment is the final date that you can hand over the assignment. A one week grace period maybe extended with prior approval from the Program Manager Undergraduate. However, note that submissions handed in one week late will be graded lower (Please refer to the Student Handbook on Assessments - Late Submissions & Penalties). Assignments returned to students for re-working must be re-submitted within 10 days (Please refer to Student Handbook on Assignments Re-submission). Failure to re-submit the previously marked assignment with the re-submitted assignment will mean that results cannot be released for the respective unit. Please read, follow and reference both the contents of the unit outline and the grading criteria of the assignment before completing this assignment.

Plagiarism: While research and discussion are an essential part of an assignment, the deliberate copying of someone elses work or unacknowledged copying from printed or electronic sources is NOT permitted. You may be subject to disciplinary procedure if you do this. You should sign this sheet to show that you comply with these regulations. Students Signature: .. Students Comments: .... Date: .

Programming Concept Assignment 1

International College of Business and Technology

BTEC HND in Electrical/Electronic & Mechanical EngineeringAssessment has been internally verified for use.

Internal Verifier Name: Signature : Date Verified :

Grading Classification Pass Grade: Pass Grade is achieved by meeting all following Grade Descriptors Grade Code: P1.1 P1.2 Grade Descriptors identify and select appropriate predefined data types. use simple input/output and appropriate operators with the above identify and use appropriate selection structures and loop structures for the given task produce C++ programs to desired standards Examples / Indicative Characteristics int, double, float etc as appropriate cout and cin with appropriate operators If-else, for, while, do-while as appropriate

P1.3

P1.4

Source code and final executable code

Assignment 1 - Developing a Structured Program in C++ to Compute the GPA (Grade Point Average) Learning outcome to be achieved: Design and develop codes using structured programming methods.Programming Concept Assignment 1 International College of Business and Technology

BTEC HND in Electrical/Electronic & Mechanical EngineeringScenario: Ten (10) students sit for an examination. Each student offers ten (10) subjects. Each subject is a 2 credits subject. If the raw marks of these subjects for each student are made available to you. You are required to develop a structured computer program to achieve the following: Obtain the name and the registration number of each student from the user using the standard input device. Obtain the marks for the subjects for each student from the user using the standard input device. Note: Valid range of marks is 0 - 100. The marks of each subject should be converted to the appropriate grade (Grading of marks is given in Table 1 below). Compute the GPA for each student (Formula for calculating GPA is given below). Find out the highest GPA. Print the following information on the standard output device. o Name and registration number of each student. o Grade of each subject and the GPA of each student against the students name on separate Marks Range 85 100 75 84 70 74 65 69 60 64 55 59 50 54 45 49 40 44 35 39 0 34 lines.Programming Concept Assignment 1 International College of Business and Technology

Grade A+ A AB+ B BC+ C CD F

Grade Point 4.2 4.0 3.7 3.3 3.0 2.7 2.3 2.0 2.0 2.0 0.0

BTEC HND in Electrical/Electronic & Mechanical Engineeringo Name of the student who has obtained the highest GPA and the highest GPA on a separate line. Table 1: Grading of marks Formula for calculating the GPA:

GPA=

( Grade Points obtained for the i i =1 n i =1

n

th

subject ) ( Credits offered to the ith subject ) th

Credits offered to the i

subject

where n is the number of subjects offered by a student.

Things to be submitted The final submission should include the following: Hardcopy report containing program design and source code. Compiled executable program in a floppy disk.

ReferencesHenkmans D C++ Programming for the Absolute Beginner (Premier Press, 2003) ISBN 1931841438

Liberty J and Jones B Sams Teach Yourself C++ in 21 Days (Pearson Education, 2005) ISBN 8129708485 Grade code P1.1 P1.2 P1.3 P1.4 P2.1 P2.2Programming Concept Assignment 1

Assignment 1

Assignment 2

Final examination

International College of Business and Technology

BTEC HND in Electrical/Electronic & Mechanical EngineeringP2.3 P3.1 P3.2 P4.1 P4.2 P4.3 P4.4

Assignment 2: Modular Programming Flow Chart Set default values for the rectangle

Calculating the area of that

Calculating the perimeter of that

Programming Concept Assignment 1

International College of Business and Technology

BTEC HND in Electrical/Electronic & Mechanical EngineeringAllow user to change the values of rectangle

Error checking whether user enters a wrong selection for the choice

Closing the program

The source code

#include using namespace std;

#include using namespace std;Programming Concept Assignment 1 International College of Business and Technology

BTEC HND in Electrical/Electronic & Mechanical Engineeringclass CRectangle { int width, height; public: CRectangle (int,int); int area () {return (width*height);} int Perimeter () {return (width+height)*2;}

};

CRectangle::CRectangle (int a, int b) { width = a; height = b; }

int choice; int main () {

loop1:

cout