hw3 - b. is less than or equal to: _________ c. is not...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS16, W11, UCSB LabHW3: Worth 50% of Lab03 score (50 total points) Print this form, staple loose pages together, and write your answers on it. Accepted: on paper, at the *beginning* of *your* lab section on Thursday, January 27. Place on the front desk as you walk in, before getting seated. No email submission allowed. Name (2 pts): ______________________________________ Umail (2 pts): ______________________@umail.ucsb.edu Lab Section (2 pts) Circle one: 3:30 4:30 5:30 6:30 Read Etter Chapter 3 through section 3.3 (p. 101). Then answer the following items. 1. (20 pts; 5 pts each) Briefly define each of the following terms: a. Top-down design b. Stepwise refinement c. Pseudocode d. Structured program 2. (5 pts) What types of tests should be included in test data for a program?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3. (3 pts) Each of the following phrases describes the meaning of a C relational operator. Write the correct operator on the blank line next to each one. a. is greater than or equal to: _________
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b. is less than or equal to: _________ c. is not equal to: _________ 4. (8 pts) Complete the following table (known as a "truth table") by writing either True or False on each blank line. For example, the first blank asks for the result of (A && B) when A is True and B is True. A B A && B A || B True True _________ _________ True False _________ _________ False True _________ _________ False False _________ _________ 5. (8 pts) Let grade be a char variable, and let score be an int variable that has already been assigned a value. Write an if/else structure that sets grade to: 'A' if score is greater than or equal to 90, 'B' if score is at least 80 but less than 90, 'C' if score is at least 70 but less than 80, 'D' if score is at least 60 but less than 70, or 'F' if score is less than 60. ALSO BEFORE LAB: Skip ahead and read section 4.4 (especially pp. 169-171 about random integers). End of LabHW3...
View Full Document

Page1 / 2

hw3 - b. is less than or equal to: _________ c. is not...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online