CS120 Project 2 questions

Two questions about the project

  1. If there’s a period followed by one space at the end of the input line, does the period or the space end that sentence?

    The period ends the sentence in that case.

  2. Could you post more example inputs and outputs?
    • For input

      !What a bargain! Only 5 cents...do not see that very often.  Want to share ten?
      

      the output would be

      "!What a bargain!"
      "Only 5 cents...do not see that very often."
      "Want to share ten?"
      

      (three lines — be aware that your browser may divide some of the lines if your window is narrow).

    • For input

      Is this a bad sentence???or what
      

      the output would be

      "Is this a bad sentence???or what"
      

      (one line).

    • For input

      .
      

      the output would be

      "."
      

      (one line).

    • For input

      !. !! !.  ?
      

      the output would be

      "!."
      "!!"
      "!."
      "?"
      

      (four lines).

See also: Project 2 spec, CS120 homepage