How do to create UML diagram for rectangle using the below format In UML class d
ID: 3861603 • Letter: H
Question
How do to create UML diagram for rectangle using the below format
In UML class diagrams, data field are denoted as:
dataFieldName: dataFieldType
Constructors are shown as:
ClassName(parameterName: parameterType)
Methods are represented as:
MethodName(parameterName: parameterType): returnType
UMl circle example
Circle--------class name
Radius: float-----data field
Circle(radius=1: float)----constuctor
setArea(): float----methods
getPerimeter(): float----methods
setRadius(radius: float): None---methods
Explanation / Answer
solution--
It's simple , you need length and breadth in case of rectangles.
Rectangle--------class name
length: float-----data field
breadth: float-----data field
Rectangle(length: float,breadth:float)----constuctor
setArea(): float----methods
getPerimeter(): float----methods
setLength(length: float): None---methods
setBreadth(breadth: float): None---methods
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.