AP CS Assignments
Assignments by week:
Fall Term:
Winter Term:
Spring Term:
Monday, October 1
Description
Recursion: See Recursion
Homework
  • Write a solution for the MazeSolver lab. Import the source code and run the project. Due Friday at the start of class (you'll have other readings assigned between now and then, so don't wait to get started). A few hints:
    • You only need to write the solve method of the Solver class. All the other code has been written for you.
    • You should read over the Maze enumerated type (so you can see what the array will be filled with).
    • You should read over the MazeSolver class. It has methods to help you read in the maze and print it out to the terminal (with a delay) so you can debug your code.
    • You should start by just getting the program to read in a maze and print it out. Then worry about solving the maze.
    • You may want to write your own maze files to test scenarios that my files don't test (failure, for example).
    • You can pass the path to a maze file as the first parameter to the program (args), or you can paste a maze file into the console. You may need to hit control-D after pasting the maze file in before the program starts processing. To run the lab with the name of a file, it would look something like:

      javac *.java && java MazeSolver ../mazes/EasyMaze.txt
      
Tuesday, October 2
Description
Review / Odds and Ends
Homework
  • Tomorrow you'll have a multiple-choice test on recursion. The emphasis will be on tracing short programs and methods to determine their output. You will not need to write your own large programs.
  • Continue working on Maze lab, due Friday at the start of class.
  • You'll have some reading over the weekend. Feel free to start it early so it doesn't pile up on you.
Thursday, October 4
Description
Recursion Test
Homework
  • Complete Maze lab, due at the start of next class.
Friday, October 5
Description
Arrays and Methods
Homework
  • Read all of chapter 10 (pages 155-164) in Think Java.
  • Tonight we're going to install some additional developer software on your computer. We're installing a program called MacPorts, which in turn will install other programs.

    To do this, visit the MacPorts Installation Page and follow the directions for your version of macOS. A brief overview:

    1. Install/upgrade Apple's Xcode. You can get Xcode from the Mac App store.
    2. Once you have Xcode installed, open a terminal, run xcode-select --install, and click the Install button to install the required command line developer tools. Don't worry if you see a message telling you the software cannot be installed because it is not currently available from the Software Update Server. This usually means you already have the latest version installed.
    3. Run sudo xcodebuild -license and accept the terms of the Xcode license.
    4. Download the MacPorts installer package for your version of macOS and run the installer.
    5. If you've installed the software correctly, you should have a command named port that you can run in the terminal. Try running port version and if you don't get an error, you're all set.
  • Once MacPorts is installed, open a terminal and run sudo port install maven3. If prompted to "select" maven3, issue the requested command (e.g., sudo port select --set maven maven3).