ca9 please bid only if you know you can score 100

We can write your essays! Let our essay writing experts help you get that A in your next essay. Place your order today, and you will enjoy it. No plagiarism.

Order a Similar Paper Order a Different Paper


Write a Java program called to demonstrate Inheritance and Polymorphism

  1. Create a base class called Person, that has fields, constructors, and anything else you think you may need as you go along. It should also have a method called speak(), to make the person say their name (using System.out.println) (1 point)
  2. Create any two subclasses of the Person class. Each subclass must have the following:
    • At least one new field, with getter/setter methods (1 point)
    • A default constructor that sets its fields to default values, and also all the fields of it’s base class to default values (1 point)
    • A parameterized constructor that accepts all fields from both the base (Person) and new subclass fields (1 point)
    • A speak method, that says something specific that an object of that class would say. (make it up) (1 point)
  3. In a main method, create a Person object, and one object of each subclass (2 objects), and stick all 3 objects in either an ArrayList or an array. Then just loop through (iterate) the ArrayList or array, and call the speak method for each object (1 point)

Everyone needs a little help with academic work from time to time. Hire the best essay writing professionals working for us today!

Get a 15% discount for your first order

Order a Similar Paper Order a Different Paper