Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Create a class named CollegeCourse that includes 4 fields – the department name

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.

Save the CollegeCourse class in the proper .java file, LabCourse class in the proper .java file and UserCourse driver class in the UseCourse.java file.

Please provide your solution with a proper UML diagram illustrating class hierarchy.

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"