Answer:i think its D it makes more sense also can i get brainliest
Explanation:
Answer:
Follows are the complete question to the given question:
Explanation:
The UML scheme is a UML-based diagram intended to depict the system visually, together with its key actors, roles, activities, objects, and classes, to gather information the about system, change that, or maintain it.
Every complex process is better understood via sketches or pictures. These diagrams have a higher understanding effect. By glancing about, we notice that diagrams are not a new idea but are widely used in various business types. To enhance understanding of the system, we prepare UML diagrams. There is not enough of a single diagram to represent all aspects of the system. You can also create customized diagrams to satisfy your needs. Iterative and incremental diagrams are usually done.
There are two broad diagram categories and that they are broken into subclasses again:
- Diagram structure
- Diagrams of behavior
Please find the graph file of the question in the attachment.
I've included the spin and main method. I also included the public class. You can just ignore everything besides the spin method.
<h2>Solution :</h2>
The given problem is solved in Python.
def ComputeSquare():
side = float(input('Enter the side of the square: '))
if side > 0:
perimeter = 4 * side
area = side * side
print('Perimeter of the square is:',
perimeter, 'unit.')
print('Area of the square is:', area, 'square unit.')
<h3> else:</h3>
print('Invalid input.')
ComputeSquare()
<h2>Explanation :-</h2>
- In this program, we create a function ComputeSquare() to calculate the perimeter and area of a square.
- The function asks the user to enter the side of the square. The side is then stored in a variable.
- Now, we check whether the side is greater than 0 or not using if-else statement.
- If the condition is true, the perimeter and area is calculated which is displayed using print() statement.
- If the condition is false, the else blocks executes printing the error message.
<h3>Refer to the attachment for output.</h3>