Tic-tac-toe game assignment

Assignment Help JAVA Programming
Reference no: EM13172272

Assignment 1(Java): Tic-Tac-Toe Game (Assignment 1 is attached)

Attachment:- Tic Tac Toe game.docx
This assignment consists of two (2) sections: 

  • a Java program file
  • a screen shot of the output and a description of your Java program

Use the concepts and scenario from Assignment 1 and continue with the tic-tac-toe game design and development.
Section 1: Java Program File
Improve your Java program from Assignment 1. According to your design, the program must:

  • Use 2D graphics, instead of text, to display the Xs and Os in the grids of the square- shaped buttons.
  • Use either decision logic or recursion in order to determine whether or not a player wins the game. That is, every time the player draws an X or O on the board, the program checks all possible combinations in order to see if the player wins the game. Note:There are a total of eight (8) possibilities to win the game. Your program should check each possibility for the player. The eight (8) possibilities are:

          - 3 across in the first row
          - 3 across in the second row
          - 3 across in the third row
          - 3 vertical in the first column
          - 3 vertical in the second column
          - 3 vertical in the third column
          - 3 diagonal like a backslash
          - 3 diagonal like a forward slash

  • Display a message which announces whether or not the player has won the game.
  • Include a sound effect that plays to declare a winner.
  • Reset the game once the player has won.

Section 2: Screen Shot of the Output and Description of Your Java Program
Create a screen shot of the output and include a description about your Java program.

  • Create a screen shot which shows the output of your Java program.  
  • Include a one (1) page description of your program. Note: Use MS Word for your program description, and place the screen shot of the output from your Java program into the Word file as an attached image.
  • Include a one (1) to three (3) paragraph pseudocode that illustrates the way in which you use either decision logic or recursion in order to determine whether or not the player wins the game.

 
Assignment 2: (Java) 
The following method, numPaths, is supposed to count the number of paths,

but it has some problems. Debug the method.

 
int numPaths(int row, int col, int n)

{

if (row == n)

return 1;

else

if (col == n)

return (numPaths + 1);

else

return (numPaths(row + 1, col) * numPaths(row, col + 1))

}
 
 
Assignment 3 (PL/SQL): 

Write a PL/SQL block to achieve the following:

Find out the average salary in the Employees table.

Then check the salary of each employee in the Employees table. If the salary of an employee is less than the Average Salary in the entire table, increase the salary of that employee by 10%.  If the Salary of an employee is greater than the Average salary in the Employees table, then decrease the salary of that employee by 15%.

Provide complete code of your PL/SQL block using all relevant PL/SQL sections.

Note: All assignment need screen shot.

 

Reference no: EM13172272

Questions Cloud

Wind included with gravity-water and ice agent of erosion : Wind is included with gravity, water, and ice as an agent of erosion. In many national parks and other areas of natural beauty, statements are often made that credit wind as having "sculpted the landscape".
Critical reasoning and the author is by jerry cederblom : This assignment is based on critical reasoning and the author is by Jerry Cederblom and David W. Paulsen.This book is the seventh edition.
Use a diagram to illustrate how economic growth is shown : Suppose that the nation with the initial  PPF  given in the table enjoys a technological breakthrough that enables it to double the production of tractors at each level of food production. Use a diagram to illustrate how economic growth is shown usin..
Draw an rea diagram-data modeling and database design : Data modeling and database design,  Draw an REA Diagram,  Draw an REA diagram for Sparky’s revenue cycle only. Be sure to include cardinalities. State any assumptions you had to make.
Tic-tac-toe game assignment : Assignment 1(Java): Tic-Tac-Toe Game (Assignment 1 is attached),  Use the concepts and scenario from Assignment 1 and continue with the tic-tac-toe game design and development.  Section 1: Java Program File, The following method, numPaths, is suppos..
Determine the equivalent units of production : Determine the equivalent units of production with respect to (a) direct labor and (b) direct materials. Compute both the direct labor cost and the direct materials cost per equivalent unit.
State the column required for the best purification : Give the steps to prepare the column required for the best purification of 0.40g of crude product using silica
Compute the rate of water removal from the condenser : Calculate the rate of water removal from the condenser, the rate of dehumidified (1.50% water) air delivered to the house, and the flow rate and composition of the humid air entering the condenser
State what is the approximate ph at the equivalence point : What is the approximate pH at the equivalence point of a weak acid-strong base titration if 25 mL of aqueous formic acid requires

Reviews

Write a Review

JAVA Programming Questions & Answers

  Design and implementation of a hangman game

Design and Implementation of a Hangman game

  Create java program to describe inheritance and polymorphism

Create a Java program based on the geometric shapes example described at the beginning of this lesson using Classes Square, Triangle, Rectangle, and Circ leto help describe inheritance and polymorphism.

  Create and code a program uses three parallel numeric array

Create and code a program that uses three parallel numeric arrays of size 6. The program searches one of the arrays and then displays the corresponding values from the other two arrays. The program should prompt the user to enter a ProductID. Valid P..

  Create an array that stores in integers from the keyboard

create an array that stores in integers from the keyboard and then I can scan that array to check numbers in order, if the number I check is greater than the previous then I will set the next number in the array to the higher value.

  Design an adt for a two-color

Design an ADT for a two-color, double-stack ADT that consists of two stacks one "red" and one "blue" and has as its operations color-coded versions of the regular stack ADT operations.

  Write a program to find solution tocryparithmetic puzzle

Write a program (Crypta.java) that finds a solution to the cryparithmetic puzzle: TOO + TOO + TOO+ TOO = GOOD

  A java program where the user designates

a java program where the user designates how many games they would like to play (for example user inputs 10 games) then they play the game, if lets say there is a tie after 10 games the game continues until either the user of the computer wins by 2

  Java program to find a value at in index

Construct a main class named Array Program that generates an array of 50-integers, all ranging from one to one hundred.

  Implement a game called bunko-poker

Implement a game called Bunko-Poker. The gameplay is an easily programmed version of the popular game Yahtzee. Your program will make use of the supplied static functions Dice.roll() and, in cases where you might need the string ordered, Dice.ordered..

  Outline a test plan for a substantial real-life system

Describe how you would approach the design and testing process to ensure success and quality in the result and where are the risks? How are you going to address them?

  Write a code fragment that would printout the multiplication

Write a code fragment that would printout the multiplication table for the number 3 multiplied by (1-10) .

  Write a program in which a ball is released

Write a program in which a ball is released from a user-defined height and free-falls to the ground. The ball is pulled by earth's gravity of 9.8 m/sec 2 . Assume that each pixel represents 1 cm. Once the ball hits the ground

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd