APCS Problem Set 10: Strings and File I/O

Michael Ferraro
mferraro@balstaff.org
Balboa High School
4 January 2016


Contents



4 Book Questions #1

For questions 2-10 in this section, you need to provide your solutions in the appropriate method stubs in a provided starter file (BookProblemsPS10.java). Follow the steps in the next subsection carefully to make sure your work is present in GitHub to be autograded later.

4.1 Setting Up Project in GitHub

Follow these steps at school. Be careful to use the same spelling and case for your files and directories as your work will be autotested later.
  1. Create project ps10 in workspace2.
  2. Import BookProblemsPS10.java from http://feromax.com/apcs/problemsets/PS10/downloads/ into project ps10.
  3. Perform an initial push of the ps10 project into GitHub using github-push.sh.
  4. Log in to https://github.com and verify you can find this file in your repository: ps10/src/BookProblemsPS10.java.

4.2 Answer the Questions

Remember to push your changes to GitHub regularly! (While at school, utilize the github-push.sh script.)
  1. Litvin Ch. 8, #1.


  2. Litvin Ch. 8, #2a -- in BookProblemsPS10.java.
  3. Litvin Ch. 8, #2b -- in BookProblemsPS10.java.
  4. Litvin Ch. 8, #3 -- in BookProblemsPS10.java.
  5. Litvin Ch. 8, #4a -- in BookProblemsPS10.java.
  6. Litvin Ch. 8, #5a -- in BookProblemsPS10.java.
  7. Litvin Ch. 8, #5b -- in BookProblemsPS10.java.
  8. Litvin Ch. 8, #6 -- in BookProblemsPS10.java.
  9. Litvin Ch. 8, #7 -- in BookProblemsPS10.java.
  10. Litvin Ch. 8, #11 -- in BookProblemsPS10.java.


10 Book Questions #2

10.1 Required Reading

Before getting started on the remaining book questions, read the chapter summary.

$\rightarrow$ Litvin & Litvin, Java Methods A & AB: §8.10

10.2 Answer the Questions

As with the first set of book problems, your solutions to the following must be part of the BookProblemsPS10 class, using the predefined method stubs.
  1. Litvin Ch. 8, #15 -- in BookProblemsPS10.java.
  2. Litvin Ch. 8, #20 -- in BookProblemsPS10.java.

10.3 Final Push to GitHub

Make sure your GitHub repository's ps10 project is up to date, including your work from the prior subsection. Use github-push.sh from school or the web interface at https://github.com otherwise.