Answered step by step
Verified Expert Solution
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
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: years
Intern: years
Resident: years
Fellow: years
Attending 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started