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
Determine if the situation below is a safe practice: Julia needs to hang some industrial shelvinv, so she carefully selects the
hichkok12 [17]
I think Julia did good.











Its safe 
7 0
3 years ago
Read 2 more answers
you use the read csv() function to import the data from the .csv file. assume that the name of the data frame is bars df and the
kumpel [21]

Since you use the read_csv() function to import the data from the .csv file, the code chunk that lets you create the data frame is option C:  flavors_df <- read_csv("flavors_of_cacao.csv")

<h3>What is the aim of chunking?</h3>

Chunking aids in this process by dividing lengthy informational passages into smaller, easier-to-remember bits of information, especially when the memory is being challenged by conflicting inputs.

An R code chunk is a portion of executable code. Calculations will be repeated if the document is reproduced. The benefit of code chunk technology is the decreased possibility of mismatch.

The data frame can be created using the code chunk flavors df - read csv("flavors of cacao.csv"). In this section of code:

The data frame with the name flavors df will hold the information.

  • The assignment operator - is used to give the data frame values.
  • The function read csv() will import the data into the data frame.
  • It read "flavors of cacao.csv" in the file name.
  • the argument that the csv() function accepts.

Learn more about Coding from

brainly.com/question/25525005
#SPJ1

See full question  below

You use the read_csv() function to import the data from the .csv file. Assume that the name of the data frame is flavors_df and the .csv file is in the working directory. What code chunk lets you create the data frame?

Single Choice Question. Please Choose The Correct Option &#x2714;

A

read_csv(flavors_df <- "flavors_of_cacao.csv")

B

read_csv("flavors_of_cacao.csv") <- flavors_df

C

flavors_df <- read_csv("flavors_of_cacao.csv")

D

flavors_df + read_csv("flavors_of_cacao.csv")

5 0
1 year ago
Advantages of desktop publishing over traditional methods include       
Licemer1 [7]
From what my teacher taught us it would be c.
6 0
3 years ago
Discuss three ways you could (or currently do) use the Excel software in your personal or professional life. Provide examples an
professor190 [17]
Both in my personal and professional life, I use the Excel software in order to create tables and lists. It's much easier to do that in Excel rather than in Word, for example, because Excel was actually created for that purpose, whereas Word was created for writing, above all. I use Excel for work to create tables of various things, such as names, emails, payments, etc. whereas I use it in my personal life to create lists of things such as movies, books, etc.
3 0
3 years ago
Which of the following supportability analysis tools relies on scheduled maintenance to spot a failure before it impacts system
Schach [20]

Answer:

Option a is the correct answer for the above question.

Explanation:

RCM is an analysis tool that provides the function for analyzing the features of the physical assets for any organization. This tool is used to analyze the profits and loss problem of the organization so that an organization can earn more in his future.

The above question states that which analysis tool is used to tell about the loss factor of the organization then the answer is RCM which is stated on the option a. hence Option a is the correct answer while the other is not because--

  • Option b states about FMECA which is a tool used when the organization earns loss.
  • Option c states about LORA which is a repair tool.
  • Option d states about TAFT which is used all over the system.
8 0
3 years ago
Other questions:
  • What is the first stage of perception
    6·2 answers
  • The data selected to create a table must include
    10·2 answers
  • Open a command prompt on PC1. Issue the command to display the IPv6 settings. Based on the output, would you expect PC1 to be ab
    7·1 answer
  • 23. For the 16-bit binary number 1001 0101 1100 0011, show the effect of: a. A right shift of 4 bits with zero fill. b. A right
    13·2 answers
  • Who is president is US
    5·1 answer
  • Describe the basic features of the relational data model and discuss their importance to the end user and the designer. Describe
    9·1 answer
  • A final class can't be extended.TrueFalse
    5·1 answer
  • What is the result of executing the following code? You can assume the code compiles and runs. #include using namespace std; voi
    6·1 answer
  • What is meant by byte in computer terminology​
    6·2 answers
  • Select all the correct answers.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!