Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Person.java file that contains a Person class. Use a constructor to give the Person class the following attributes: Height ( integer ) Hair

Create a Person.java file that contains a Person class.
Use a constructor to give the Person class the following attributes:
Height (integer)
Hair colour (string)
18 or older (boolean)
Extend the Person class to create Scientist and Doctor classes.
The Scientist class also has the following features:
Lab coat colour (string)
Type of Scientist
Add a method in this class to use the lab coat colour to determine
what kind of scientist someone is. The colours work as follows:
Green: Biologist
Purple: Physicist
White: Pharmacist
Blue: Climatologist
Yellow: Geneticist
Red: Zoologist.
Include a method that will print out a description of a Scientist
object.
The Doctor has the following features:
Ranking (string)
Years experience (integer)
The Doctors ranking is determined based on their years of
experience. Create a method to determine their ranking using the
following information:
Medical student: 0-6 years
Intern: 7-8 years
Resident: 9-16 years
Fellow: 17-20 years
Attending 21+ years
Include a method that will print out a description of a Doctor
object.
Compile, save and run your file.

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_2

Step: 3

blur-text-image_3

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

Why should a consultants progress be regularly monitored?

Answered: 1 week ago

Question

3. Existing organizations and programs constrain behavior.

Answered: 1 week ago