In the project you will use Java Inheritance to create a series of related classes with a “Shape” theme.

computer science

Description

Overview 

In the project you will use Java Inheritance to create a series of related classes with a “Shape” theme. Before completing this exercise, be sure to review and try the Java class and inheritance examples and materials found in this free Safari resource:


You'll need to sign in using your UMGC student email account. Once you sign in, you'll have immediate access to the content, and you'll shortly receive an e-mail from Safari prompting you to set up a password and complete your account creation (recommended).


Design, implement and test a Java class Inheritance hierarchy that would satisfy the following is-a and has-a relationships: 

  • A Shape is an object 
  • A TwoDimensionalShape is a Shape 
  • A ThreeDimensionalShape is a Shape 
  • A Circle is a TwoDimensionalShape 
  • A Square is a TwoDimensionalShape 
  • A Triangle is a TwoDimensionalShape 
  • A Rectangle is a TwoDimensionalShape 
  • A Sphere is a ThreeDimensionalShape 
  • A Cube is a ThreeDimensionalShape 
  • A Cone is a ThreeDimensionalShape 
  • A Cylinder is a ThreeDimensionalShape 
  • A Torus is a ThreeDimensionalShape 
  • A Shape has a NumberofDimensions

Instruction Files

Related Questions in computer science category