Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please give the screenshot of your code running and also make sure the data is captured from a file called input.txt in neatbeans // these

please give the screenshot of your code running and also make sure the data is captured from a file called input.txt in neatbeans // these are the instructions for the question, also please do make sure there exists a main class because all of the answers in chegg are without it image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Goals Practice interfaces and polymorphism Description 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: 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: lab hours and students course, the professor attends only lecture hours, TA conducts The number of lab and must attend all hours. if total hours >4 then lab hours =2, otherwise lab hours =1 lecture hours = total hours lab hours. Therefore for the following scenario: 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 read the full record above from the input file and produce the output file of all the people with their total hours through the use of polymorphism. Every 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 getParticipatingHours(int courseHours). Abstract class Person must implement this interface. The program should read the full record above from the input file and produce the output file of all the people with their total hours through the use of polymorphism. Every person must be mentioned in the file only once. The result should be of the following format: Title (Professor/TA/Student) FirstName LastName TotalHours Deliverables Submit a report including the codes (written or screenshots of the codes) and the result in a PDF file named StudentLastNameAssignment1. Submit a zip file of all of the NetBeans directory of your project named StudentLastNameAssignment1. Incomplete projects or separate code files will not be evaluated. Rubric-Assignment 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

More Books

Students also viewed these Databases questions

Question

3. Identify challenges to good listening and their remedies

Answered: 1 week ago

Question

4. Identify ethical factors in the listening process

Answered: 1 week ago