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
Thomas is preparing to implement a new software package that his project team has selected and purchased. Thomas should _____. G
anyanavicka [17]

There are different kinds of software. Thomas should Unlike create an RFI to collect information from the software vendor about their product's implementation.

  • A software package often belongs to several organization and the team or one going to install it in your machine.

A request for information (RFI) is known to be a standard business procedure. It is often used to collate basic information about the experience and skills of software development companies you'd like to work with.

Learn more from

brainly.com/question/15016176

4 0
2 years ago
HELP!!!!!!!! my keyboard keeps acting up every time I press a random key on my keyboard when it stops working it works perfectly
iogann1982 [59]

Answer:

try unplugging it and replugging it in, make sure your keyboard is clean, that there aren't any crumbs underneath the keys.

they using it on a different device and see if it does the same thing.

Explanation:

5 0
3 years ago
Explain why a CPU’s speed is affected by the number of buses.
Irina-Kira [14]

The Effect of the Motherboard's Bus Speed on CPU Speed:

 

 

A computer motherboard's bus speed has no effect on the installed CPU's speed. In a computer, the motherboard and the CPU are two separate components and do not alter how well the other one performs. However, the user experience is measured in how well the two perform together.

 

 

CPU

The CPU, or the computer's main processor, has a factory-determined operating speed. The processor's speed can be altered through the motherboard's BIOS settings on some computers. Hardware compatibility errors aside, the CPU's speed is not altered by any other part of the computer. However, the CPU is the fastest part of the computer and often gets held up by other hardware that can't keep up. CPUs handle all the computer's computational work outside of major graphical work performed by the GPU.

 

 

 

 

 

 

 

 

Bus

The motherboard's bus is the part of the device that transfers data between parts. The term "bus speed" refers to how quickly the system bus can move data from one computer component to the other. The faster the bus, the more data it can move within a given amount of time. The system's "Front Side Bus" connects the CPU to the computer's "Northbridge," which handles communication between the computer's RAM and the processor. This is the fastest part of the bus and handles the computer's most vital workload.

 

 

 

Bus Feeds the CPU

The CPU itself is pointless unless it has data to process; the bus’s job is to get that data to the CPU. The bus does not increase or decrease the CPU's speed but handles that data that flows in and out of the device, which plays a key role in how well the CPU performs. This is the point where the Bus can affect the CPU's performance output -- the CPU works in a cyclical process, with data going in and out of the device on a timed interval. If the CPU doesn't have any data to work with in a cycle, it wastes a cycle and doesn't process any data.

 

Insufficient Bus

An insufficient bus speed could leave a computer's CPU hanging as it waits for more information to process. This creates a "bottleneck," or the point at which one part of the computer slows down performance for another part of the system. If the bus is too slow, the CPU will waste a substantial amount of cycles and the computer user would perceive this as slower performance.

 

 

Sufficient Bus

A motherboard that has a sufficient or excessive bus speed for the CPU will offer the optimal performance speed. If the bus is fast enough, the CPU will consistently have new data to process ready to go when it completes a cycle. While the process isn't perfect and there always being unused cycles, a sufficient bus speed helps maximize how many of those cycles are used.

<span>Source: http://smallbusiness.chron.com/effect-motherboards-bus-speed-cpu-speed-70907.html</span>

8 0
3 years ago
Please use for - loop, mprintf() to write a Scilab program to convert temperature from Fahrenheit to Celsius from 0 to 300 with
Damm [24]

Answer:

We have the code given below

Explanation:

mprintf('%-20s%s','Fahrenheit','Celsius');

mprintf('------------------------------');

for x=0:20:300

  mprintf('%-20d%.2f\n',x,(x - 32)/1.8);

end

5 0
3 years ago
When you have an e-mail message to send to several people, where is the best place to find their e-mail addresses? the Bcc field
stich3 [128]

you can find them in the Bcc field if you have sent them an email before or if they are registered in you address book then they will be there as well

6 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose you want to delete an existing file from within word. What would you do?
    8·1 answer
  • Create an Entity-Relationship Diagram with the following requirements.
    6·1 answer
  • Which type of software is the most similar to database software?\
    5·1 answer
  • An application with a 150 GB relational database runs on an EC2 Instance. While the application is used infrequently with small
    10·1 answer
  • Rewrite each condition below in valid Java syntax (give a boolean expression): a. x &gt; y &gt; z b. x and y are both less than
    7·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    6·1 answer
  • Exercise 3.6.9: 24 vs. "24"5 points
    7·1 answer
  • Whats the flow in this code, and whats the risk that its creating and what can i do to fix it? (c language)
    10·1 answer
  • In the following shell scripting extract, the initial values of variables s, c and p are 0, 1, 1 respectively. What will be the
    6·1 answer
  • does an access control list looks for patterns of traffic between multiple packets and takes action to stop detected attacks?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!