My professor has given me additional information for this question:   Create a class named CollegeCourse that includes data fields that hold the department (for example, ENG), the course number (for example, 101), the credits (for example, 3), and the fee for the course (for example, $360). All of the fields are required as arguments to the constructor, except for the fee, which is calculated at $120 per credit hour. Include a display() method that displays the course data. Create a subclass named LabCourse that adds $50 to the course fee. Override the parent class display() method to indicate that the course is a lab course and to display all the data. Write an application named UseCourse that prompts the user for course information. If the user enters a class in any of the following departments, create a LabCourse: BIO, CHM, CIS, or PHY. If the user enters any other department, create a CollegeCourse that does not include the lab fee. Then display the course data. Save the files as CollegeCourse.java, LabCourse.java, and UseCourse.java.   This is what the professor wrote:   NOTE: Include any & all Exception Handling necessary.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question

My professor has given me additional information for this question:

 

Create a class named CollegeCourse that includes data fields that hold the
department (for example, ENG), the course number (for example, 101), the
credits (for example, 3), and the fee for the course (for example, $360). All of the
fields are required as arguments to the constructor, except for the fee, which is
calculated at $120 per credit hour. Include a display() method that displays
the course data. Create a subclass named LabCourse that adds $50 to the course
fee. Override the parent class display() method to indicate that the course is
a lab course and to display all the data. Write an application named UseCourse
that prompts the user for course information. If the user enters a class in any of
the following departments, create a LabCourse: BIO, CHM, CIS, or PHY. If the
user enters any other department, create a CollegeCourse that does not include
the lab fee. Then display the course data. Save the files as CollegeCourse.java,
LabCourse.java, and UseCourse.java.

 

This is what the professor wrote:

 

NOTE: Include any & all Exception Handling necessary.

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning