APlusGrades

Not Rated (0)

$15/per page/Negotiable

About APlusGrades

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing,Foreign Languages,Geography,Geology,Health & Medical,HR Management,Law,Management,Physics,Programming,Science,Statistics Hide all
Teaching Since: Jul 2017
Last Sign in: 364 Weeks Ago, 6 Days Ago
Questions Answered: 1850
Tutorials Posted: 1850

Education

  • Graduate in Biology and Nutrition, MBA Finance
    Florida State University
    Aug-2000 - Jul-2007

Experience

  • Ass. Relationship Manager
    Penn-Florida
    Mar-2009 - Feb-2016

Category > Computer Science Posted 18 Jul 2017 My Price 12.00

computer science

Hello this assignment is from last week that you helped me with. This is the feedback my professor provided me. Can you please first incorporate the changes recommended from my professor’s feedback? After the changes are made can you then Introduce Polymorphism where it’s appropriate. Thank you!!

 

Please indicate public, protected, default or private access modifiers for each of the member variables and methods.

You already have the 'name' attribute in Animal that is accessible from all of its descendants. You should not have it again in Bird, Mammal, and Reptile classes.

Regarding constructors, you have to think from the business (or requirements) perspective if you can create an entry for an animal without a name and without a birthdate. For instance, someone brings a lion to you. Can you register it in your system without a name and without knowing when it was born? Would the system, without knowing this information work properly? In our case, no, because it would not know how to compute life expectancy.

So, you should not have default constructors for Hawk, Eagle, etc. and you should have birthdate included in the non-default constructor.

 

Next, the way you have shown Animal, Bird, Mammal, Reptile constructors, it means you can instantiate them as these objects. Someone brings a creature and tells you that it is an animal, if you create a record for it, would our system work properly? No, because we can only compute life expectancy for Hawk, Eagle, etc. Additionally, this is beyond the requirements and we should not provide a solution that the requirements do not require. For these classes you should have the constructors as protected and for Hawk, Eagle, etc. you should have them as public. This would ensure that base classes cannot be instantiated and concrete class can be instantiated

Answers

Not Rated (0)
Status NEW Posted 18 Jul 2017 04:07 PM My Price 12.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I

Not Rated(0)