Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

URGENT!!! PLEASE ANSWER ASAP!! URGENT!!! PLEASE ANSWER ASAP!! #include #include #include class ExamTime{ public: ExamTime (short y, short m, short d, short h, short min,

URGENT!!! PLEASE ANSWER ASAP!!

image text in transcribed

image text in transcribed

URGENT!!! PLEASE ANSWER ASAP!!

#include #include #include class ExamTime{ public: ExamTime (short y, short m, short d, short h, short min, double du) { this.year = y; this.month = m; this day=d; this.hour = h; this.minute = min; this. duration = du; } private: short year; short month; short day; short hour; short minute; double duration; }; class Course{ public: Course(); Course(const char*, const char*, const char*, short, short, short); Course (const Course &); Course(const Course &); //return an exam time object reference on a particular date and time and duration; private: char* subject; // such as COEN, ECE, SOEN, MATH, etc char* career; // values are only {undergraduate, graduate, continuing education, // professional development, research char* department; short level; // values are {200, 300, 400, 600} short number; // such as 244, 243, 352,... const short capacity; // assume capacity is 75 }; 01. Are there any errors in the code above? If yes, please fix the error. Q2. Please write the code of the copy constructor with member initialization list. (The references of the following library funct ons are provided. You can assume they are already included size_t strlen ( const char * str); char * strcpy ( char * destination, const char * source ); ) Q3. Please write the code of the destructor of class Course according to the two constructors defined the above class Course. Q4. Please write the code for the friend function in the class Course. 05. Can the constructor of ExamTime be optimized in term of program performance? If the answer is yes, please write the solution. If the answer is no, please provide the explanation. 26. A test function of the class Course is presented below. Please complete the code to create an object of course, and then print out the object's subject and number

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

Step: 3

blur-text-image

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

In how many ways can the top 2 horses nish in a 10-horse race?

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago