Question
Arrays and Objects a) Create a class Student that has a constructor that prints Hello, I am a student. b) In the class Student put
Arrays and Objects
a) Create a class Student that has a constructor that prints Hello, I am a student.
b) In the class Student put a destructor that prints Good bye, Student out.
c) Create a class Course that has an array of 10 Students and initialize it
d) Create a class University that has an array of 10 Courses and initialize it
e) Create, in a main() function, one and only one object University.
f) There is NOT inheritance here. Not at all. g) Add constructors and destructors as needed in the classes Student and University .
h) The program should print 200 messages on the screen the constructor and the destructor messages for each of the 10 students for each of the 10 courses. Remember that constructors and destructors are called automatically
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