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
Aneli [31]
4 years ago
6

Define the following Window class:

Computers and Technology
1 answer:
Olenka [21]4 years ago
3 0

Answer:

The following Window class are given below:

class Window  // define a class Window

{

private:   //access modifier

int width, height;   // integer type variable which is width and height

public:   //access modifier

Window(int w,int h)   //constructor that accepts two integer parameters

{

 width = w;

  height = h;

}

friend bool areSameSize(Window a, Window b)

{

 if ((a.height == b.height) && (a.width == b.width))

  return true;

 else return false;

}

};

Explanation:

According to the question: Firstly we have define a class which name is 'Window' and then we take two integer type data member and after that we have constructor that takes two integer type parameters and after all we have a areSameSize, friend function, which can take two objects and then it give output in the form of true or false, if they are the equal size and finally we check that if the width and the height  match then it returns the true and else it returns the false

You might be interested in
Sql statements that define the objects such as tables, indexes, triggers, etc. in a database are referred to as _______________
tatuchka [14]
Source statements i hope this helped

3 0
3 years ago
Which of the following were input devices for early portable computers?
nordsb [41]

Answer:

Notebooks

Explanation:

The answer is Notebooks

5 0
3 years ago
Which statement regarding socializers is true?
allochka39001 [22]

Answer:

The answer is: they are comparable to suit of hearts

Explanation:

The answer is: they are comparable to suit of hearts

7 0
3 years ago
Read 2 more answers
When you adopt a certain framework or strategy for solving a series of problems, you may fail to see other, more efficient ways
Olegator [25]
I believe it is called closed mindset. Closed mindset is when you fail to see other ways to your error and don't accept help or think you can improve.
7 0
4 years ago
Create your code from the story using code blocks.You must include at least one of each of the following blocks. You can draw or
Mazyrski [523]

Answer:

Como puedo hacerlo.

Explanation:

Me enseñas como hacerlo

6 0
3 years ago
Read 2 more answers
Other questions:
  • Why do bullies and criminals often say things online they otherwise wouldn’t say
    9·2 answers
  • One of the disadvantages of Audacity is that it has limited technical support since it is a free program.     true or false
    11·2 answers
  • The point where a row and column intersect is called a/an A. cell. B. axis. C. element. D. table.
    7·2 answers
  • Which course must first-time drivers in Florida take to be eligible for their Learner License?
    11·1 answer
  • On dynamic disks, the term partition is not used to define the space where a file system is installed. what term is used?
    6·1 answer
  • Xanadu was to be a full-blown multimedia computer that could embody any medium.a. Trueb. False
    6·1 answer
  • What are the advantages of using the internet as theinfrastructure for electronic commerce and electronicbusiness?
    6·1 answer
  • Kali, a Python programmer, is using the turtle module to write the word "hello." Which code should she use to indicate the locat
    9·2 answers
  • 1st person to answer gets brainliest for free after 5 mins I wont be handing out brainliest
    11·1 answer
  • How do i stop my computer from automatically connecting to a wireless network
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!