CS230 Pre-lab 3

Pre-lab 3

 

Inheritance and Polymorphism

Goals

Practice with:

  • user-defined classes in java
  • overriding methods (toString(), equals())
  • inheritance
  • collection of objects in hierarchy
  • polymorphic references
  • arrays, and in particular arrays of Objects

Gain experience with:

  • thinking carefully about good testing
  • writing javadoc
  • working with command-line arguments

    Tasks:

    Do the following tasks (click on the blue text below for descriptions):

    1. [PRELAB] Reflect on the testing done in last week's solutions.
    2. [PRELAB] Read through the introductionto the Shapes hierarchy carefully.

    3. Create the Triangle class.
    4. Create the IsoscelesTriangle class.
    5. Create a collection of Shapes.