A college department needs a system for obtaining total hours for all the people involved in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A college department needs a system for obtaining total hours for all the people involved in its program. They have a record of all the professors, teaching assistants and students with the name of the course and total hours for each course as follows: Professor ΤΑ Professor Student Student Student Student Professor ΤΑ Student Professor ΤΑ Student Student end Isaac Newton Marie Curie Isaac Newton Amy Adams Will Smith Brad Pitt Will Smith Dmitri Mendeleev Carl Gauss Amy Adams Adam Smith Marie Curie Brad Pitt Will Smith 6 Physics Physics 6 Calculus 4 Calculus 4 Calculus 4 Physics 6 6 Physics Chemistry 6 Calculus 4 Economics 3 Economics 3 Chemistry 6 Chemistry Chemistry 6 6 Out of all hours for each course, the professor attends only lecture hours, TA conducts lab hours and students must attend all hours. The number of lab and lecture hours is based on the total hours of the course: if total hours > 4 then lab hours = 2, otherwise lab hours = 1 lecture hours = total hours- lab hours. Therefore for the following scenario: Professor Isaac Newton ΤΑ Marie Curie Student Brad Pitt Physics 6 Physics 6 Physics 6 the professor has 4 hours, TA has 2, and the student has all 6. Write a program using abstract classes to represent people and a proper class hierarchy to represent professors, TAs and students. Introduce an interface named ParticipateHours that defines the following method: int getParticipating Hours(int courseHours). Abstract class Person must implement this interface. The program should scan the full record above all at once (do NOT prompt the user to enter each line separately) and produce a printout of all the people with their total hours through the use of polymorphism. Every person must be mentioned in the printout only once. The printout should be of the following format: Title (Professor/TA/Student) FirstName LastName TotalHours Do not use ArrayList. A college department needs a system for obtaining total hours for all the people involved in its program. They have a record of all the professors, teaching assistants and students with the name of the course and total hours for each course as follows: Professor ΤΑ Professor Student Student Student Student Professor ΤΑ Student Professor ΤΑ Student Student end Isaac Newton Marie Curie Isaac Newton Amy Adams Will Smith Brad Pitt Will Smith Dmitri Mendeleev Carl Gauss Amy Adams Adam Smith Marie Curie Brad Pitt Will Smith 6 Physics Physics 6 Calculus 4 Calculus 4 Calculus 4 Physics 6 6 Physics Chemistry 6 Calculus 4 Economics 3 Economics 3 Chemistry 6 Chemistry Chemistry 6 6 Out of all hours for each course, the professor attends only lecture hours, TA conducts lab hours and students must attend all hours. The number of lab and lecture hours is based on the total hours of the course: if total hours > 4 then lab hours = 2, otherwise lab hours = 1 lecture hours = total hours- lab hours. Therefore for the following scenario: Professor Isaac Newton ΤΑ Marie Curie Student Brad Pitt Physics 6 Physics 6 Physics 6 the professor has 4 hours, TA has 2, and the student has all 6. Write a program using abstract classes to represent people and a proper class hierarchy to represent professors, TAs and students. Introduce an interface named ParticipateHours that defines the following method: int getParticipating Hours(int courseHours). Abstract class Person must implement this interface. The program should scan the full record above all at once (do NOT prompt the user to enter each line separately) and produce a printout of all the people with their total hours through the use of polymorphism. Every person must be mentioned in the printout only once. The printout should be of the following format: Title (Professor/TA/Student) FirstName LastName TotalHours Do not use ArrayList.
Expert Answer:
Related Book For
Project Management The Managerial Process
ISBN: 9781260570434
8th Edition
Authors: Eric W Larson, Clifford F. Gray
Posted Date:
Students also viewed these programming questions
-
Question 1 An investor, a writer, an actor, a professional athlete, and a food critic formed a general partnership to own and operate a high-end bistro. Each partner made a capital contribution. The...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Barnaby is a farmer who receives two-thirds of his total income from the sale of oranges. After two consecutive years of early frosts that destroyed his orange harvest, Barnaby found himself deep in...
-
Besides the Hilbert matrix, there are other matrices that are inherently ill-conditioned. One such case is the vandermonde matrix, which has the following form: (a) Determine the condition number...
-
Anna, who cannot read English, signs a promissory note after Ted, her attorney, tells her that it is a credit application. Anna has a. a defense of fraud maintainable against a holder or an HDC. b. a...
-
Explain how the control variate technique is implemented.
-
The income statement of Supplements Plus, Inc. follows: Additional data follow: a. Acquisition of plant assets is $121,000. Of this amount, $104,000 is paid in cash and $17,000 by signing a note...
-
Define and comprehend the concept of data base and its types. 7. Briefly discuss Database Management Systems. 8. Enumerate and briefly discuss the key concepts of Database Management Systems....
-
Find the average temperature for a particular winter month in the region where your home is located. From your family's heating bills, estimate as best you can the amount of oil or gas consumed to...
-
Write a class called Marks with a required constructor. Then perform the addition using operator overloading
-
Read Barbara Bush's speech to Wellsley which can be found through the American Rhetoric site at . Find out why the audience at Wellsley did not want her to speak - they protested against her speaking...
-
Explain Upstream and downstream costs? How transportation costs incurred to transfer products?
-
Part 1: Theme: Instability of net income due to the reduced number of customers as a result of the limited dine-in capacity on restaurants. Question: 1. what sub-theme can you derive/make out of the...
-
A new basketball hoop was marked up 31% of the cost by a sports store. The hoop sells for $248. What is the amount of the markup to the retailer? Round solution to the nearest penny.
-
Majid is an expert supervisor in a garment knitting factory having an experience of 20 years. He is supervising a knitting line at the moment having 5 machines. The knitting line is experiencing a...
-
Find the derivator? 3 x (a) 3x - 2x - 1 id dx
-
A supermarket chain is interested in exploring the relationship between the sales of its store-brand canned vegetables (y), the amount spent on promotion of the vegetables in local newspapers (x1)...
-
The following activities are based on a current or recently completed group project that you are (were) involved in. This project may be a student project, a work project, or an extracurricular...
-
Explain the difference between contingency reserves and management reserves.
-
Assume you are to command a similar mission. What are two things you would insist on, based on what you learned about Eagle Claw?
-
Consider the two-tank liquid-level system shown in Figure 7.17. The liquid is pumped into tanks 1 and 2 through valves of linear resistances \(R_{1}\) and \(R_{2}\), respectively. The pressure of the...
-
The room shown in Figure 7.34 has a heater with heat flow rate input of \(q_{0}\). The thermal capacitances of the heater and the room air are \(C_{1}\) and \(C_{2}\), respectively. The thermal...
-
Consider the single-tank liquid-level system shown in Figure 7.16, where the volume flow rate into the tank through a pipe is \(q_{\mathrm{i}}\). A pump is connected to the bottom of the tank through...
Study smarter with the SolutionInn App