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
Out of the following, find those identifiers, which cannot be used for naming Variables, Constants or Functions in a python prog
Alecsey [184]

Answer:1. Introduction to Python

1.1 A Simple Python Program

1.2 Creating and Running a Python Program

2. Virtual Data Storage

3. Statement Types

3.1 Input/Output Statements

3.2 The Assignment Statement

3.3 Control Statements

4. Another Example

5. Managing Complexity

5.1 Divide and Conquer

5.2 Using and Writing Functions

6. Object-Oriented Programming

6.1 What Is It?

6.2 Python and OOP

6.3 One More Example

6.4 What Have We Gained?

7. Graphical Programming

7.1 Graphics Hardware

7.2 Graphics Software

8. Conclusion

E X E R C I S E S

A N S W E R S T O P R A C T I C E P R O B L E M S

Explanation: I got you bruv.

7 0
3 years ago
Can anyone suggest me any good complete isekai anime..​
Fofino [41]
I suggest you watch hentaaii my boyy


8 0
2 years ago
Read 2 more answers
Steven is in a meeting and he is sharing a graph on his monitor with fifty other people. So that the others do not need to crowd
nevsk [136]
The answer is D) Projector because with a projector, its in the name project so it can anything u put on their, and put it on a virtual screen that can be put on a wall, so everyone can see.
8 0
3 years ago
________ tells users how to use software and what to do if software problems occur.
vitfil [10]

Answer:

Documentation tells users how to use software and what to do if software problems occur.

Explanation:

Documents and Standard Operating Procedures (SOPs) help users use the software that they want to use. This is an advantage to whoever is selling the software so that they don't receive customer complaints and people continue to buy their product.

4 0
2 years ago
Another name for a computer's operating system
nadya68 [22]

Answer:

core engine or system software.

Explanation:

just because

5 0
3 years ago
Read 2 more answers
Other questions:
  • When configuring a vpn server to automatically assign ​ip addresses to remote clients, how many ip addresses are in a single poo
    10·1 answer
  • In a Windows environment, __________ is a powerful tool that enables security administrators to share user and group definitions
    10·1 answer
  • Each computer on a network requires a unique way to identify itself and to refer to other computers. This is accomplished by usi
    8·1 answer
  • An administrator is helping a user connect a smartphone to a tablet via Bluetooth. What should the administrator do first?
    6·1 answer
  • You are given a 5-letter word (for example, abcde). Write a C-Program which outputs all possible unique 5 letter permutations of
    13·1 answer
  • Typing which capitals and exclamation points in an email is an example of
    14·1 answer
  • What are some of the opportunities that the stem program offers?
    15·1 answer
  • A(n) ________ address is the address that external entities use when communicating with your network.
    11·1 answer
  • Define a python functions that draw a pinwheel using the pinwheel function that has input paramiters that allows you to change t
    15·1 answer
  • Which of the following offers a combination of the features of ram and rom?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!