Rectangular perimeter area

A needs analysis

   Rectangular area and perimeter requirements

Two functional design

    Programming, defines a rectangular type, having a length, width, area, perimeter, a total of four member variables, calculation of the area and calculating the perimeter of the two methods, the main class creates objects in the rectangle, the length and width of the input, output rectangular area and perimeter.

Three test runs

Four codes

Guess you like

Origin www.cnblogs.com/12-abc/p/11544252.html