Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below is start.cpp Purpose The purpose of this lab is to gain experience with passing values by reference. You will modify one function and write

image text in transcribed
image text in transcribed
Below is start.cpp
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Purpose The purpose of this lab is to gain experience with passing values by reference. You will modify one function and write another using this idea. Instructions 1. A piece of starter code called Start.cpp has been put on Canvas, start by downloading there should be no errors and it should run. If it does not, let your instructor know. 2. We want to convert the function addOne to instead of passing by value to the function to instead pass by reference, because of this the function will then return no values (in other words, the return type will be void). . Now that the function has been changed, uncomment the line of code in main that reads testAddOne(. This is a test that we wrote that when run will pass by reference a value to the function you have just converted. It will run a series of five tests against your function, any tests that pass will print an "OK" to the screen. After all tests have run, you should see a message saying ALL addone TESTS PASS". If you do not see this message, there is a problem with your code. 4. Now we want you to wirite another function called minusone. We have given you the prototype for the function at the top of the code, notice that it takes a reference as an argument. Once you have the function written, uncomment both the testMinusOne

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

please dont use chat gpt or other AI 2 9 5 . 4 6 0 0 1 2

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago