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
PLZ HELP HELP HELP ME I NEED ANSWER MATH​
irina [24]

The first one is 0 (0/3=0)

The second one is 3 (3/3=1)

The third one is 2 (6/3=2)

The fourth one is 9 (9/3=3)

Hope this helps you :)

4 0
3 years ago
Read 2 more answers
Write pseudocode instruction to carry out each of thefollowing computational operations.
iVinArrow [24]

Explanation:

A. Pseudocode to determine the area of a triangle given value the base b andthe height h:-

START

INPUT b

INPUT h

COMPUTE Area = 0.5*b*h

DISPLAY Area

STOP

B. Pseudocode to compute the simple interest earned in 1 year given the starting account balance B and annual interest rate I :-

START

INPUT B

INPUT I

COMPUTE Interest = (B*I*1)/100

DISPLAY Interest

STOP

C. Pseudocode to determine the flying time between two cities given the mileage M between them and average speed of the airplane :-

START

INPUT M

INPUT S

COMPUTE Time = M/S

DISPLAY Time

STOP

6 0
4 years ago
Accenture is one of several hundred companies that has signed on to the united nations global compact (ungc) business ambition p
DIA [1.3K]

Accenture goal of this pledge is to  to keep global warming below a 1.5 Celsius increase from pre-industrial levels.

<h3>What is Accenture most known for?</h3>

Accenture is known to be a body that is said to have a lot of range of service that they do offer such as strategy, management, digital, technology, and others.

Note that Accenture is said to be a global body that help in the area of security as well as others.

Therefore, based on the above Accenture goal of this pledge is to  to keep global warming below a 1.5 Celsius increase from pre-industrial levels.

Learn more about Accenture from

brainly.com/question/25682883

See full question below

Accenture is one of several hundred companies that has signed on to the United

Nations Global Compact (UNGC) Business Ambition pledge.

What is the goal of this pledge?

O to reverse all effects of global warming within the next decade

O to keep global warming below a 1.5 Celsius increase from pre-industrial levels

O to donate to charity in exchange for exemption from regulations

O to switch entirely to solar power at all office locations worldwide

8 0
2 years ago
You have installed five new 300 GB disk drives into a server running Windows Server 2012. You want to create a volume that will
Anuta_ua [19.1K]

Answer:

<em>New RAID-5 Volume </em>

Explanation:

RAID 5 <em>is a superfluous assortment of setup of independent disks using parity disk striping. </em>

Because all the disks display data and parity evenly, no single disk is a limiting factor. In the event of a disk failure, striping will also allow users to rebuild data.

RAID 5 classes have at least three and no maximum hard disk drives (HDDs). RAID 5 is deemed among the most stable RAID setups because the parity information is distributed across all drives.

5 0
3 years ago
Enter a formula or in sales G5 the calculate the difference between the attendance totals for 2018 and 2017
goldfiish [28.3K]

we will write year in column B and column c respectively

2017 and 2018

then we will add months of year from January to December in the cells range from A2 to A13

then we will choose cell g5 and will write the diffrence formula

g5=attendance of 2018 - attendance of 2017"

we put "=" sign to put an formula in excel

then finally we will use fill handle and drag it from g6 to g12

to copy the difference  formula

look at attached file

Download xlsx
4 0
3 years ago
Other questions:
  • Design an application for Bob's E-Z Loans. The application accepts a client's loan amount and monthly payment amount. Output the
    8·1 answer
  • Two powerboats are about to cross paths. what should the boat on the starboard (right) do?
    11·1 answer
  • Green Field county stadium is planning to conduct a cricket match between two teams A and B. A large crowd is expected in the st
    6·1 answer
  • What can your employer do to protect you from overhead power lines?
    13·1 answer
  • A class of cryptographic algorithms which requires two separate keys, one of which is secret (or private) and one of which is pu
    11·1 answer
  • What term best describes when the scope of the project changes from what was initially agreed upon?
    8·1 answer
  • which of the following are available options when importing a photoshop document into adobe illustrator
    7·1 answer
  • NO LINKS<br> Do you need to pay monthly to stream on Twitch?
    5·1 answer
  • What is the first step in finding a solution to a problem
    13·1 answer
  • What is resource pooling?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!