Polymorph. Prog You are to design the following project: A person has a name, and age. An athlete is

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadlines.


Order a Similar Paper Order a Different Paper

Polymorph. Prog You are to design the following project: A person has a name, and age. An athlete is a person. An athlete has a team and position. A baseball player is an athlete and a person. A baseball player has a battingPosition. Baseball players either bat lefthanded, righthanded or both. A football player is an athlete and a person. A football player has a specialty. A football player’s speciality is either Offense, Defense, orSpecial Teams. A hockey player is an athlete and a person. A hockey player has a stickBrand. A golfer is an athlete and a person. A golfer has a mainSponser. A soccer player is not an athlete or a person…therefore soccer does not exist. All sport type objects have a method named doThis();     Baseball -> doThis() displays I hitsomething.     Football -> doThis() displays I tacklesomething.     Hockey -> doThis() displays I sit in apenalty box.     Golfer -> doThis() displays I putt it inthe hole.     …all sports have a doThis() method thatdisplays something. Main()    create the class Person, Athlete, Baseball    create the class Football, Hockey, Golfer    Create the doThis() method in each class    In main create the follow reference variables      Baseball Hank (create this referencevariable)      Football Terry (create this referencevariable)      Hockey Mario (create this referencevariable)      Golfer Tiger (create this referencevariable)      Baseball Barry (create this referencevariable)      Football Payton (create this referencevariable)      Hockey Wayne (create this referencevariable)      Golfer Phil (create this referencevariable)    Call each sports doThis method (one at a time)passing each player.    call the toString methods for each playerobject.
YOU CANNOT: Use global variables, word goto, the break command outside acase statement . . .

"Is this question part of your assignment? We can help"

ORDER NOW
Writerbay.net

Do you need help with this or a different assignment? We offer CONFIDENTIAL, ORIGINAL (Turnitin/LopesWrite/SafeAssign checks), and PRIVATE services using latest (within 5 years) peer-reviewed articles. Kindly click on ORDER NOW to receive an A++ paper from our masters- and PhD writers.

Get a 15% discount on your order using the following coupon code SAVE15


Order a Similar Paper Order a Different Paper