Question: Build a JAVA program will consist of three files: App.java - the main application class Animal.java - superclass representing an Animal Cat.java - subclass representing

  • Build a JAVA program will consist of three files:
    • App.java - the main application class
    • Animal.java - superclass representing an Animal
    • Cat.java - subclass representing a Cat
    • Include documentation at the top of each file that includes
      • Your name
      • Date of development
      • Assignment (e.g. CIS218 Performance Assessment - Inheritance & Overriding)
      • Description of the class
  • The main application class must meet the following requirements
    • Print a line that states "Your Name - Week 5 PA Inheritance and Overriding"
    • Creates an instance of each class using parameters of your choosing
    • Print each object's properties to the console using the PrintAnimal function
    • Update the properties of each instance to reflect values that are different from their original values
    • Print each object's properties to the console using the PrintAnimal function
Animal -Name: String -Legs: int +Animal(String name, int legs): Animal +getName(): String

CoursHeroTranscribedText

Animal -Name: String -Legs: int +Animal(String name, int legs): Animal +getName(): String +setName(String name): void +getLegs(): int +setLegs(int legs): void +print Animal(): void 4 extends Cat -Sound: string +Cat(String name, int legs, String sound): Cat +getSound(): String +setSound(String sound): void +print Animal(): void

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!