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:
![A college department needs a system for obtaining total hours for all the people involved in its program.](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/07/64c7484c16074_1690781770312.jpg)
![Write a program using abstract classes to represent people and a proper class hierarchy to represent](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/07/64c7485402201_1690781779417.jpg)
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...
-
Argentinas peso was linked to the U.S. dollar through a currency board for ten years before it was cut loose. Why did Argentina peg its currency to the dollar in the first place?
-
Multiplex Cinema owns and operates a nationwide chain of movie theatres. The 500 properties in the Multiplex chain vary from lowvolume, small-town, single-screen theatres to high-volume, big-city,...
-
P23-1 Estate accounting journal entries Ali Sung died of illness on July 1, 2014. Before passing away, he had appointed his son, Deeja Sung, as the executor of his estate. Ali left a will as follows:...
-
The rear window of an automobile is defogged by passing warm air over its inner surface. (a) If the warm air is at T ,i = 40C and the corresponding convection coefficient is hi = 30 W/m 2 K, what...
-
A principal advantage of statistical methods of attribute sampling over nonstatistical methods is that they provide a scientific basis for planning the Sample size. Tolerable deviation rate. Risk of...
-
You are the owner of a small business that manages the program, food, and merchandise sales at the Excel Center, where the local professional basketball team plays. In addition to basketball games,...
-
CSU-Global IRS Account ares.dll There are many ways to take the sample. For each option, decide what type of bias it may have and how it would affect our sample average. a. You go to the library on a...
-
how is lateral force(fy) determined from this data Tyre Responses 1 1 1 1 1 1.3 1.3 1.3 1.3 1.3 1.6 1.55 1.45 1.27 1.1 Fz (N) 0 400 800 1200 1500 Slip Angle (deg) Fy1 (N) Fy2 (N) Fy3 (N) 0.0 0 0 0.5...
-
(13%) Problem 8: A wire is oscillated to create a wave of the form y(x,t) = Asin(x - 30t) == The wave is reflected from a fixed end producing a reflection of the form y2(x,t) = A sin(x + 30t) The two...
-
Using the definitions of even integer and odd integer, give a proof by contraposition that this statement is true for all integers n: If 5n+3 is even, then n is odd.
-
7. Design the formwork for a wall 8-ft (2.44-m) high to be poured at the rate of 5 ft/h (1.53 m/h) at a temperature of 77F (25C). The concrete mixture will use Type I cement without retarders and is...
-
tempt in Progress The City of Minden entered into the following transactions during the year 2026. 1. A bond issue was authorized by vote to provide funds for the construction of a new municipal...
-
14.3 (Individual or component costs of capital) Your frmis considering a new investment and we toch wel erg cool to the open Abond that has a $1,000 par value ce value) and a contractor coupon...
-
A sprinkler head malfunctions at midfield in an NFL football field. The puddle of water forms a circular pattern around the sprinkler head with a radius in yards that grows as a function of time, in...
-
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?
-
5.Acity government has a nine-year capital lease for property being used within the General Fund. The lease was signed on January 1,2008. Minimum lease payments total $90,000 starting at the end of...
-
19. What are the two fund-based financial statements for governmental funds? What information does each normally present?
-
18. What are the two government-wide financial statements? What does each normally present?
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App