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

5)What are the differences in the function calls between the four member functions of the Shape class below?void Shape::member(S

hape s1, Shape s2);void Shape::member(Shape *s1, Shape *s2);void Shape::member(Shape& s1, Shape& s2) const;void Shape::member(const Shape& s1, const Shape& s2);void Shape::member(const Shape& s1, const Shape& s2) const;
Computers and Technology
1 answer:
Stells [14]3 years ago
5 0

Answer:

void Shape :: member ( Shape s1, Shape s2 ) ; // pass by value

void Shape :: member ( Shape *s1, Shape *s2 ) ; // pass by pointer

void Shape :: member ( Shape& s1, Shape& s2 ) const ; // pass by reference

void Shape :: member ( const Shape& s1, const Shape& s2 ) ; // pass by const reference

void Shape :: member ( const Shape& s1, const Shape& s2 ) const ; // plus the function is const

Explanation:

void Shape :: member ( Shape s1, Shape s2 ) ; // pass by value

The s1 and s2 objects are passed by value as there is no * or & sign with them. If any change is made to s1 or s2 object, there will not be any change to the original object.

void Shape :: member ( Shape *s1, Shape *s2 ) ; // pass by pointer

The s1 and s2 objects are passed by pointer as there is a * sign and not & sign with them. If any change is made to s1 or s2 object, there will be a change to the original object.

void Shape :: member ( Shape& s1, Shape& s2 ) const ; // pass by reference

The s1 and s2 objects are passed by reference  as there is a & sign and not * sign with them. If any change is made to s1 or s2 object.

void Shape :: member ( const Shape& s1, const Shape& s2 ) ; // pass by const reference

The s1 and s2 objects are passed by reference  as there is a & sign and not * sign with them. The major change is the usage of const keyword here. Const keyword restricts us so we cannot make any change to s1 or s2 object.

void Shape :: member ( const Shape& s1, const Shape& s2 ) const ; // plus the function is const

The s1 and s2 objects are passed by reference  as there is a & sign and not * sign with them. const keyword restricts us so we cannot make any change to s1 or s2 object as well as the Shape function itself.

You might be interested in
What are five don’ts of using a computer
Sonja [21]

Answer:

well, as long as there are no right or wrong answers, don't:

look to closely at the screen, as it may mess up your eyes

hold a drink above the computer, as it may spill and cause "sticky keys"

go to sites that you know will give your a computer a virus, cause they cost hundreds of dollars to repair, and some aren't able to come out

go on illegal sites/do illegal operations to the computer itself, because then you won't have a computer

Explanation:

3 0
2 years ago
Read 2 more answers
The advent of mobile systems run by Android and other operating systems opens a wide range of new system management and security
sergeinik [125]

Answer:

bring your own devices

Explanation:

"bring your own devices" paradigm is getting popular since organizations are increasingly allowing users to perform work tasks <em>on their own</em> personal devices, It is preferred because of the benefits and ease for the user. On the other hand, this paradigm opens several security risks.

For example processing sensitive data on personal devices creates risks in case of data recovery or if the device is stolen or lost.  

Additionally, <em>control and monitoring</em> of organizational data is harder when users allowed to work on their personal devices. Thus <em>data leakage</em> and <em>public exposure</em> can happen more easily.

7 0
2 years ago
Su now wants to modify the text box that contains her numbered list. She accesses the Format Shape pane. In what ways can Su mod
Fiesta28 [93]
I believe its E she can insert a picture in the text book
7 0
3 years ago
Read 2 more answers
A(n) ________ is a wonder of miniaturization combining a CPU, GPU, and sundry other support logic onto a single silicon die, sav
erma4kov [3.2K]

Answer:

system on a chip (SoC)

Explanation:

4 0
2 years ago
What do customers use to access the internet, usually for a monthly fee?
kati45 [8]
To search things like answers,order things on Amazon,or go watch videos on Youtube
4 0
3 years ago
Other questions:
  • Audacity functions with a computer that has a minimum of ______ of RAM and a 300 MHz processor.
    12·2 answers
  • What happens it the offshore team members are not able to participate in the iteration demo due to time zone/infrastructure issu
    11·1 answer
  • Lisa managed incident response for a bank. The bank has a website that’s been attacked. The attacker utilized the login screen,
    9·1 answer
  • Assign jsonData with the parsed value of the stringData variable. Then, assign 29 to the points property in jsonData and assign
    13·1 answer
  • When an item in a menu is black, it means that _____.
    6·2 answers
  • Recall that in C++ there is no check on an array index out of bounds. However, during program execution, an array index out of b
    9·1 answer
  • Anyone trying to play fortnite ? im bored lol
    6·2 answers
  • ____ a device receiving a process variable
    12·1 answer
  • Kelly wants to change the text in a cell so that it is centered instead of left-aligned, where should she look to make this
    8·1 answer
  • How to write the algorithm to calculate the square of five numbers
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!