Java Graded Projects and one program

profilejamesblent
final_graded_project.pdf

Graded Project

Final Graded Project

OVERVIEW 1

YOUR PROJECT 1

SUBMISSION GUIDELINES 2

iii

C o n t e n t s

C o n t e n t s

1

OVERVIEW

Now that you’ve completed the study guide and required textbook reading, you’re ready to finish the TicTacToe game in the final project. You’ll add the application logic to handle each turn and determine the outcome of the game.

Make sure that you follow all directions completely and verify your results before submitting the project. Remember to include all required components in your solution.

YOUR PROJECT

In this project, you’ll finish the GUI version of the Tic-Tac-Toe game. This project will require you to rewrite the application logic found in the graded project for Lesson 2, but using object orientation this time. In the instructions, code will be refer- enced from the previous graded projects.

Instructions

1. In NetBeans, open the TicTacToeGUIGame project.

2. In the TicTacToeGUIGame.java file, make the following changes to the TicTacToeGUIGame class:

a. Add a new method named getOutcome that returns an Outcome enumeration. Use the winOrTie method in the Lesson 2 graded project as a guide.

b. In the takeTurn method, use the getOutcome method to determine whether to continue the game.

Final Graded Project

c. In the takeTurn method, display a dialog message that displays the winner or tie when the game ends. Optionally, you can clear the board and start a new game after it ends.

Note: You can use the following method to display a dialog message in the current window:

JOptionPane.showMessageDialog (this, “Both players tie.”);

3. Build and run the project. Verify it works as expected. Don’t be discouraged if it doesn’t run as expected right away. Try tracing your steps and using System.out.write statements to figure out where you went wrong.

SUBMISSION GUIDELINES

For your project, you should submit the final JAR file:

TicTacToeGUIGame.jar

To ensure the JAR file is built, you should click the Build button or hit the F11 key.

To find the JAR file with NetBeans, you need to go to the TicTacToeGUIGame project folder. To determine this folder, right-click on TicTacToeGUIGame project in the Projects panel. Copy the value for the Project Folder textbox using the keyboard shortcut CTRL+C. In Windows Explorer, paste the project folder path and hit the ENTER key. Copy the TicTacToeGUIGame.jar file from the dist folder to your desktop or any other temporary location.

Follow this procedure to submit your project online:

1. Log on to the Penn Foster website and go to My Courses.

2. Click Take Exam.

3. Attach your file as follows:

a. Click on the Browse box.

b. Locate the file you wish to attach.

c. Double-click on the file.

d. Click Upload File.

Graded Project Title2

4. Enter your e-mail address in the box provided. (Note: This information is required for online submissions.)

5. If you wish to tell your instructor anything specific regarding this assignment, enter it in the Message box.

6. Click Submit File.

Grading Criteria

Your instructor will use the following guidelines to grade your project.

Application behaves as expected 40 points

GUI meets the requirements 30 points

File contains no syntax errors 30 points

TOTAL 100 points

Congratulations! You’ve completed a simple application with a GUI. You could expand on this game by adding more graphics or animation or develop a new game like Connect Four or Mastermind.

Now, you are ready to take on the larger world of Java development!

Graded Project # 3