Problem

Create a class named StudentGrade. Include fields for a student ID number, student name (u...

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.

Step-by-Step Solution

Request Professional Solution

Request Solution!

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.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT