Help With My C++ Question Please I have gotten through some of Part1. Its Part2 I need most of the help with...
Part 1: A 2-dimensional array named Grades has been initialized to the following values in the order shown:
56 98 72 62
61 73 63 96
87 94 91 71
Show the contents of the array after execution of the following code segment:
int temp, x;
for ( x = 1 ; x < 4 ; x + + )
{
temp = x ;
Grades [ --temp ] [ x ] * = 2 ;
}
Part 2: Create a class Rectangle, the “.H” file. The class has attributes length and width (i.e. 5.2 inches), each of which defaults to 1. It has member methods that calculate the perimeter and the area of the rectangle. It has set and get methods, for both length and width. The set method should verify that length and width are each floating-point numbers larger than 0.0 and less than 20.0
a. Write the source code for the “.H” file
b. Write C++ source code statements for one of the set methods |