subject

1. Create a class named FacultyCourse
Data fields:
• department (for example, ENG),
• courseId (for example, CSCI1306),
• credits (for example, 3)
• fee computed at per credits
• CHARGE: constant value (e. g., $ 120) for all courses
• numberOfCourses: holds the number of created courses
• profitRate data field (double value less than 1 greater than zero (0-1)) .
Methods :
• constructor ():
All of the fields are required as arguments to the constructor, except for the fee, which is computed at
fee = credits * charge
e. g., fee = 3 * $120 = $360).
• The necessary set and get methods
• display () method that displays the course data.
• getProfit () method return the course profit
profit = profitRate*fee
2. Create a subclass named TheoryCourse that has
Data fields
• profitRate for theory course is 0.4;
Methods:
• constructor ():
adds $30 to the course fee.
• Override the parent class display () method to indicate that the course is a theory course and to display all the data.
• Override the parent class getProfit (): show why?
• The necessary set and get methods
3. Create a subclass named LabCourse that
Data fields:
• profitRate for Lab course is 0.2;
Methods:
• 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.
• Override the parent class getProfit (): show why?
• The necessary set and get methods
4. Create a Driver class UseCourse
Write an application named UseCourse and do the following
Data fields:
• Courses: an array of courses:
Methods:
Constructor:
• Initialize the array of courses with capacity = 10 ;
• Creates an array of three TheoryCourse and four LabCourse
• prompts the user for the course type
If the user enters "Theory" as a course type
o TheoryCourse is created
o prompts the user for the course information:
✓ department: any of the following (BIO, CIS, PHY)
✓ course id,
✓ credits
If the user enters "Lab" as course type
o LabCourse is created
o prompts the user for the course information:
✓ department: any of the following (BIO, CIS, PHY)
✓ course id,
✓ credits
PrintOutReport:
write a method PrintOutReport to display the following
o number of Created Courses.
o Total profit, computed as in the following
totalProfit=ΣcourseProfit=0
courseProfit= profitRate * courseFee.
Main method:
Call the constructor of the driver class
call printOutReporty
Then Save the files as FacultyCourse. java,

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:50
Using least squares fitting, you are to fit the data sets to the following models and solve for the parameters ai , where i is the index of the parameter. the input/output data for the systems are linked in the bblearn site. for each of the systems use matlab to plot the supplied data vs. the model fit on one plot. include your code in the solutions. (a) linear fit "lineardata.mat" y=a1x^3 + a2x^2 + a3x + a4 (b) plant fit "plantdata.mat g(s) = a1/(s + a2)
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
You know the right answer?
1. Create a class named FacultyCourse
Data fields:
• department (for example, ENG),
Questions
question
Mathematics, 05.05.2020 06:12
question
Biology, 05.05.2020 06:12
question
Mathematics, 05.05.2020 06:12
question
History, 05.05.2020 06:12
Questions on the website: 13722360