Lecture Summaries - Week 4
Jump To:
[Lecture Index |
Previous Week's Lectures |
Next Week's Lectures]
Topics covered:
- How to wrap input-reading loops around single input solutions.
- Extending the grading program to handle multiple scores
(grade2.c).
- How to detect input errors when using input-reading loops.
- Extending the grading program to detect input errors
(grade3.c).
- A guide to building programs one piece at a time.
- Computing the average of the input
(avg.c).
Reading: Chapter 2.4 (through page 31).
Topics covered:
- An introduction to user-defined functions.
- How parameter passing works.
- What function prototypes are and why and we need them.
- Some example programs and functions:
- A program to draw a bar chart and the user-defined drawLine
function
(bar.c).
- Rewriting a version of our old box drawing program to use functions
(filledbox.c).
- A program to draw a hollow box written using functions
(hollowbox1.c).
- How functions actually make programs easier to understand.
- A program to draw a hollow box written without functions
(hollowbox2.c).
Reading: Chapter 2.5.
Topics covered:
- How to call and use functions that return a value.
- A picture of what happens when we call functions.
- A picture of what happens when functions return.
- Some examples of functions that return a value.
- Rewriting our old interest program to compound interest monthly
(intrate6.c,
page 32).
- Rewriting our hollow box function to return the number of stars
it wrote
(hollowbox3.c).
Reading: (No new reading for this lecture).
[EE150 Home Page |
Top Of Page]