Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could anyone help me out I have no idea what I should be doing and seeing it worked out will help me understand what I

Could anyone help me out I have no idea what I should be doing and seeing it worked out will help me understand what I should be doing and then I can complete it on my own.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

..... Dug ha :t Lnasil.rd:enia t:l;.s.ar:1ATE uresrs 200reing Ening:: Il'r. it. I.H Iv.taL vtirs :ter:lvi wr. Corni wo ghil:rt EcIWciapouncs:ri IAgrars:rir Enina: TP. ReinI em t ngr:Cd dewierumlrg. Jalarala :. .... l.. Y L'n sa einter Ti dy t s w. le Dug ha :t Lnasil.rd:enia t:l;.s.ar:1ATE uresrs 200reing Ening:: Il'r. it. I.H Iv.taL vtirs :ter:lvi wr. Corni wo ghil:rt EcIWciapouncs:ri IAgrars:rir Enina: TP. ReinI em t ngr:Cd dewierumlrg. Jalarala :. .... l.. Y L'n sa einter Ti dy t s w. return temp: 917 ..T P dos augu Bop.adi ... STO V. paaa .T.auvu.YIYO Doau.- duas butas 1 0 butaagoa butaag ostqnd wotsogut bog sutad os paen pousaa // TT spous/1 201onaaeuoo // 1/anstance variables o efog pablic class Dog ( o ppy + 102ou eenshot (12 png Lecation Protems 2(-spunod .UTan ..subtan pue pto waval abe. T Tbao auIU.+ () Buraagos aedne) uangea ) DuTzagos Butaas oITqud uOT ogut Bop twuoTSTOO apntoUT os pous buraacos uptzzaAO // spoysa 201anu// spunod- s4Bran 201onao0 (EctD 1adne) eeeto bog axoaut // (ezeal ut spunod ut au Butaag 'paazg butaag 'adia butTaas) TBIO) DITgnd 201onaeuoo// catqUTIRA aoueeuT Teuotarppe // bablie class Corgi extends Dog ee bog 23 elbo o ppy + See all photos -Screenshot 00.png 2. Complete the Dog class: a. Using the UML Class diagram to the right, declare the instance variables. A text version is available: UML Class Diagram Text Version. b. Create a constructor that incorporates the type, breed, and name variables (do not type:string breed:string name:string topTrick:string set Top Trick(trick:string) toString() include topTrick). Note: The type refers to what the breed typically does; for example, a corgi would be a "cattle herding dog. A Shiba Inu would be a "hunting dog." C. Create the setTopTrick() mutator method. 3. Complete the Corgi class: a. Using the UML Class diagram, declare the instance variables. b. Create the two s for the instance variables. 4. Make sure to select the Project folder, then add a new class. Name it the Driver class. then create the code: a. There should be no instance variables. b. The main() method will be the only method in the class. c. Write three lines of code in the main() method: i. Instantiate a corgi object using the below syntax: Corgi weight:int age:int setWeight(pounds:int) setAge(years:int) toString() className objectName = new className(input parameters) TIP: Refer to the constructors in the Dog and Corgi classes to ensure the input parameters are correct. ii. Use the objectName.setTopTrick() method to set a top trick for the dog you created. iii. Embed the objectName.toString() method in a statement that outputs to the console window. 5. Once you have completed the code for the Dog and Corgi classes and created a Driver class, right-click the Project folder and select Run As, then Java Application. You should see output in the Console window that resembles the sample below. Your results will vary based on your input values. Sample Output DOG DATA Java is a Pembroke Welsh Corgi, a cattle herding dog. The top trick is: ringing the bell to go outside. ..... Dug ha :t Lnasil.rd:enia t:l;.s.ar:1ATE uresrs 200reing Ening:: Il'r. it. I.H Iv.taL vtirs :ter:lvi wr. Corni wo ghil:rt EcIWciapouncs:ri IAgrars:rir Enina: TP. ReinI em t ngr:Cd dewierumlrg. Jalarala :. .... l.. Y L'n sa einter Ti dy t s w. le Dug ha :t Lnasil.rd:enia t:l;.s.ar:1ATE uresrs 200reing Ening:: Il'r. it. I.H Iv.taL vtirs :ter:lvi wr. Corni wo ghil:rt EcIWciapouncs:ri IAgrars:rir Enina: TP. ReinI em t ngr:Cd dewierumlrg. Jalarala :. .... l.. Y L'n sa einter Ti dy t s w. return temp: 917 ..T P dos augu Bop.adi ... STO V. paaa .T.auvu.YIYO Doau.- duas butas 1 0 butaagoa butaag ostqnd wotsogut bog sutad os paen pousaa // TT spous/1 201onaaeuoo // 1/anstance variables o efog pablic class Dog ( o ppy + 102ou eenshot (12 png Lecation Protems 2(-spunod .UTan ..subtan pue pto waval abe. T Tbao auIU.+ () Buraagos aedne) uangea ) DuTzagos Butaas oITqud uOT ogut Bop twuoTSTOO apntoUT os pous buraacos uptzzaAO // spoysa 201anu// spunod- s4Bran 201onao0 (EctD 1adne) eeeto bog axoaut // (ezeal ut spunod ut au Butaag 'paazg butaag 'adia butTaas) TBIO) DITgnd 201onaeuoo// catqUTIRA aoueeuT Teuotarppe // bablie class Corgi extends Dog ee bog 23 elbo o ppy + See all photos -Screenshot 00.png 2. Complete the Dog class: a. Using the UML Class diagram to the right, declare the instance variables. A text version is available: UML Class Diagram Text Version. b. Create a constructor that incorporates the type, breed, and name variables (do not type:string breed:string name:string topTrick:string set Top Trick(trick:string) toString() include topTrick). Note: The type refers to what the breed typically does; for example, a corgi would be a "cattle herding dog. A Shiba Inu would be a "hunting dog." C. Create the setTopTrick() mutator method. 3. Complete the Corgi class: a. Using the UML Class diagram, declare the instance variables. b. Create the two s for the instance variables. 4. Make sure to select the Project folder, then add a new class. Name it the Driver class. then create the code: a. There should be no instance variables. b. The main() method will be the only method in the class. c. Write three lines of code in the main() method: i. Instantiate a corgi object using the below syntax: Corgi weight:int age:int setWeight(pounds:int) setAge(years:int) toString() className objectName = new className(input parameters) TIP: Refer to the constructors in the Dog and Corgi classes to ensure the input parameters are correct. ii. Use the objectName.setTopTrick() method to set a top trick for the dog you created. iii. Embed the objectName.toString() method in a statement that outputs to the console window. 5. Once you have completed the code for the Dog and Corgi classes and created a Driver class, right-click the Project folder and select Run As, then Java Application. You should see output in the Console window that resembles the sample below. Your results will vary based on your input values. Sample Output DOG DATA Java is a Pembroke Welsh Corgi, a cattle herding dog. The top trick is: ringing the bell to go outside

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

I was partially responsible.

Answered: 1 week ago