solution being prepared
1. (TCO 2) Given the following program description,
- identify the required classes/objects necessary to achieve the program requirements;
- briefly describe any relationships that might exist between your classes; and
- briefly describe the overall hierarchy of your proposed classes.
Program Description - You have been asked to create a program designed to keep track of students enrolled at a certain college. The program must keep track of all students and the department they belong to. A single department can contain any number of students and every student should have a unique id to differentiate them from all the other students.
Yacht is a class that is derived from the Boat class. The Boat class has two data members that represent weight and color. The Yacht class has a data member that represents the size of the yacht. Each of the two classes have a member function named printData(). Write the class descriptions for each of the two classes with the appropriate constructors destructors and access specifiers using appropriate naming conventions and data types. Do not write the function implementation.
3. Define and implement the overloaded constructors that support the following test function for a Time class. The data members for the Time class are hour, minute, and second. All are integer data types.
public static void main(String args)
//t1 will take default value
Time t1 = Time();
//t2 will take supplied values
Time t2 = Time(8, 26, 58);
//t3 will take supplied hour. minute & second will take default values
Time t3 = Time(9);
//t4 will take supplied hour and minute. second will take default value
Time t4 = Time(11, 50);
//t5 will take the same value as t2
Time t5 = t2;
//the rest of the code
} (Points : 18)
Paper#68710 | Written in 17-Dec-2015Price : $50