Question: in java Start UML Violet UML Editor. Create a new Class Diagram: Click File / New / Static View / Class Diagram in the menu
in java Start UML Violet UML Editor.
Create a new Class Diagram: Click FileNewStatic ViewClass Diagram in the menu bar or click the
class diagram link. Save the file properly into a temporary location.
Add a class diagram: Click Class in the Diagram tools. Click the editing area to add an empty class
diagram. Doubleclick the diagram, add a class name Name the design of its instancestatic
variables Attributes and the design of its instancestatic methods Methods
For this lab, you will design a generic shape object. A shape has a name only. The class will contain two
overloading constructors, a getter for name, a setter for name, method area, method equals and
method toString. The details are included in the following table.
Members of the Shape class Description
name The name of this shape.
Default constructor Creates a Shape instance with a default name such as Shape
The second constructor Given a name, creates a Shape instance with the name.
getName Retrieves the name of this shape.
setName Given a name, changes the name of this shape to the new name.
area Returns the area of this shape.
equals Compares this shape with some other object. This method overrides the
Java equals method.
toString Represents this shape as a string literal. This method overrides the Java
toString method.
After completing the class diagram, translate the design into source codes.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
