CMSC 160
Fall 2018
09/13/2018
Learning about Functions
Due: Mon, Sept 17
beginning of class

You are allowed to work in pairs on this one if you wish, but it is not expected.   If you turn in a paper with two names on it, that is a statement that both students worked through all portions of the exercise together.

Assignment:    (3 points)

0)  A version of the programs we looked at in class on Wed are on the server.    You should retrieve the following files:
  • PoemsWithFunctions1.cpp
  • PoemsWithFunctions2.cpp
  • Poems.cpp
Reminder:   Get the sample programs on the server via the following command:
cp  ~scottmce/160files/filename  .  

Compile and run each of them.   Understand what they are doing.


1)   a)  Read Chapter 5 of the textbook.   

  • Note that we skipped Chapter 4 (for now).    Ths a couple of things in sections 5.6 and 5.8 may seem foreign.    Read them anyway and try to get as much as you can.
  • EXCLUDE  Sections 5.9 and 5.10
  • Attempt all Self-Check exercises.
b)   Come to class on Monday with answers to the following questions on paper:
Review exercises   R5.1,  R5.2,   R5.4,  R5.5,  R5.6,  R5.8

c)  Come to class on Monday with written code answers to:
Programming Exercises:   5.3,   5.4,  5.5b,  5.6, 5.11
You do NOT need to type these in , but you are welcome to.