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
______ devices are high-performance storage servers that are individually connected to a network to provide storage for the comp
natali 33 [55]
NAS - network attached storage
3 0
3 years ago
I WILL GIVE BRAINIEST ANSWER AND THANKS IF YOU ANDWER THIS QUESTION!!!!
sesenic [268]
Access: full electronic participation in society.
Commerce: electronic buying and selling of goods.
Communication: electronic exchange of information.
Literacy: process of teaching and learning about technology and the use of technology.
Etiquette: electronic standards of conduct or procedure.
Law: electronic responsibility for actions and deeds.
Rights & Responsibilities: those freedoms extended to everyone in a digital world.
Health & Wellness: physical and psychological well-being in a digital technology world.
Security (self-protection): electronic precautions to guarantee safety.

IMPORTANT
Etiquette. Students need to understand how their technology use affects others. ...
Literacy. Learning happens everywhere. ...
Rights and responsibilities. Build trust so that if something happens online, students are willing to share their problems or concerns about what has happened.
6 0
3 years ago
When considering changing the content of a cell which button should you press to leave the cell as it originally was?
densk [106]
Esc key or cancel .........
7 0
3 years ago
Read 2 more answers
Example of personal professional highlights of styles of communication
tankabanditka [31]
Mediocre skills required.
4 0
3 years ago
A college professor teaching an introductory computer programming course is looking for a language to help students learn the pr
Art [367]
<h2>Scratch programming will be the right choice.</h2>

Explanation:

Here in the given situation, the target user is students who are new to programming languages. So "Scratch" would be the best choice.

Reason:

  • Programmer-friendly
  • User need not remember syntax since the syntax are provided and only place holders needs to filled
  • Like any other programming language we can debug by selecting the portion of the code and use double-click to view the partial output
  • simple GUI
  • It's a free-ware
  • It has basic looping structures
3 0
3 years ago
Other questions:
  • Which of the following is a full selector?
    12·1 answer
  • A range check that can be used in Microsoft access to calculate the data collected which is date and time
    10·1 answer
  • Case Study
    15·1 answer
  • The BaseballPlayer class stores the number of hits and the number of at-bats a player has. You will complete this class by writi
    13·1 answer
  • Identify similarities and differences of hibiscus leaves <br>​
    14·1 answer
  • What is the best motivation that you can do/give to make your employees stay? ​
    6·1 answer
  • Which of the following statements about the relationship between hardware and software is true? a) Hardware can be present in in
    9·1 answer
  • The data source in the document which has the information common to all documents. True or false 
    9·2 answers
  • Which part of the computer is responsible for managing memory allocation for all applications
    12·1 answer
  • Imagine that you need to prepare for three end-of-term tests. What steps will you take to make sure your study time is well spen
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!