Due: Thursday, July 19th, 11AM PST
YEAH Hours: Friday, July 13th, 1:30-2:20PM (Gates B01)
May be done in pairs
Your third assignment is a Snowman game (based on the old "Hangman" game) that will give you practice with methods, strings and file-reading.
There is a starter project including all necessary files that you can access using the link below. Once you have the starter code set up, edit Snowman.java
so that the assignment actually does what it’s supposed to do (see the assignment handout), which will involve a cycle of coding, testing, and debugging until everything works. The final step is to submit your assignment.
This assignment may (optionally) be done in pairs. As a reminder, you may only pair up with others with the same section time and location.
Note: You may only use concepts covered up through lecture on Wednesday, July 11 to solve these problems. In particular, you may not use Java concepts you may have learned previously such as private instance variables, arrays, etc. However, you may use concepts we cover over the next week about graphics for any optional extensions if you would like. If you have any questions about what is ok/not ok to use, please feel free to ask.
If you would like to view them separately, the output files, which are already included in the starter code in the output
folder, are listed below as well for each task specified in the assignment handout.
Note: the "Debugging with Karel" handout still provides valuable debugging tips for Java programs! In particular, the debugger functions identically for Karel and Java programs.
import java.applet.*
; the handout has been updated to reflect this.
char
?
String
and do string processing if you would like the first character.
promptUserForFile
method to ask the user for a file name. No matter what file name I type, it never stops re-prompting me to enter the file name again and again. What is wrong?
Snowman
, so I renamed it to my own name such as DaveIsGreat
.
That is okay, right?