Write an application driver usecourse class with the main


Create a class named CollegeCourse that includes 4 fields - the department name (e.g. "ENG"), the course number (e.g. 101), the number of credits (e.g. 3) and the course fee (e.g. "360"). Add getters and setters methods for each field. Add overloaded constructor, which accepts three parameters for the proper fields above, except for the fee field - the fee will be calculated as $120 per credit multiplied by the number of credits. Include a Display() method to display the course data.

Create a subclass of CollegeCourse class named LabCourse, which adds $50 to the course fee. Override the parent class Display() method to indicate that the course is a lab course and display all the subclass data.

Write an application driver UseCourse class with the main() method, which prompts a user for the course information (use Scanner class or JOptionPane). If a user enters a class in BIO or CHEM departments, create a LabClass object and enter other data to its fields. If a user enters any other department - create an object from the base CollegeCourse class that does not include the additional lab fee. Then - display the course data by calling the Display() method of the proper class.

Solution Preview :

Prepared by a verified Expert
Business Management: Write an application driver usecourse class with the main
Reference No:- TGS01713459

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)