Create class called animalinfo as the main class for program

Assignment Help JAVA Programming
Reference no: EM131695449

Assignment

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 write a Java program that allows the user to select an animal from a menu and then display information about the animal.

Create a new project in your IDE named "AnimalInfo."

Create a class called "AnimalInfo" as the main class for the program.

Create a class called "Animal" with a virtual method displayInfo().

Create 3 classes inherited from Animal (one for each of your animals). Each of the inherited classes should override Animal.displayInfo() to display information about the animal. The information should just be a short description of the animal displayed to the screen.

In the AnimalInfo.main() method, display a menu allowing the user to choose 1 of 3 animals or quit the program. The menu should accept input from the user and take the appropriate action and then repeat until the user selects the option to quit. Hint: Simple menus are easiest to implement if the user selects a letter or number for each menu item.

When the user selects an animal, use the displayInfo() method of the appropriate class to display information about the selected animal.

Use comments throughout your code demonstrating your understanding of each statement of code.

Reference no: EM131695449

Questions Cloud

What are the pros of arbitration compared to mediation : A form of alternate dispute resolution is mediation. What are the pros and cons of arbitration compared to mediation?
What is magellan inventoriable cost : The following information applied to Magellan, Inc. for 2018: Merchandise purchased for resale $400,000, What is Magellan's inventoriable cost
Review case study of the buenolorl company : Control Limits, Variance Investigation Buenolorl Company produces a well-known cologne. The standard manufacturing cost of the cologne is described.
Discuss about the deviant activity on phones and computers : Under what circumstances do you think schools should be expected to respond to deviant student activity on their phones or online?
Create class called animalinfo as the main class for program : Create a class called "AnimalInfo" as the main class for the program. Create a class called "Animal" with a virtual method displayInfo().
How many people does the airline expect : What is the probability that 16 people enter the security check-in lineup in a 15-minute interval - What is the probability that mall security will apprehend
Labor-leisure model : Labor Econ. Can someone explain the difference between the Life-cycle model and how it differs from the labor-leisure model?
Discuss what does a guerrilla army need to survive : How do you think the social and political conditions in Latin America contributed to the proliferation of guerrillas
Products fail and are removed from production : Assume that, in a given market, 75% of new products fail and are removed from production within 2 years.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Part - 1build a graphical user interface for displaying the

part - 1build a graphical user interface for displaying the image groups cluster in jmjrst. design and implement using

  Program that prints real solutions to the quadratic equation

Write a Java program that prints all real solutions to the quadratic equation ax^2 + bx + c = 0. Read in a, b, c and use the quadratic formula. If the discriminant (b^2 - 4ac) is negative, display a message stating that there are no real solutions..

  How does java support the concept of encapsulation

How does Java support the concept of encapsulation? Describe the difference between an object and a class. What is the difference between the contents of a Java variable of a primitive type and a Java variable of a class type?

  Writing a program that computes the salaries

Writing a program that computes the salaries for a collection of employees of different types. This program consists of four classes.

  Write a program that starts a player off with a bank of $15

Write a program that starts a player off with a bank of $15.00.

  Prepare a polynomial-time algorithm

Write a polynomial-time algorithm that, given an initial configuration (P_1, P_2, ..., P_k), decides if it is a winning configuration - Prepare a polynomial-time algorithm that decides if it is a winning configuration.

  Create an array of objects of the sub-class

Create an array of objects of the sub-class. Add two objects to the array. Loop through the array and print what each element is constructed from.

  Display a frequency chart for each exam score in the array

Create a Java application that contains methods to display statistics for the numbers in an array. Receive the array as an argument and display a frequency chart for each exam score in the array.

  Write a simple tester program

Implement a class named Friend which extends the Contact class. The Friend class should have a field that represents the friend's birthday. For simplicity, the birthdate can be represented with a String.

  What significant justification is there for the -> operator

Dynamic type binding is closely related to implicit heap-dynamic variables. Explain this relationship. Keep your answer to 1 paragraph or less.

  Design and implement a rmi-based client

In this assignment, you are requested to build a system which allows a school pupil to practise multiple choice tests in math. Design and implement a RMI-based Client / Server communication system in Java, which will do the following:

  Using netbeans, use repetition to display a table of values

Using Netbeans, use repetition to display a table of values showing x, the square of x and the cube of x. X is to go up to 5.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd