ca9 please bid only if you know you can score 100

Instructions:

Write a Java program called to demonstrate Inheritance and Polymorphism

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now
  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)