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
I’ll give Brainly if u answer all please <br> ASAP
Yuki888 [10]

Answer:

Answers are: 38, 135, 23, 209, 53 & 181 respectively

Explanation:

8 0
3 years ago
Tin học đã làm thay đổi công tác văn phòng ngày nay như thế nào?
vlabodo [156]
Công nghệ đã thay đổi cách mọi người sử dụng để giao tiếp ở nơi làm việc hiện đại
6 0
3 years ago
The output of a combiner is normally fed into a
ankoles [38]

The output of a combiner is normally fed into a mask filter. Check more about output below.

<h3>What is output?</h3>

Output is known to be that which is gotten from the act of making of anything or the amount of a thing that is processed.

Note that he output of a combiner is normally fed into a mask filter as it is the first point of contact.

Learn more about output  from

brainly.com/question/20727977

#SPJ2

7 0
2 years ago
Read 2 more answers
"The network layer is responsible for transferring packets of data from the A.Source computer to the destination computer on adj
galben [10]

Answer:

Source computer to the destination computer via one of more networks

Explanation:

The network layer provides the means of transferring variable-length network packets from a source to a destination host via one or more networks.

3 0
3 years ago
Assume that an array of integers named a that contains exactly five elements has been declared and initialized. Write a single s
Alik [6]

array[0] = 2 * array[4];

5 0
3 years ago
Other questions:
  • Which item is essential to know before sketching a navigation menu flowchart
    15·2 answers
  • If someone receives a shock, or a piece of equipment is throwing sparks or arcing you should try to pull them away from the sour
    7·1 answer
  • A​ __________ is a commonly used tool for showing how the parts of a whole are distributed.
    11·1 answer
  • Now, Kim wants to add the technical terms she typically misspells to the PowerPoint built-in list. Which option should she use t
    15·2 answers
  • You are using a new release of an application software package. You think that you have discovered a bug. Outline the approach t
    14·1 answer
  • Convert 3BA.25 (base 14) to base 6 ? Show all arithmetic in decimal
    5·1 answer
  • A user complains because the social media apps on his mobile device always note his location. The user is worried about privacy,
    12·1 answer
  • Love me love me say that u love me fool me fool me go on and fool me : ) answer the question thx
    6·2 answers
  • What is the purpose of a router
    13·2 answers
  • Consider the following method:
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!