Question
abstract class write an abstract Strudent class described by a name, id, major, and whether or not the student has graduated. (1). include (include static
abstract class
write an abstract Strudent class described by a name, id, major, and whether or not the student has graduated. (1). include (include static variables or methods in your parent/child classes, use enum including fields, a constructor, and methods and enum that uses an enum, including the values). Add a variable to keep track of the number of Student objects created. For the compareTo method, order Student object by name, then id. Represent the major as an enum with at least one field and method(you can keep the list of possible majors very short!). Write one additional implemented method in the Student class. Example register()-registration procedures might be the same for all students so it is implemented in Student. Write one abstract method in the Student Class (Example tuition()-bachelor student pay full tuition, masters students pay partial and work as TAS, doc students don't pay tutition by work in research as TAs. write concrete child classes BachArtsStudent, BachSciStudent, MastersStudent, and DocStudent (bachelor students are additionally described by their gpa. Graduate students are additionally described by a thesis or dissertation topic. Override the abstract method from Student in these classes. Add at least one child-specific method to one of these classes. Write a driver program to create several different kinds of students and store them in a list.(iterate the list and invoke the two methods defined in Student on each object. iterate the list and invoke the child-specific method only on objects of the appropriate type. sort the list, then sort the list using the comparator. perhaps by major then id).
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