Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Student Report Card with Logging You are to design and implement a Student class, a Grade class, as well as a Logger class implemented as
Student Report Card with Logging
You are to design and implement a Student class, a Grade class, as well as a Logger class implemented as a Singleton in C++. Then you will write some client tests in main() to demonstrate the output.
Student Class
- You need to implement the big three: Destructor, Copy Constructor, and operator=.
- Your class needs to provide the following data members:
- id, int, needs to be unique
- name, string
- grades, vector
- Your class needs to provide the following member functions:
- int calculateFinal(), returns a value from 0-100
- string calculateLetterGrade(), returns a string representation of a letter grade (A+, B-, etc).
- string printReport(), returns a string report
- Standard Accessors and Mutators, and any private helper functions
- Each class must use the same instance of your logger, in each method, to print to the command line what the return value of the method will be.
Grade Class
- This class needs to provide the following data members:
- pointsEarned, int
- totalPoints, int
- weight, double
- assignment, string
Logger Class
- You need to make this a proper singleton.
- Your class needs to provide the following member function:
- void log(string output), prints the contents to cout.
main()
- You need to devise a set of tests in main() to exercise both the Student class and your Logger singleton. A minimum amount of rigor in testing the code inside of the Student Class should be present.
- The same logger should log inside of each Student class, as well as the tests.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started