Page 1 of 1

a1 variable name a2 Create a Driver class to use your Farm and Animal classes and create instances of them. In the main

Posted: Fri Jul 01, 2022 5:37 am
by answerhappygod
A1 Variable Name A2 Create A Driver Class To Use Your Farm And Animal Classes And Create Instances Of Them In The Main 1
A1 Variable Name A2 Create A Driver Class To Use Your Farm And Animal Classes And Create Instances Of Them In The Main 1 (24.61 KiB) Viewed 43 times
OUTPUT should be like this please
FarmName: farm of ten | Number of Animals: 5 | FarmSize: 10Name: cow | Year of Birth: 2012 | Weight: 1000.50 |Gender: fName: pig | Year of Birth: 2009 | Weight: 550.50 | Gender: mName: donkey | Year of Birth: 1999 | Weight: 773.42 | Gender: mName: sheep | Year of Birth: 2016 | Weight: 164.23 | Gender: fName: goose | Year of Birth: 2004 | Weight: 10.75 | Gender: f
a1 variable name a2 Create a Driver class to use your Farm and Animal classes and create instances of them. In the main method do the following: 1. Create a Farm of size 10 a3 a4 a5 2. Create 5 Animal Objects with the details specified in the table below 3. Add the 5 Animal objects to the Farm 4. Call the printDetails method from the Farm to print all the Farm and Animal details. name COW pig donkey sheep goose birth Year 2012 2009 1999 2016 2004 weight 1000.5 550.5 773.42 164.23 10.75 gender 'f 'm' 'm' 'f f