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

This problem has been solved!


Do you need an answer to a question different from the above? Ask your question!

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.

Related Book For  answer-question

International Economics

6th edition

Authors: James Gerber

ISBN: 978-0132948913