Question: Please add a driver that tests the classes. Java degrees Main (args: String[]); void Degree (Abstract Class*) #degree: String #description: String #genEdHours: int #elective Hours:

Please add a driver that tests the classes. Java
degrees Main (args: String[]); void Degree (Abstract Class*) #degree: String #description: String #genEdHours: int #elective Hours: int + getDegree(): String + getDescription() : String + getGenEdHours(): int +getElective Hours(): int + setDescription(String description): void (only required mutator) + toString(): String + addGenEdHours(int hours) : void + addElectiveHours(int hours) : void + calcTotalHours()* : int AS AAS foreignLanguageHours: int AAhours: int AShours : int focusArea: String focusHours: int AASCoreHours: int track: String trackHours: int + getforeign LangHours(): int + getAAhours(): int + addFLhours(int hours) : void + addAAhours(int hours) : void + toString(): String + calcTotalHours(): int + getShours(): int + getFocusArea(): String + getFocusHours(): int + setFocusArea(String focus): void + addAShours(int hours) : void + addFocusHours(int hours) : void + toString(): String + calcTotalHours(): int + getCoreHours(): int + getTrack(): String + getTrackHours(): int + setTrack(String track) : void + addCore Hours(int hours) : void + addTrackHours(int hours) : void + toString(): String + calcTotalHours(): int Degree Class: . O Degree is an abstract class. It contains one abstract method entitled calcTotalHours(). Each child class must include and define this method. This class has a toString() method which will return a nicely formatted string of all data from the class. This method DOES NOT print anything. One constructor for the degree should have 3 parameters (ordered as degree, gen ed hours, elective hours) The degree must be AA, AS, or AAS. Invalid values should default to AS. Description should set based upon the degree: Associate in Art if degree is AA Associate in Science if degree is AS Associate in Applied Science if degree is AAs Hours should be >= 0 and = 0 and = 0 and = 0 and
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
