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
This is your code.
topjm [15]

Answer:

11

Explanation:

the second in the d aray is c because to call the first value, it is d[0]. So, to call c, you put d[2]. And the 0 of the c array, or the 0 of the 2 of the d array, it is 11

put it in a program. I use JS so if you have an Apple, open script editor and change the script from AppleScript to JavaScript and put in this code:

var a = [5, 10, 15];

var b = [2, 4, 6];

var C = [11, 33, 55];

var d = [a, b, C];

d[2][0];

3 0
3 years ago
Jeremy Bridges is an executive for Green Web Designs, where his primary role is to ensure the security of business systems and d
klasskru [66]

Answer:

Chief Security Officer

Explanation:

According to the given statement in the question the Jeremy's role in the company is "Chief Security Officer (CSO)".

The chief Security officer has the role of developing and looking on to the strategies and policies that are required for maintaining the operational, strategic, financial and reputational security  of the  overall company.

6 0
3 years ago
You have a Windows system that has both wired and wireless network connections. The wired connection is on the internal private
Oksana_A [137]

Answer: D. Enable the remote Assistance exception only on the private profile

Explanation:

4 0
2 years ago
How to delete audio from powerpoint​
Marta_Voda [28]

Answer:

To delete an audio clip, select the audio icon on the slide and press Delete.

Hope it helps!!!!

4 0
3 years ago
In GIMP, the ( ) displays the image that the user is currently working on
kotykmax [81]
I don'r know what your trying to use? GIMP is a free photo editing software just upload it to photobucket.
7 0
3 years ago
Other questions:
  • What is the output of the following program?
    8·1 answer
  • Steve is proofreading his memo and he notices that he has typed a phrase twice. Steve should _____.
    5·2 answers
  • How do forensic pathologist determine time of death
    13·1 answer
  • Web 2.0 has led to a shift just from consuming content towards what
    6·1 answer
  • Having a conversation with someone using a cellular phone is an example of _________ transmission. simplex full-duplex half-dupl
    11·1 answer
  • 3. Find the product of (a² +3a+5) x (a+7)​
    7·1 answer
  • Anyone wanna play among us UwU code is TAEQPQ
    15·2 answers
  • ______ is a disadvantage of EDI.
    8·1 answer
  • Where can i make a 3d animation for free ( pls don't trick me)
    12·1 answer
  • In the context of the data administration component of a database management system (DBMS), the acronym CRUD stands for _____.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!