Академический Документы
Профессиональный Документы
Культура Документы
Unit / 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
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: .
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
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
Grade Point 4.2 4.0 3.7 3.3 3.0 2.7 2.3 2.0 2.0 2.0 0.0
GPA=
th
subject
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.
References
Henkmans 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.2
Programming Concept Assignment 1
Assignment 1
Assignment 2
Final examination
Assignment 2: Modular Programming Flow Chart Set default values for the rectangle
Error checking whether user enters a wrong selection for the choice
};
loop1:
cout << "\n\t*** Menu *** " <<"\n"; cout << "\n(1) Draw Rectangle " ;
Programming Concept Assignment 1 International College of Business and Technology
cout << "\n"; for( i = 1; i <= height; i++ ) { for ( j = 1; j <= width; j++ ) {cout << "*";} cout << endl; } cout << "\n";
goto loop1;
}
Programming Concept Assignment 1 International College of Business and Technology
else if (choice == 2){ int width=13,height=4; CRectangle rectb(width,height); cout << "\nArea of Rectangel is: " << rectb.area() << endl; goto loop1; } else if (choice == 3) { int width=13,height=4; CRectangle rectb(width,height); cout << "\nPerimeter of Rectangel is: " << rectb.Perimeter() << endl; goto loop1; } else if (choice == 4) {
goto loop2;
} else if (choice == 5){ exit(1); } else if (choice != 1 || choice !=2 || choice != 3 || choice != 4 || choice != 5) {
cout << "\n***THE NUMBER YOU ENTERED IS NOT VALIED***" << "\n\t" << "Enter a valied selection to proceed:"<<"\n"; }
loop3: cout << "\n\t\t*** Menu *** " <<"\n"; cout << "\n(1) Draw Rectangle " ; cout << "\n(2) Area " ; cout << "\n(3) Perimeter " ; cout << "\n(4) Resize " ; cout << "\n(5) Quit " << "\n" ; cout << "\n\tEnter a Choice = "; cin >> choice;
if (choice == 1) {
goto loop3;
CRectangle rectb(width,height); cout << "\nArea of Rectangel: " << rectb.area() << endl; goto loop3;
Programming Concept Assignment 1 International College of Business and Technology
cout << "\n"; for( i = 1; i <= width; i++ ) { for ( j = 1; j <= height; j++ ) {cout << "*";} cout << endl; } cout << "\n";
Programming Concept Assignment 1 International College of Business and Technology
} else if (choice == 5){ exit(1); } else if (choice != 1 || choice !=2 || choice != 3 || choice != 4 || choice != 5) { cout << "\nThe number you entered is not in given menu" << "\n" << "please select correct value again." << "\n"; } goto loop3;
system("pause"); return 0; }