How to Write an Operator That Computes the Area of a Rectangle

An operand is a constant or variable that can be mathematically manipulated. Operands are spliced together by means of operators. Operators are mathematical manipulators, the most fundamental of which are addition, subtraction, division and multiplication. In essence, operators use numbers or other complex mathematical expressions to perform calculations. Operators take the value of operands and process those values through calculation. Multiplication is the operator employed to calculate area. The dimensions of a rectangle serve as operands, which are operated on to produce a value representing the area of the rectangle.

Instructions

    • 1

      Assign the symbol L to the operand representing the length of the rectangle. For example, if the rectangle is 10 centimeters long and 5 centimeters wide, then L represents 10 centimeters.

    • 2

      Assign the symbol W to the operand representing the width of the rectangle. For example, if the rectangle is 10 centimeters long and 5 centimeters wide, then W represents 5 centimeters.

    • 3

      Write the operator that yields the rectangular area. Use the expression L x W as the rectangle area operator. The area of a rectangle is found by multiplying the length and width of the rectangle. For example, if the area operator (L x W) is applied to a rectangle that is 10 centimeters long and 5 centimeters wide, the operation yields a result of area = 50 cm^2 = 10 cm x 5 cm = L x W.

Learnify Hub © www.0685.com All Rights Reserved