Question: Using java Lab 9: Inheritance and Polymorphism Objectives: 1. Understand the concept of inheritance. 2. Understand the notion of superclasses and subclasses 3. Understand the

Using java
 Using java Lab 9: Inheritance and Polymorphism Objectives: 1. Understand the
concept of inheritance. 2. Understand the notion of superclasses and subclasses 3.
Understand the concept of polymorphism . Distinguish between abstract and concrete classes.
5. Declare abstract methods to create abstract classes. Common Programming Errors .

Lab 9: Inheritance and Polymorphism Objectives: 1. Understand the concept of inheritance. 2. Understand the notion of superclasses and subclasses 3. Understand the concept of polymorphism . Distinguish between abstract and concrete classes. 5. Declare abstract methods to create abstract classes. Common Programming Errors . Attempting to create an object of an abstract class is a compillation error Failure to implement a superclass's abstract methods in a subclass is a compilation error unless the subclass is also declared abstract. . Assigning a superclass variable to a subclass variable (without an explicit cast) is a compilation error Lab Exercise: 1) Inheritance Implement the following classes hierarchy: TvoDinensionalshape Rectangle Triangie The hierarchy has the following classes .Class TwoDimensionalShape is the superclass of the hierarchy. It has one instance variable shapeName (of type String). It has a constructor that initializes shapeName to the value specified in the 27

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 Databases Questions!