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
Ilya [14]
3 years ago
11

C++

Computers and Technology
1 answer:
Nookie1986 [14]3 years ago
7 0

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

class Window //defining a class Window

{

private:

int width, height;//defining integer variable

public:

friend ostream& operator << (ostream& stm, Window& width)//defining a friend function that takes two parameters

{

return stm<<"a ("<<width.width<<" x "<<width.height<<") window"; //use return keyword that return its values

}  

Window(int width, int height): width(width), height(height)//defining parameterized constructor that inherit width and height in its parameters  

{}

};

int main() //Main method

{

Window w(80,90);//calling class constructor

cout<<w;//print object value

return 0;

}

Output:

a (80 x 90) window

Explanation:

In the above code, a class "Window" is defined that uses a friend function "ostream& operator" is declared that uses the "ostrea&" as a data type to hold two-variable "stm and w" in its parameter, and declared the parameterized constructor to hold value by inheriting width and height in its parameters.

Inside the main method, a class object is created that calls the constructor and uses the print method to print object value.

You might be interested in
What type of control structure is the default method of the computer reading code?
Delicious77 [7]
The answer is Selection. Hope this helped you
8 0
3 years ago
HELP ME PLZZ FFFAAASSSTTTT
Dahasolnce [82]
The answer has to be A because we you get your licensed suspended you are un able to drive for a while Intel you take the test again and or pay a fine
6 0
3 years ago
Read 2 more answers
Online activities among businesses
Masja [62]

Some of the online activities among businesses are:

  • SEO consultant. ...
  • Web designer or web developer. ...
  • Blogger. ...
  • Virtual assistant. ...
  • Affiliate marketer, etc

<h3>What are Online Activities?</h3>

This refers to the various activities that are done on the world wide web and is usually used by businesses to increase visibility, and in turn, revenue.

Hence, we can see that the use of online activities by businesses are important because the products and services for sale by businesses are advertised to target audiences through some of the aforementioned activities.

Read more about online activities among businesses here:

brainly.com/question/27172895

#SPJ1

3 0
1 year ago
The one who will defeat me in this typing race I will mark the one brainliest:
fredd [130]

Answer:

yes

Explanation:

can you send the link....

5 0
3 years ago
Read 2 more answers
Structured walk-throughs take place throughout the SDLC and are called _____ reviews, depending on the phase in which they occur
Tpy6a [65]

Answer:

design

Explanation:

Based on the information provided within the question it can be said that these are called design reviews. This is one of the most important parts of the development of a system. This focuses more on answering how something is going to be done in the system as opposed to answering what is going to be done for the system depending on the questions asked in the analysis phase.

5 0
2 years ago
Other questions:
  • Design and document an IP addressing scheme to meet ElectroMyCycle’s needs. Specify which IP address blocks will be assigned to
    11·1 answer
  • Assume that name has been declared suitably for storing names (like "amy" , "fritz" and "moustafa") write some code that reads a
    5·1 answer
  • What does the hard disk drive do? It stores all of the information on a computer. It controls a computer’s operating system. It
    12·2 answers
  • Why were mechanical calculators developed?
    8·2 answers
  • A growling noise is heard only when the driver exerts force on the clutch pedal. No noise is heard when the clutch pedal is up.
    14·1 answer
  • All states that have altered judicial selection techniques in recent years have adopted some form of:
    10·2 answers
  • Netflix shows to watch?
    11·2 answers
  • Derive the three-dimensional transformation matrix for scaling an object by a scaling factor s in a direction defined by the dir
    15·1 answer
  • Describe an example of a very poorly implemented database that you've encountered (or read about) that illustrates the potential
    12·1 answer
  • In order to personalize your desktop, you may click on: Start&gt;settings&gt;Personalization . . .
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!