$29
Using C++ ,designan AbstractDataType class namedMyGrades. The class must have the following private members:
Vectors to hold grades for Programming Assignments and Midterm Exams .
Programming Assignments will count as 20 % , Exam 1 will count as20
% , and Exam 2 will count as 25%..
In Addition , the class should have the following seven member functions:
Set Programming AssignmentGrades
Set testgrades
Show all programming assignment grades and calculating theaverage.
Show all testgrades
Show overallgrades
Delete A Programming AssignmentGrade
Delete A TestGrade
Notes :
Must define a class and its functions, followed by implementation of class functions, and finally followed by main program to run the program. All in one.cpp.
Programming assignments and test grades must be defined as double. Characters and other form must berejected.
Selection must be 1 – 9 and 9 . Otherwise it isrejected.
Program must continue until the user enters 9 to exit theprogram.
Output values must include 2 numeric values after the decimalpoint.
Validations :
Only integers are allowedas.
Programmingassignmentgrades are between 0 and10
Test grades arebetween0 and 25
Style Guidelines:
At the beginning of your program ( andbeforethe #include statement ), include the following :
Header comments(file documentation block) should be at the top of each file and shouldcontain: Author / s, Due Date, Assignment Number, Course number and section, Instructor, and a brief description of the purpose of the code in the file. For example:
// Author / s : (Your name / s and serial number / s here!!)-
// Due Date:
// Programming Assignment Number2
// Spring 2018 - CS 3358 - SectionNumber
//
// Instructor: HusainGholoom.
//
// <Brief description of the purpose of theprogram
Variable names :
Must be meaningful.
The initial letter should be lowercase, following words should be capitalized, noother caps or punctuation(i.e. weightInPounds ).
Each variable must be declared on a separate line with a descriptivecomment.
Named constants :
Use for most numericliterals.
All capitals with underscores(i.e. TX_STATE_SALES_TAX )
Should occur at top of function, or global (only ifnecessary)
Line lengthof source code should be no longer than 80 characters (no wrapping of lines).
Indentation :
Use 2-4 spaces (but be consistent throughout yourprogram).
Indent blocks, within blocks,etc.
Use blank lines to separatesections.
Comments for variables :
All variable definitions should be commented as follows:
int gender; // integer value for thegender,
// 1 = Male , 2 = Female ,
Rules:
Your programmust compileand run. The program will be tested using the latest version of Codeblocks forwindows.
Your program must be properlydocumented according the style above .See the website for the sample programming styleprogram.
You can userepetitions , control structures , try .. catch , andswitchstatements.You arenot allowedto use regular arrays nor global variables. You are allowed Only 1 dimensional vectorarrays.
You must use the appropriate libraries in writing thisprogram.
Must properly format the output by use the appropriate library. See the outputbelow
. Also ,Replace my first / last name with your own first / last name.
You must use the following file names:
3358_0_LastName_FirstName_PG2.cpp ( Section 0)
3358_1_LastName_FirstName_PG2.cpp ( Section 1)
3358_2_LastName_FirstName_PG2.cpp ( Section 2)
Where LastName is your Last Name and FirstName is your First Name. For example , the file name should look something like :
3358_0_Gholoom_Husain_PG2.cpp (not .cbp)
You must upload your programs no later than the starting of class time on the duedate.
No late assignments will be accepted.Use TRACS to upload your program
You mustalsoturn in hard copy of your source code no later than the due date /time
. Should the hard copy consist of more than one page , then , the hard copy must bestapled. if you are unable to turn in a printout during class, you can take the program to the computer science department and hand it to the front desk personal (Comal211
) before the deadline. Make sure that the front office stamps the program. Make sure that include the date and time. Finally ,make sure that they place the program in my mailbox.
DO NOTslide your program under my office door – It willNOTbe accepted
The following points will be deducted if :
Compilation Errors,Incorrect file format such asuploading.cbp insteadof
.cpp , missing electronic copy , missing the hardcopy , using.h and .cpp files ( - 10 points)
LogicalErrors ( at least - .75 point)
Other( atleast.5 points) ifanyof the following takes a place:
Unable to read the source code due to unclearprinting
Not using class definition , missing vector arrays or switch statements .. etc.
Incorrect Outputformat.
Incorrect program file name.
Hard copy is not stapled.
Incorrect Stylesuch as but not limited toMissing Headers , Footers , Comments or Program Documentations , Missing roster number , missing section number …etc.
Sample Run
Welcome to My Grades APP.
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- D
Error *** Incorrect input - You entered a character Enter a Positive Integer
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 8
Error*** You entered invalid choice
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- X
Error *** Incorrect input - You entered a character Enter a Positive Integer
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 9
Implemented by Husain Gholoom February – 2018
Sample Run
Welcome to My Grades APP.
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 1
Enter A ProgrammingAssignmentgrade: 10
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 1
Enter A ProgrammingAssignmentgrade: x
Error*** You entered a character
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 1
Enter A ProgrammingAssignmentgrade: 7
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 5
ShowOverallAll Grades.
My Overall Grades so far areasfollows :
Programming Assignment Grades are AsFollows 10.00 7.00
AverageProgrammingAssignments Gradesis 17.00 Out of20
No Test Grades are recorded
OverallTotal -- 17.00 out of 20
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 2
Enter ATestgrade: 15
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 4
Show All Test Grades with Average. Test Grades are As Follows
15.00
AverageTests Gradesis 15.00 Out of20
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 5
ShowOverallAll Grades.
My Overall Grades so far areasfollows :
Programming Assignment Grades are As Follows 10.00 7.00
AverageProgrammingAssignments Gradesis 17.00 Out of20
Test Grades are As Follows 15.00
AverageTests Gradesis 15.00 Out of20
OverallTotal -- 32.00 out of40
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 2
Enter ATestgrade: x
Error*** You entered a character
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 2
Enter ATestgrade: 22
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 5
ShowOverallAll Grades.
My Overall Grades so far areasfollows :
Programming Assignment Grades are AsFollows 10.00 7.00
AverageProgrammingAssignments Gradesis 17.00 Out of20
Test Grades are AsFollows 15.00 22.00
AverageTest Gradesis 37.00 Outof 45OverallTotal -- 54.00 out of65
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 6
Enter A Program Grade tobeDeleted: 5
Programming Grade Does Not Exist
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 7
Enter A Test Grade tobe Deleted: 2
Test Grade Does Not Exist
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 5
ShowOverallAll Grades.
My Overall Grades so far areasfollows :
Programming Assignment Grades are AsFollows 10.00 7.00
AverageProgrammingAssignments Gradesis 17.00Outof 20
Test Grades are AsFollows 15.00 22.00
AverageTest Gradesis 37.00 Outof 45
OverallTotal -- 54.00 out of65
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 6
Enter A Program Grade tobeDeleted: 7
7 isDeleted
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 7
Enter A Test Grade tobeDeleted: 22
22 isDeleted
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 5
ShowOverallAll Grades.
My Overall Grades so far areasfollows :
Programming Assignment Grades are As Follows 10.00
AverageProgrammingAssignments Gradesis 20.00 Out of20
Test Grades are As Follows 15.00
AverageTests Gradesis 15.00 Out of20
OverallTotal -- 35.00 out of 40 OverallTotal -- 35.00 out of40
Set A Programming AssignmentGrade
SetATest Grade
Show All Programming AssignmentGrades
Show All TestGrades
ShowOverall Grades
DeleteA Programming AssignmentGrades
DeleteATest Grade
9. Exit The Program
Enteryourchoice --- 9
Implemented by Husain Gholoom February - 2018