Winter 2005 UCLA CS 31 Section 1 (Shinnerl)

Programming Project 4 FAQ File

The most recently added question is shown last.
Questions are in boldface. Answers are in regular text.

Last Update: 8:20am Wed. 2/2

    > 1) Do we need to handle 2-word bus stop names on input?
    >     - if yes, is there a better way than cin  >> (string) bs1; ?
    >         should we use   cin.get() instead so we pick up the space between
    > words?
    
    Yes, use getline().
    
    >
    > 2) For the HH:MM[ap]m  time format, do you recommend using a string to  hold
    > the time, or is there a way to use two ints with a ';'  inbetween?  What do
    > you recommend?
    
    Read in HH as one int, ':' as a char, then MM as an int.
    E.g..
    
    >
    > 3)  Is the time between arrivals of consecutive buses at the same stop  a
    > single input?  So that each stop has the same wait time for the next  bus?
    
    Yes.  We assume the spacing (time) between consecutive buses on the same
    route does not change.
    
    


Project 4 home page