CPS 100E, Fall 1996 Inlab 5
Name:
Lab Section:
You should answer the following questions and either
turn in the sheet during lab, or answer the questions
when you submit your README file.
These questions are worth 2 out
of the 10 points for each lab. You don't need to get all
the answers right to get the 2 points, but you must try.
It's ok to ask a UTA or TA for help, but first you must
try to find the answers on your own.
-
Why do you think that an ID Number is needed for each CD?
- What other information might be useful to have for each CD? What
structs or class would change to add the information?
- Why was getline used rather than >> in reading the database (think
about group and title names.)
- A version of getline with three parameters is used in the
DoRead function from usedb.cc:
getline(input,price,':')
What purpose does the
third parameter have.
- How many times was the vector
myList in the CDlist resized when reading in
data/cd.dat assuming that was the first file that was read into the
program? (Hint: what is the value of INITIAL_SIZE and how many
CDs are stored.)