Calculation of the properties of rectangles
The class Rectangle calculates properties of a rectangle.
The length \(a \) and and the width \(b \) are given as default arguments. This means that the length and the width can be passed as an argument without a command string (see example below).
The following properties can be queried as a result or passed as an argument.
Symbols
Description
a
Length default b Width default d
Diagonal P Perimeter A Area
Object = Rectangle (a, b)
Object = Rectangle ("arg names", arguments)
Value = Rectangle ("get -> arg names", arguments)
Calculation of the properties of the side lengths \(a \) and \(b \).
Calculation of the properties of the side length \(a \) and the diagonal \(d \).
The following example displays the area \(A \) of the object \(a \).
Calculation of the surface \(A \) from the side lengths \(a \) and \(b \).