CSCI 3333.3 Data Structures
Spring 2013
Homework #1
Due: January 30, 2013 (Wednesday)
(1) This simple exercise is to familiarize you with the JDK environment.
(a) Install JDK into your computer. Open a command line prompt and issue the command "java -version". Get a screen shot, such as:
Note that you may need to set the system variable PATH.
(b) Mastermind is a popular code breaking game for putting the right color pegs to match the hidden solution. For example:
Compile the two java files, Mastermind.java.txt and MastermindTester.java.txt (saved as .java files) using javac. Note that these programs were written 15 years ago and may contain deprecated classes and methods. Run and play one game of Mastermind.
Turn in a sequence of screen shots of your command prompt that shows your successful compilation and execution of the program and a completion of one game. For example:
(2) This exercise is to familiarize you with Java development with Eclipse.
(a) Download and install Eclipse (either Java EE Developers package or Java Developers package: comparison). The Java Developers package may be easier for this course.
(b) Create a new Java project named <Lastname>_h1. For example, if your name is "Jane Doe", create the project named "Doe_h1".
(c) Import the Java files Mastermind.java and MastermindTester.java into the project. You should use the default option of separating .java and .class files into separate folders.
(d) Edit the file Mastermind.java and run the project within the Eclipse environment and play a game of Mastermind.
(e) Enlarge the Console view window so you can see more input and output.
Turn in a screenshot of Eclipse similar to the one below (except of the project name and possibly the console content.
To submit your homework, email your screenshots to the TA. Your screenshot file names should have the following format: <<lastname>>_h<<homework number>>_q<<question number>>_s<<screenshot number>>.<<file extension>>.