Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Q1, you have to write the function definitions that is, the implementation of the functions listed in the class. So totally you have to
In Q1, you have to write the function definitions that is, the implementation of the functions listed in the class. So totally you have to write 5 functions: 3 constructors (2 regular, 1 copy), 1 destructor, and 1 classesAtIndex . No need to write main function, to create the object of the class.
classes is a dynamic array which has the students as indexes and the number of classes the students take, as values. For example, if classes was a 100 int array, you have a record of 100 students, where classes[0] will be the number of classes the first student has taken, classes[77] will be the number of classes the 78th student has taken, etc.
classesAtIndex should return the number of classes the (index)th student has taken.
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