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.
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.
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 11RQ
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT