Week1 Sun 12:00 PM Week1 Wed 12:00 PM No assignments have been posted yet. There will be an announcement on the main course web page when each assignment is posted.
MelodyMainprogram. You can run your own program and compare its console output to these logs to verify some aspects of your program's behavior.
You can compare your output to these logs in your program's console window by clicking File → Compare Output...
QuadraticEquation:#1, #2, #3, #4
ExamScores:#1, #2 (sentinel -42), #3, #4
GuessingGame:#1, #2, #3 (max 5)
Rocket:size 5, 3, 2, 8, 12
AsciiArt:(make up your own!)
Our assignments offer a solution 'demo' that you can run to see the program's expected behavior. On many machines, all you have to do is download the .jar file, then double-click it to run it. But on some Macs, it won't work; your operating system will say that it doesn't know how to launch the file. If you have that issue, download the file, go to the Downloads folder in your Finder, right-click on the file, and click Open, and then press Confirm.
Some Mac users see a security error such as, "cs106b-hw1-life-demo.jar can't be opened because it is from an unidentified developer." To fix this, go to System Preferences → Security & Privacy. You will see a section about downloaded apps. You should see a prompt asking if you would like to allow access to our solution JAR. Follow the steps and then you should be able to open the demo.
If all else fails, you could run the demo JAR from a terminal. Every operating system allows you to open a "terminal" or "console" window for typing raw system commands. Open your operating system's terminal or console window (Google if you need to learn how to do this), and then type:
cd DIRECTORY_WHERE_DEMO_JAR_IS_STORED java -jar JAR_FILE_NAME
For example, on a Mac machine, if your user name is jsmith12 and you have saved a demo JAR named hw1.jar in your Documents/106a directory, you would type:
cd /users/jsmith12/Documents/106a java -jar hw1.jar
Or on a Windows machine, if your user name is jsmith12 and you have saved a demo JAR named hw1.jar in your Documents/106a directory, you would type:
cd C:\users\jsmith12\Documents\106a java -jar hw1.jar
You are expected to follow the Stanford Honor Code.
Remember that we run similarity-detection software over all solutions, including this quarter and past quarters, as well as any solutions we find on the web.
If you need help solving an assignment, we are happy to help you. You can go to the LaIR, or the course message forum, or email your section leader, or visit the instructor / head TA during office hours. You can do it!