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
What is one difference between a web page and a web application?
saul85 [17]

Answer:

A website is a group of globally accessible, interlinked web pages which have a single domain name. A web application is a software or program which is accessible using any web browser. Developing your website helps you in branding your business.

8 0
2 years ago
Which of the following statements is not true of web storage?
slavikrds [6]

Answer:

The data in web storage is passed to the server with every HTTP request.

Explanation:

There are basically two Web storage APIs Session storage and local storage.Both can store data up to 5MB. They are supported by every modern browser.You can store data in local storage indefinitely and for browser session in session storage.There is no data or information in HTTP request header.So we conclude that option 4 is the answer.

3 0
3 years ago
What may occur if a forever loop generates data but does not delete it?
zhenek [66]

Answer:

When an infinite loop occurs, the CPU will be maximized to 100% which results in the game's performance slowing down.

There are other implications of the data being generated and not deleted, but this question seems to focus on the effect of the loop itself.

5 0
2 years ago
Select the correct answer from each drop-down menu.
Thepotemich [5.8K]

Answer:

Narrative, Content

Explanation:

4 0
3 years ago
1)Ce procent de grasimi putem găsi in lapte ?
nexus9112 [7]
What are you say ? I don't understand this
6 0
4 years ago
Other questions:
  • Instructions: Type the correct answer in the box. Spell the word correctly.
    5·2 answers
  • The ________ defines every object and element on a web page.
    13·1 answer
  • Which of the following are actions a programmer could take when debugging a segment of code that would most likely lead to findi
    13·1 answer
  • Which steps do you follow to create a graph?
    5·2 answers
  • Concept of national sovereignty was established by the
    12·1 answer
  • Edhesive 1.7 code practice question 1
    8·1 answer
  • Describe the purpose of shell scripts. Provide one example to reflect the use of variables, constructs, or functions.
    11·1 answer
  • What is the purpose of a router
    13·2 answers
  • A large number of genetic codes are stored as binary values in a list. Which one of the following conditions must be true in ord
    5·2 answers
  • please write out an accurate code for the question below also please explain or I'll report you ( Thanks :) )
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!