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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here