Implement the classes Student and CollegeStudent—described —as abstract classes. CollegeStudent should extend Student. Then define UndergradStudent and GradStudent by extending CollegeStudent. The...



Implement the classes Student and CollegeStudent—described —as abstract classes. CollegeStudent should extend Student. Then define UndergradStudent and GradStudent by extending CollegeStudent. The classes UndergradStudent and GradStudent should each ensure that the degree field of CollegeStudent is set to a legal value. For example, you could restrict an undergraduate student to B.A. and B.S. degree programs and a graduate student to M.S. and Ph.D. programs. Consider using an enumeration for this aspect. Write a client that demonstrates your classes.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here