Need Help ?

Home / Expert Answers / Other / Description Assignment Description So far, you have learned about design and how to create a simpl

Description Assignment Description So far, you have learned about design and how to create a simpl ...


Description Assignment Description So far, you have learned about design and how to create a simple Java application using an IDE. Now, you are going to gain some experience writing an object-oriented program with classes, objects, inheritance, and polymorphism. These terms sound complex, but you will find they are not difficult to use. You will be drawing on all the information you have gained, and this project will require some time, so start early, and pay attention to instructions. For this project, you will create a Java program that allows the user to select a category of animal from a menu and then a specific animal in that category, then view information about their selection. To facilitate this, we will use a class and inheritance structure as follows: Program/Main Class: AnimalInfo. This file is for the code (in the method “Main()”) that will run the program, present the list, prompt for input, execute the appropriate class method, and then terminate. Note that this file may not include any information about the categories of animals or any specifics about animals. That information comes from the inheriting classes discussed below. Create a project called “AnimalInfo”. Using the method “Main()”, present the user with three animals and ask them to select one to learn more about that animal. The animals in the menu must match your “inheriting classes” discussed below. When the user selects an animal from the menu, execute the “displayInfo()” method from the appropriate inheriting class. Use code comments to annotate your source code, indicating what each line of code does as well as how it works. Parent Class: (Name to be determined.) This file is for the broad category of animals that the user can examine in your program, such as dogs, horses or fish. Your program may contain only one parent class (users will only be able to select from a single category of animals). Create a class file, naming it according to the category of animals that you’ve decided to use. Do NOT inherit another file/class. (Do not use the “extends” keyword in the class declaration.) Create a method in your class file called “displayInfo()”. This displayInfo() method will only be executed if inheritance fails, so in displayInfo(), write code that reports to the screen that this parent class has been engaged by mistake. For example, if executed this method will generate user-friendly text on the screen such as: “Incorrect class inheritance, please contact technical support.” Use code comments to annotate your source code, indicating what each line of code does as well as how it works. Inheriting Classes: (Names to be determined.) Create three class code files that inherit from the parent class discussed above. For example, if you named your parent class “Dogs”, then your inheriting class files might be “Bulldog”, “Beagle” and “Poodle”. (You may not use those examples for your program.) Create three class files, reflecting the animals listed in the menu that was presented to the user. Within each of these class files, declare the class so that it inherits your parent class (using the “extends” keyword). In each class, create a method called “displayInfo()” so that it will override the same method in the parent class. (This will cause text about the selected animal to appear on the screen instead of the error report you wrote for the same method in the parent class.) The text must be a short description of the animal, such as where they live and/or their physical parameters and something interesting about them (1 paragraph of no more than 3-4 sentences). (You do not need to cite your source for this information.) Use code comments to annotate your source code, indicating what each line of code does as well as how it works. Create a ZIP file that includes your project folder and Word document and upload it to the course portal. Note: Normally the Parent Class contains information that is inherited to the Inheriting Classes to save time (limiting redundancy). In this exercise the Parent Class does not contain any data that is inherited to the other classes. This type of inheritance will be explored in the next unit and exercise. Tip: Make sure the program runs correctly before you submit it for grading. If you run into a bug or malfunction and cannot determine the cause, remember that your instructor is here to help! Remember that Individual Projects may be submitted late, and generally the late submission deduction is less penalizing than submitting a program that doesn’t perform all of the required tasks.



Radioactive Tutors

Radio Active Tutors is a freelance academic writing assistance company. We provide our assistance to the numerous clients looking for a professional writing service.

NEED A CUSTOMIZE PAPER ON THE ABOVE DETAILS?
Order Now


OR

Get outline(Guide) for this assignment at only $10

Get Outline $10

**Outline takes 30 min - 2 hrs depending on the complexity and size of the task
Designed and developed by Brian Mubichi (mubix)
WhatsApp