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
Establishing responsibilities, planning to best support the organization, acquiring validity, ensuring performance, conformity w
RUDIKE [14]

Answer: B. ISO 38500

Explanation:

ISO 38500 is an international Standard specifically developed by the International Organization for Standardization to oversee corporate governance of Information Technology. It lays down principles to guide directors and leaders of organizations on how to comply with regulatory requirements in the use of Information Technology within the firm.

The framework consists of six guiding principles in the use of I.T and they include; establishing responsibilities, planning or strategizing on how best to support the organization, acquisition of validity, ensuring performance, conformity with rules and respect of the human factor or behavior.

It was derived from the Australian Standard for Corporate Governance of Information and Communication Technology - AS 8015 - 200.

8 0
3 years ago
Martha is developing a software program in C++ and has a question about how to implement a particular feature. She performs an o
VLD [36.1K]

Answer:

A blog

Explanation:

A blog is a regularly updated website or web page, typically one run by an individual or small group, that is organised by posts.

7 0
3 years ago
Describe two benefits of the community of replacing the printed copy with an online version.
DiKsa [7]

Answer:

less costs

Explanation:

saves more money

easy to use for everyone

6 0
3 years ago
Match the parts of the website address with its correct explanation. http://www.usa.gov/Agencies/federal.shtm/​
meriva

sorry I was just testing something

6 0
3 years ago
Read 2 more answers
What software sent bill gates on his way to becoming one of the richest men in the world?
just olya [345]
The software that launched Bill Gates to riches is Microsoft. The software company became available for public purchase of shares in 1986. The company was however launched in 1975 by himself and the co-founder Paul Allen. The company was instrumental in the launch of the personal computer revolution. 
5 0
4 years ago
Other questions:
  • _______ are unprocessed facts that a computer feeds on.
    5·1 answer
  • Prior to the release of a movie, a film studio launches a website that allows people to play online games featuring actors in th
    15·2 answers
  • He has a new Wi-Fi router that connects wirelessly to a new desktop and two new laptops, in addition to multiple smartphones, ta
    8·1 answer
  • Why would it be a bad idea for gateways to pass broadcast packets between networks? What would be the advantages of doing so
    12·1 answer
  • The _____ is the button that you push to take a photograph. i think its B Help PLZ
    5·1 answer
  • The documents created in ms-excel is call what?​
    11·2 answers
  • Which of these is an example of rebranding ?
    6·2 answers
  • Write a program to accept two numbers<br>in two lines and find Square root of Squares<br>of thion​
    13·1 answer
  • When was there a time that you feel you may have “failed” at something?
    13·2 answers
  • Write algorithm and flowchart for the following<br>a.find the sum and average of any four numbers ​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!