Programming Problem No. 2: Create a class named CollegeCourse that includes data fields that hold the course (for example ENG), the course number (for example 101), the credits (for example 3), the fee for the course (for example USD360.00). All of the fields are required as arguments to the constructor, except for the fee, which is calculated at USD120 per credit hour. Include a display() method that displays the course data. Create a subclass named LabCourse that adds USD50.00 to the course fee. Override the parent class display() method to indicate that the course is a lab course and to display 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 course, create a LabCourse: BIO, CHM, CIS and PHY. If the user enters any other course (ENG, PHI, FIL) 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.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question
Programming Problem No. 2:
Create a class named CollegeCourse that includes data fields that hold the course (for example ENG), the
course number (for example 101), the credits (for example 3), the fee for the course (for example
USD360.00). All of the fields are required as arguments to the constructor, except for the fee, which is
calculated at USD120 per credit hour. Include a displayl) method that displays the course data. Create
a subclass named LabCourse that adds USD50.00 to the course fee. Override the parent class display()
method to indicate that the course is a lab course and to display 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 course, create a LabCourse: BIO, CHM, CIS and PHY. If the user enters any other course (ENG,
PHI, FIL) 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.
Transcribed Image Text:Programming Problem No. 2: Create a class named CollegeCourse that includes data fields that hold the course (for example ENG), the course number (for example 101), the credits (for example 3), the fee for the course (for example USD360.00). All of the fields are required as arguments to the constructor, except for the fee, which is calculated at USD120 per credit hour. Include a displayl) method that displays the course data. Create a subclass named LabCourse that adds USD50.00 to the course fee. Override the parent class display() method to indicate that the course is a lab course and to display 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 course, create a LabCourse: BIO, CHM, CIS and PHY. If the user enters any other course (ENG, PHI, FIL) 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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Knowledge Booster
Data members
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