Create a class named StudentGrade. Include fields for a student ID number, student name (use the Person class from Exercise), numeric test score, possible points, and letter grade. Create a constructor that requires the student ID, name, and test score, and allows a fourth parameter that holds possible test points. If a value for possible points is not passed to the constructor, the possible points value defaults to 100. (If a 0 value is passed for possible points, force possible points to 1 so that you do not divide by 0 when calculating a grade.) The constructor calculates the student’s percentage (divides score by possible points) and assigns a letter grade based on: 90% and above (A), 80% (B), 70% (C), and 60% (D). Create a main()function that instantiates and displays enough StudentGrade objects to test a variety of scores and possible point values. Save the file as StudentGrade.cpp.
Exercise
Create a Person class that includes fields for last name, first name, and zip code. Include a default constructor that initializes last name, first name, and zip code to “X” if no arguments are supplied. Also include a display function. Write a main()function that instantiates and displays two Person objects: one that uses the default values, and one for which you supply your own values. Save the file as Person.cpp. You will use the Person class in other exercises.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.