Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Java application according to the following specs: 1). Create an abstract class named Course . Each course object will have attributes for course

Create a Java application according to the following specs:

1). Create an abstract class named Course . Each course object will have attributes for course ID, course title, enrollment limit, and price each student pay when taking the course.

2). Each course will be taught by a single Faculty member so the course w ill have information about the professor who teaches the course. This information include faculty ID and faculty name. Implement the appropriate relationship between the Faculty and Course classes.

3). Add an abstract parameter less method named calculate Revenue to Course.

4). Create a concrete class named Programming Course that extends Course. Have an additional attribute in this class to indicate the programming language used.

5). In Programming Course, implement calculate Revenue. For simplicity, this method will compute the revenue generated from the course by assuming the course always reaches the enrollment limit.

6). Create a class named Use Course. In this class, declare a global array list that can store course objects.

7). In the main method, create two programming courses and add them to the array list. (You don’t have to ask the user to enter the data for the courses, just use any values of your choice).

8). Display the revenue generated by each course.

9). Object Serialization: Since arrays are objects in Java, entire arrays of Serializable objects can be saved in a file simply by passing the array name to an Object Output Stream’s write Object method. Write code that will create a file named Courses Dataset for object output and saves the entire array in that file. When the program runs later, your code will read the array back from the file. Hint: remember that your classes must implement the Serializable interface.

Step by Step Solution

3.48 Rating (155 Votes )

There are 3 Steps involved in it

Step: 1

Coursejava import javaioSerializable public abstract class Course implements Serializable protected String courseID protected String coursetitle protected int enrollmentlimit protected int price price ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

International Economics

Authors: James Gerber

6th edition

978-0132950145, 132950146, 132948915, 978-0132948913

More Books

Students also viewed these Programming questions