The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Need help writing programming assignment. Write a program that simulates the battle between a fox and chickens.Â
Program 4-5
Â
Program 4-5
Use this class hierarchy:
Program 4-5
Fox
Kills 1 chicken a day
 Does not reproduce
Chicken
ï‚· Simulation continues as long as chicken population is greater than 1 and less
than or equal 10
 (if 1 or less, mating can’t happen. If > 10, chickens will overrun the fox)
Driver main method should be as shown below: (replacing comment with missing output piece and replacing LiFi with your initials. Add prologue and additional comments to explain functionality.)
Â
Â
Unit 5 Chapter 14 AssignmentGrading Information:This Program isdueonDate Specified.Comments areREQUIRED; flow charts and pseudocode areNOT REQUIRED.DirectionsPointsThe files must be called <LiFiUnit5Ch14.java> (driver program)LiFiAnimal.javaLiFiFox.java (which extends LiFiAnimal)LiFiChicken.java (which extends LiFiAnimal)The files must be called as specified above, (LiFi = Your Last Initial Your First Initial)Proper coding conventions required the first letter of the class start with a capitalletter and the first letter of each additional word start with a capital letter.Only submit the .javafiles needed to make the program run. Do not submit the.classfiles or any other files.5%Style ComponentsInclude properly formatted prologue, comments, indenting, and other style elementsas shown in Chapter 2 starting page 64 and Appendix 5 page 881-892.5%Topics covered in chapterTopics with * are covered in this assignment.*Object class*equals methodtoString method*PolymorphismAbstract*InterfacesProtected access modifierBasic RequirementsWrite a program that simulates the battle between a fox and chickens.Use this class hierarchy:FoxxKills 1 chicken a day20%
Attachments:
-----------