Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

Understand how emergent change occurs.

Answered: 1 week ago

Question

What is the purpose of forming an advisory board?

Answered: 1 week ago