Question: give UML_diagram and some explanations Remember the shape class we have been going over since the beginning of the term? The goal of this assignment
give UML_diagram and some explanations
Remember the shape class we have been going over since the beginning of the term? The goal of this assignment is to fully implement the functionality of a shape class, according to the following: You must have an interface for Shape You will develop the following classes implementing Shape: o Square o Triangle (assume that it is an equilateral triangle, meaning all of its sides are equal) Circle o o Pentagon Each shape must be able to perform the following functionalities: Get the area of the shape (10%) o o O O Get the perimeter of the shape (10%) Get/set the parameters of a shape: (20%) A circle has a center and a radius A triangle has a center and the length of the side A square has a center and the length of the side A pentagon has a center and the length of the side (all sides of the pentagon are equal) Ability to move the shape into a new location according to an offset x and offset y (10%)
Step by Step Solution
3.39 Rating (143 Votes )
There are 3 Steps involved in it
Shape Interface 10 getArea double To calculate and return the area of the shape ... View full answer
Get step-by-step solutions from verified subject matter experts
