There are 4 rectangles in the ArrayList shapes. ArrayLists start counting at 0 so when index is 3, dataRecord will be the 4th rectangle. The length and width of the 4th rectangle in shapes are both 4 so the area is 16 and the perimeter is 16. The answer is 3.

C. Area of rectangle is A=L X W

If the length is 5 times bigger and the width is 5 times bigger, than the area is 25 times bigger

If the length is 5 times bigger and the width is 5 times bigger, than the area is 25 times bigger

Check the attached image for code screenshot and output.

Explanation:

Rectangle.cpp

#include "Rectangle.h"

Rectangle::Rectangle() {

length = 0;

width = 0;

}

Rectangle::Rectangle(double newLength, double newWidth) {

length = newLength;

width = newWidth;

}

void Rectangle::setLength(double l) {

length = l;

}

void Rectangle::setWidth(double w) {

width = w;

}

double Rectangle::getLength() {

return length;

}

double Rectangle::getWidth() {

return width;

}

double Rectangle::computeArea() {

return length * width;

}

double Rectangle::computePerimeter() {

return 2 * (length + width);

}

Rectangle Rectangle::operator++ () {

length++;

width++;

return *this;

}

Rectangle Rectangle::operator++ (int) {

Rectangle r(length, width);

++length;

++width;

return r;

}

Rectangle Rectangle::operator-- () {

if(length > 0) {

length--;

}

if(width > 0) {

width--;

}

return *this;

}

Rectangle Rectangle::operator-- (int) {

Rectangle r(length, width);

if(length > 0) {

length--;

}

if(width > 0) {

width--;

}

return r;

}

Rectangle Rectangle::operator- (Rectangle other) {

if(length > other.length && width > other.width) {

length--;

width--;

} else {

cout << "invalid operation. Subtrated Rectangle is bigger" << endl;

}

return *this;

}

bool Rectangle::operator==(Rectangle other) {

return (length == other.length) && (width == other.width);

}

bool Rectangle::operator!=(Rectangle other) {

return (length != other.length) || (width != other.width);

}

void Rectangle::printDetails() {

cout << "Rectangle Report" << endl;

cout << "Dimensions: " << length << " X " << width << endl;

cout << "Area: " << computeArea() << endl;

cout << "Perimeter: " << computePerimeter() << endl;

cout << "" << endl;

}

Rectangle.h

#include<iostream>

#include<iomanip>

using namespace std;

class Rectangle {

double length, width;

public:

Rectangle();

Rectangle(double newLength, double newWidth);

void setLength(double l);

void setWidth(double w);

double getLength();

double getWidth();

double computeArea();

double computePerimeter();

Rectangle operator++ ();

Rectangle operator++ (int);

Rectangle operator-- ();

Rectangle operator-- (int);

Rectangle operator- (Rectangle r);

bool operator== (Rectangle r);

bool operator!= (Rectangle r);

void printDetails();

};

main.cpp

#include "Rectangle.h"

// Ask the user to type in a length and width and

// create an object called rect2 of the rectangle class

// See output for format

cout << "Enter the length of rectangle 3: ";

cin >> l;

cout << "Enter the width of rectangle 3: ";

cin >> w;

Rectangle rect3(l, w);

cout << endl;

cout.setf(ios::fixed);

cout.precision(1);

// Using the member function in the class, print rect1, rect2,

// and rect3 details in that order

rect1.printDetails();

rect2.printDetails();

rect3.printDetails();

cout << endl;

// Print each rectangle in the format shown on the output

cout << "Rectangle 1: " << rect1.getLength() << " X " << rect1.getWidth() << endl;

cout << "Area: " << rect1.computeArea() << " Perimeter: " << rect1.computePerimeter() << endl;

cout << "Rectangle 2: " << rect2.getLength() << " X " << rect2.getWidth() << endl;

cout << "Area: " << rect2.computeArea() << " Perimeter: " << rect2.computePerimeter() << endl;

cout << "Rectangle 3: " << rect3.getLength() << " X " << rect3.getWidth() << endl;

cout << "Area: " << rect3.computeArea() << " Perimeter: " << rect3.computePerimeter() << endl;

if(rect2 == rect3) {

cout << "rectangle 2 and 3 are same." << endl;

} else {

cout << "rectangle 2 and 3 are not same." << endl;

}

cout << "After incrementing rectangle 2: ";

rect2++;

rect2.printDetails();

return 0;

}

Step-by-step explanation: Notice that the figure shown here is a rectangle so we can find its area by using the formula length x width.

Since the length is 3/7 in and the width is 2/8 in, we can plug this information into the formula to get (3/7)(2/8).

Now multiplying across the numerators and multiplying across the denominators we get 6/56 which can be reduced to 3/28 in².

Step-by-step explanation: Notice that the figure shown here is a rectangle so we can find its area by using the formula length x width.

Since the length is 3/7 in and the width is 2/8 in, we can plug this information into the formula to get (3/7)(2/8).

Now multiplying across the numerators and multiplying across the denominators we get 6/56 which can be reduced to 3/28 in².

the most boring thing ever writtenstep-by-step explanation: i am writing something. yes, i plan to make it the most boring thing ever written. i go to the store. a car is parked. m...Read More

1 more answers

the answer is c 150step-by-step explanation:...Read More

1 more answers

40% off the regular price is the correct answer.step-by-step explanation:...Read More

1 more answers

h * s * ah = history teacher s = science teachera = art teacher.i see no data table, but just multiply the number of history teachers, science teachers, and art teachers....Read More

1 more answers

$5.41step-by-step explanation: $20 - $14.51 = $5.49....Read More

1 more answers

Second graphStep-by-step explanation:We are given that two graphs.We to find the graph of exponential decay function.We know that Exponential decay function is of the form Where ...Read More

2 more answers

- Asoftware company receives hundreds of support calls each day. there a...
- Suppose it is known from large amounts of historical data that x, the...
- Henry and wayne operate a charter flying service out of breckenridge,...
- Each week, eric is supposed to prepare 4 exercises for the following w...
- When randomly selecting adults, let m denote the event of randomly se...
- Afurniture store is having a sale on sofas and you're going to buy one...
- Acme corporation’s articles of incorporation require cumulative voting...
- What qyotientyou will get when the place value of 6 is divided by its...
- 80 points asap what is −20÷45 ? −25 −16 −116 −125 what is −58÷910 ?...
- Suppose we are given 4 sets a, b, c, d such that a ⊆ b and c ⊆ d such...