Lab 5 while loops and error checking

Starting with Lab 5, you need to add error checking to all of your programs. If I do not specify which kind of error checking to use, you need to make that decision yourself.


Lab 5-1 (10 points)


Lab 5-2 (10 points)


Lab 5-3 (10 points)


Lab 5-4 (5 points)


Lab 5-5 (10 points)


Calculator (20 points)

 

Lab 5 Enrichment -- Student Choice

Complete the written exercises # 1, 2, 3, and 10 on pp. 195 - 199 in the text. Programming Exercise #12 on p. 202 (Challenge!)

Create a flow chart that shows the difference between a sequence of statements, a selection process, and a repetition sequence.

See p. 146 in your text for an example. You should create short pieces of C++ code to illustrate each flow chart.

Create your chart using a graphics program (i.e., draw in MS Word or Fireworks)

Programming Exercise # 8 on p. 267 Modify your calculator to use the Conditional Operator (?:). See pp. 179-180 for information on using this ternary operator. Programming Exercise #5 on page 200.

Create a bulletin board display that illustrates how logical operators work in C++.

Your examples should include both chart style operators and code examples. See pp. 152-153 for help.

Programming Exercise #6 on p. 267 Write a program that will illustrate the "classic" error of confusing the equality operator (= =) and the assignment operator (=).
Exercise #30 on p. 265 Exercise #20 on p 261 and #24 on p. 262-263 Create a bulletin board display that explains how "for" loops work. Give at least one code example.