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
Please help!!
Likurg_2 [28]

Answer:

D. Server

Explanation:

A server is a computer or system that provides resources, data, services, or programs to other computers, known as clients, over a network. In theory, whenever computers share resources with client machines they are considered servers.

If this helps, mark me Brainliest!!

8 0
2 years ago
Read 2 more answers
TRUE OR FALSE!!! <br> Your location can be tracked via your digital footprint.
laiz [17]
Sadly this statement is true
3 0
3 years ago
How to transfer mysql database from one server to another
kramer

Answer:

First, create a new database using CREATE DATABASE statement. Second, export all the database objects and data of the database from which you want to copy using the mysqldump tool. Third, import the SQL dump file into the new database.

6 0
2 years ago
You have recently completed IPAM installation and configuration. You have several each of DHCPservers, DNS servers, and domain c
Lina20 [59]

Answer:

The option(4) is the correct answer to the given question .

Explanation:

The main objective of the IPAM server is providing the Stand-alone deployment and incorporated the Orion Framework also the IPAM server manages the ipv4 and ipv6 domains of the servers .

If their is no DHCP servers are being seen in the inventory of IPAM server we have the uninstalling the DHCP server in the IPAM server because After uninstalling the files the removed and correct files are  restored in the IPAM server .

Others Options are incorrect because they are objective of IPAM server Others Options do not solved the problem of view Inventory .So option(4) is the correct way to solve the problem .

4 0
4 years ago
Which of the following is an approach to debugging?
lora16 [44]
D) code restructuring
6 0
3 years ago
Read 2 more answers
Other questions:
  • The ListIterator interface
    13·1 answer
  • How many service packs did windows 7 have?
    9·1 answer
  • What does Mishler mean by the foreground-background interaction? How can this affect the photographs, based on the examples in t
    14·2 answers
  • Terry is building a Web site and wants to have three main links called Home, Product Info, and Contact Us. She will create a hie
    9·1 answer
  • LILLE VIC LUNCUL ANCI.
    5·1 answer
  • WILL UPVOTE ALL
    10·1 answer
  • Were so deleted files go
    15·1 answer
  • Each generation is set apart from the previous generation because of an innovation.
    6·1 answer
  • For (int j- 4; j &gt; 0; j--)
    9·1 answer
  • When people receive benefits just because they belong to a particular identity group, this is called
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!