I have to do the following:
Design and write pseudo code for an abstract data type representing a rectangle (width and length). Add a way to compare two rectangles by comparing their area, and a function computing the biggest in an array of rectangles.
THis is what I have so far:
Declare Height of Reals
Declare Width of Reals
Declare Area of Reals
Declare A[100] of Reals
Write Enter the Height and Width of Rectangle (enter 0,0 to quit):
Input Height, Width
Set Area = Height * Width
Set Count = 0
While Area <> 0
Set Count = Count + 1
Set A[Count] = Area
Write Enter the Height and Width of Rectangle (enter 0,0 to quit):
Input Height,Width
Set Area = Height * Width
End While
PsuedoCode is not an easy task for me: Could someone please help me! I am fairly new to programming and I am stuck! Thanks ALI
Start Free Trial