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
Select the correct answer. What has enabled engineers to design slim and sleek television sets? A. using Nipkow disks B. increas
kykrilka [37]

Answer:

D. replacing cathode ray tube technology

Explanation:

In past few years traditional TV set are being replaced by LCD and LED tv technology. In Traditional TV sets, cathode ray tube is used that is large in size and heavy in weight. Due to this reason, the size of the TV set is too large.

The cathode ray technology is replaced with liquid crystal display (LCD) which may use plasma and Light emitting diode (LED) technology that are smaller in size that make TV sets slim and sleek. This the reason, that the size of TV is reduced significantly.

8 0
4 years ago
Objectives ** WILL GIVE BRAINIST PLEASE**
mamaluj [8]

Answer:

of which std this question is

8 0
3 years ago
Read 2 more answers
Why is it important to place the sheave wheel in exactly the right place on the head frame?
lord [1]

I guess because these cables are hooked up to a elevate that transport miners, machines and ore into and out of the mine.

7 0
3 years ago
THIS ISNT A QUESTION BUT IT HAS TO BE SAID. STOP PUTTING LINKS!!! This is supposed to be a app/site to help people not download
andreyandreev [35.5K]

Answer:

I VOUCH! I just asked two physics questions and almost downloaded a bunch of viruses because of a link someone posted as the "answer" on both of them

Explanation:

5 0
3 years ago
Which best describes an advantage of conceptual notes? They are great for studying vocabulary terms. They help students memorize
larisa86 [58]

Answer:

They make it easy to quickly see relationships between ideas.

Explanation:

A concept is an idea or a principle that could be used to understand an abstract notion. A conceptual note is one that makes the relationship between ideas easily discernible.

Without breaking much sweat or reading too deeply, the reader would find it easier to easily determine the relationship between ideas and how they relate to the subject matter. Conceptual notes can be taken on a laptop or paper.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Atoms may be bonded together by losing, gaining or sharing _____________.
    7·1 answer
  • I WILL MARK THE BRAINIEST!!!!!!!!!!!!! 50 POINTS!!!!!!!
    5·2 answers
  • Individuals and businesses have concerns about data security while using Internet-based applications. Which security risk refers
    13·1 answer
  • ________ consists of detailed, preprogrammed instructions that control and coordinate the computer hardware components in an inf
    11·1 answer
  • _____ are the most fundamental components of designing a training program that determine the amount of stress placed on the body
    6·1 answer
  • A canister is released from a helicopter 500m above the ground. The canister is designed to withstand an impact speed of up to 1
    15·1 answer
  • True / False<br> General purpose registers can be read and written by ML programs
    10·1 answer
  • Write any three type of looping structure with syntax​
    13·1 answer
  • Font size means the height of characters.<br>True<br>False​
    11·1 answer
  • Determine the number of character comparisons made by the brute-force algorithm in searching for the pattern GANDHI in the text
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!