Question: Only need part C. 5. Constructors and Destructors (10.0%) Place your answers to the questions below in the same file as your answers to problem

Only need part C.

Only need part C. 5. Constructors and Destructors (10.0%) Place your answersto the questions below in the same file as your answers to

problem 1 and 2 (i.e. hw1.txt). Suppose you were given the following

5. Constructors and Destructors (10.0%) Place your answers to the questions below in the same file as your answers to problem 1 and 2 (i.e. hw1.txt). Suppose you were given the following class to model your academic record including your major and overall GPA which uses the Rational class you wrote previously. #ifndef RECORD_H #define RECORD_H #include "rational.h" class Record public: Record(const Rational& major, const Rational& overall); -Record(); const Rational& majorGPAC const; const Rational& overallGPA const; private: Rational major_; Rational overall_; #endif Further assume that print statements are added to the constructors and destructor of the Rational class as follows: Rational in the default and initializing constructor(s) . --Rational in the destructor Copy Rational in the copy constructor Nothing is printed in the assignment operator(s) Part (a) If the Record constructor is as shown below, what will be printed when a new Record object is constructed? Record: : Record(const Rational& major, const Rational& overall) cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!