1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
amid [387]
3 years ago
9

ppose we have a Rectangle class that includes length and width attributes, of type int, both set by the constructor. Define an e

quals method for this class so that two rectangle objects are considered equal ifThey have the exact same length and width.They have the same dimensions—that is, they are congruent.They have the same shape—that is, they are similar.They have the same perimeter.They have the same area.
Computers and Technology
1 answer:
vichka [17]3 years ago
8 0

Answer:

Check the explanation

Explanation:

#include <bits/stdc++.h>

using namespace std;

class Rectangle{

  public:

      int length;

      int breadth;

      Rectangle(int l,int b){

          length = l;

          breadth = b;

      }

      int area(){

          return length*breadth;

      }

      int perimeter(){

          return 2*(length+breadth);

      }

      bool equals(Rectangle* r){

          // They have the exact same length and width.

          if (r->length == length && r->breadth == breadth)

              return true;

          // They have the same area

          if (r->area() == area())

              return true;

          // They have the same perimeter

          if (r->perimeter() == perimeter())

              return true;

          // They have the same shape-that is, they are similar.

          if (r->length/length == r->breadth/breadth)

              return true;

          return false;

      }

};

int main(){

  Rectangle *r_1 = new Rectangle(6,3);

  Rectangle *r_2 = new Rectangle(3,6);

  cout << r_1->equals(r_2) << endl;

  return 0;

}

You might be interested in
I'm skeptical about (b) , is this accurate or the ranges should be listed differently ?​
Inessa05 [86]

Answer:

My guess would be C2-C11, But I may be wrong

Imagine a graph

Hope this helps....

4 0
3 years ago
The​ ________ is a​ c-shaped structure that curves around the pancreas and stomach
Sever21 [200]
The duodenum is the c-shaped structure that curves around the pancreas and stomach , it is actually the smallest part of the small intestine and joins the stomach to the jejunum <span />
6 0
3 years ago
Qla
Olenka [21]

Answer:a

What are the activities a Database Designer will do if using the SDLC to design a Database [10]

Q1b

List the five main components of Access Database and state their uses [1

Explanation:

7 0
3 years ago
What would this look like if you were to write the pseudocode but for c++?
makvit [3.9K]

Answer:

when make a task list you would not include commands that are for any specific language like C++

Explanation:

pseudocode should be universal. So when creating the task list, you would not include commands that are for any specific language like C++, java, C#, or perl. The point of pseudocode is to design a program that can be translated in to any language.

5 0
3 years ago
Management is as old as human civilization. justify this statement​
AnnyKZ [126]

Answer:

Indeed, management is as old as the human species, as human nature is itself dependent on the natural resources that it needs for its subsistence, therefore needing to exercise a correct administration of said resources in such a way as to guarantee that those resources can satisfy the greatest number of individuals. That is, the human, through the correct management of resources, seeks to avoid the scarcity of them.

8 0
3 years ago
Other questions:
  • Bcghxdfghncfghndfgxdfgjfjgktyerdgftguj
    8·2 answers
  • When reading a ____ language, we use our understanding of the richness of the language's vocabulary to extract the meaning. geop
    10·1 answer
  • 1. Grade data is:
    5·1 answer
  • If an employee who needs eye protection wears prescription lenses he or she should
    14·1 answer
  • During the troubleshooting of a pc that will not boot, it is suspected that the problem is with the ram modules. the ram modules
    14·1 answer
  • There are several methods of updating information and data on a webserver. We must consider who performs those updates upfront w
    9·2 answers
  • What common communication devices are used in homes to connect to the internet and remote networks and what capabilities do thes
    10·1 answer
  • You can view the existing Access Control Lists for a set of folders on a Windows system by right-clicking the folder you want to
    10·1 answer
  • The Fibonacci numbers are the numbers
    15·1 answer
  • Which image file format consumes the most file<br> space?<br> 0<br> GIF<br> JPEG<br> PNG
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!