Test 3 CSCI 130
Summer 2010
- Please answer each question fully, carefully and thoughtfully.
- No credit will be given for unreadable answers, please write neatly.
- Answer the questions in any order, but please number each answer.
- Make sure that your name is on your test.
- (5 points) Describe functional decomposition. How is this process used to solve problems.
- (10 points) Give an outline of a C++ program which demonstrates each. (Label each in your example)
- Function Prototype
- Function Call (or invocation)
- Function Definition
- Formal Parameter List
- Actual Parameter List (or arguments)
- (10 points) Describe the purpose for each of the items in the previous question.
- (5 points) Describe the three ways the actual parameter list (or arguments) must match the formal parameter list.
- (5 points) Describe the difference between pass by reference (or variable parameters) and pass by value (or value parameters)
- (5 points) Describe the flow of control when a function is invoked.
- (5 points) Write a Boolean function with takes a character and returns true if the character is a vowel (a,e,i,o,u) and false otherwise.
- (5 points) Write a complete C++ program which opens the file "Input.dat", reads in the integers stored in this file, and prints out the average, maximum and minimum of these numbers.