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
Contact [7]
3 years ago
8

class bClass{public:void setX(int a);//Postcondition: x = a;void print() const;private:int x;};class dClass: public bClass{publi

c:void setXY(int a, int b);//Postcondition: x = a; y = b;void print() const;private:int y;};Which of the following correctly sets the values of x and y?a. void dClass::setXY(int a, int b){x = bClass.setX(a);b = y;}b. void dClass::setXY(int a, int b){x = bClass::setX(a);y = bClass::setY(b);}c. void dClass::setXY(int a, int b){x = a;y = b;}d. void dClass::setXY(int a, int b){bClass::setX(a);y = b;}
Computers and Technology
1 answer:
MaRussiya [10]3 years ago
6 0

Answer:

The answer to the given question in the option "a".

Explanation:

In the given c++ program the correct sets value of x and y is option a:

void dClass::setXY(int a, int b) //function implementation

{ //function body.

x = bClass.setX(a); //variable x hold value of setX() function.

b = y;  //variable b holds value of y.  

}

And other option are not correct that can be described as:

  • In option b, x is private variable of the base class that is inherit by the derived class but variable y is not part of the base class. that's why it is wrong.
  • In option c, x= a is correct but y=b is not correct. that's why it is wrong.
  • In option d we access the value of the private variable x that is a part of the base class but in this we not use any variable that holds its value. that's why it is wrong.

So the answer to this question is the option "a".  

You might be interested in
Which of the following statements is true of algorithms?
Agata [3.3K]

Answer:

Algorithms allow automation of complex task

Explanation:

I just did it

3 0
3 years ago
20. Modifying a report is easiest from what view. O A. Report O B. Layout O C. Print O D. Design
swat32
The answer is Design
8 0
3 years ago
Complete the following statements by choosing the correct answer from the drop-down menus.
LUCKY_DIMON [66]

Answer:

1) control panel

2) WYSIWYG HTML

3) website directory

4)website directory

Explanation:

In the website host’s <u>control panel</u>, there is a set of tools for organizing the website.

A <u>WYSIWYG HTML</u> editor lets the website creator type directly into the web pages or specific fields without knowing HTML code.

All website files need to reside in the  <u>website directory.</u>

The <u>website directory</u> is where all of the content will be stored.

<u>OAmalOHopeO</u>

7 0
3 years ago
________ is a markup language that allows for tagging selected elements of the content of documents for their meanings and is us
trasher [3.6K]

Answer:

E)nXML

Explanation:

XML is a short for Extensible Markup Language. It is a markup language like the Hypertext markup language (HTML) and are both used in the development of web applications. However while the HTML describes the content of the Web page that is the graphics, images and videos and how they are displayed, the XML handles the description of data and information formats, their storage and the transportation and sharing over the internet.

4 0
3 years ago
Read 2 more answers
Type the correct answer in the box. Spell all words correctly. What allows users to make long-distance calls over the Internet?
Mademuasel [1]

Answer:

Voice over internet protocol (VoIP)

Explanation:

It is a technology that allows you to make voice calls using a broadband Internet connection instead of a regular (or analog) phone line.

VoIP services convert your voice into a digital signal that travels over the Internet. If you are calling a regular phone number, the signal is converted to a regular telephone signal before it reaches the destination. VoIP can allow you to make a call directly from a computer, a special VoIP phone, or a traditional phone connected to a special adapter. In addition, wireless "hot spots" in locations such as airports, parks, and cafes allow you to connect to the Internet and may enable you to use VoIP service wirelessly.

7 0
4 years ago
Read 2 more answers
Other questions:
  • Write a program that opens a text file and reads its contents into a queue of characters. The program should then dequeue each c
    11·1 answer
  • Eric is working on a computer that has a device driver error. Eric can find the name of the device driver however the actual dev
    8·1 answer
  • A java program that calculates the balance of three months of $1000 and interest rate 6%
    9·1 answer
  • American Standard Code for Information Interchange (ASCII) would be classified at which layer of the OSI Model?
    13·1 answer
  • In terms of Technology software is defined as?
    11·2 answers
  • What data unit is encapsulated inside a packet?<br> frame<br> datagram<br> segment<br> session
    10·2 answers
  • Can someone help me please and thank u
    13·2 answers
  • In cell h13, insert a pmt function to calculate the payments for students who want to pay for their trips in three installments.
    11·1 answer
  • The most important hardware device for connecting supercomputers over a wide area
    10·1 answer
  • What improved image quality in televisions?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!