Announcements
We will have a simple 5 minute quiz at the beginning of the lab on Blackboard. Please sign in to your Blackboard account and finish the quiz individually. To access the quiz, go to CS 141 course on Blackboard, and click on Lab Quizzes, there you can find Lab 8 quiz. To access the quiz, you will need a password, which will be announced by the TA in the lab.
The full version of lab assignment is on Blackboard, under the link "Lab Assignments" > "Lab 8 Assignment". To access the assignment, you need a password, which will be announced by the TA in the lab.
You must work with a single partner, in a group of 2. You must take turns being the “driver” and the “navigator”. (If there are an odd-number of students in the class, your TA will make an adjustment.)
Lab Activity (Function definition and Function call)
In this lab, you will learn about function definition and how to call a function in another function. A sample code (.cpp) is provided to you. You task is to modify the code to define functions, to put parameters and to call functions properly.
In the .cpp file supplied to you, there are places that have been marked with ?????.
Try to replace ????? with the proper syntax so your program can work properly. By doing so, you will learn about function definition and function call.
There are total 6 functions in the file, each worths 0.5 points. As usual, full credit is 2, and if you solved all 6 functions, you get 3. (extra credit for the last 2 functions)
You can download the sample code at the bottom of this page.