Write a program that allows two individuals to play

Assignment Help Computer Engineering
Reference no: EM13323013

Write a program that allows two individuals to play a single game of Tic-Tac-Toe.

Rules and Requirements:

  • You are to re-write Program 08, using a char array to represent the board instead of a string.
  • You must use a the following char Array to represent the nine squares of the board. Notice: board[0]will not be used.
    char [] board = new char[10];
    
  • You must re-write (and use) all of the methods indicated in Program 08, those given (by definition) as well as those prescribed (by heading), to take and use the array board (instead of the String board).
  • Your program may use additional methods where appropriate.
  • You must write a main method that allows a pair of users to play a game of Tic-Tac-Toe such that:

    Each turn of the game:

    • It must be clear whose turn it is X's or O's.
    • The current board configuration must be displayed in a reasonable format.
    • An available square number [1, 9] is obtained from a player and is used make their (valid) move on the board.
  • The game ends when there is a Tic-Tac-Toe (win) or all the positions of the board are full (stalemate). A simple report indicates which has occurred and in the case of a win, who has won X or O.

Reference no: EM13323013

Questions Cloud

Find the recoil velocity of the man relative to the ice : Starting from rest, two skaters "push off" against each other on smooth level ice, where friction is negligible. One is a woman and one is a man. find the recoil velocity of the man relative to the ice
Write an applet that draws the house shown : Write an applet that draws the house shown. When the user clicks on the STOP sign, audio of your choice should play.
Find the low point of curve of the intersection at station : The curve is 750-ft long,and the minus grade of 3.6 percent intersects the plus grade of 6.2percent at station 240 + 80.00. Calculate the low point of thecurve if the intersection at station 240 + 80.00 is at elevation426.84.
Explain the molar enthalpy of fusion for ice : Suppose that 33.55 g of ice at -12.9°C is placed in 54.72 g of water at 99.8°C in a perfectly insulated vessel. Calculate the final temperature. (The molar heat capacity for ice is 37.5 J K-1 mol-1 and that for liquid water is 75.3 J K-1 mol-1. Th..
Write a program that allows two individuals to play : Write a program that allows two individuals to play a single game of Tic-Tac-Toe.
What type of aquifer material do you expect in the location : The elevation of water in well A is 300m above sea level and well B is 350m above sea level. The wells are 45m apart. A dye test reveals that the specific discharge between the two wells is about 2.75m/day.
Organization with a well-known supply chain-overall strategy : Consider any organization with a well-known supply chain and overall strategy and will describe how the supply chain strategy supports the overall strategy of the firm and helps them achieve their overall objectives. In a 3 page paper discuss the str..
The oxygen content of a fuel to ensure complete combustion : The oxygen content of a fuel that is recommended in order to ensure complete combustion about 2.7%. (a) Consider a case where methyl tertiary butyl ether (MBTE) is to be added to the conventional gasoline.
Determine the volume of traffic across the bridge : A bridge has been constructed between the mainland and an island.The total cost (excluding tolls) to travel across the bridge isexpressed as C = 50 + 0.5V, where V is the number of veh/h and C isthe cost/vehicle in cents.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Wordpad application

Whenever you select the print from WordPad application. Which printer among the three starts to print? Why? Explain is it possible to state which printer to print from the WordPad or any other application? Explain why?

  Why the binary number 3f62h has nine binary ones

Write down a program that takes the smaller of two words stored in memory locations DS:1234h and DSL=:5678h and store in register AX.

  What sorts of measures would you recommend

What sorts of measures would you recommend for minimizing changes to project schedules caused by non-availability of required human resources, or conflicts with the personal plans of project workers (e.g. vacations).

  In short describe the situation inside your company

It is likely that your organization uses various decision-support programs, as in  programs that automate production, programs for resource optimization, and so on.

  Write down a simple c++ cash register program

The program must ask for the customer's first name and last name initials. Use 2 different variables, one for the first name and one for the last name.

  Network security planning

Securing a large internetwork is considered as a daunting challenge. Cloud computing and the social networks add to this complexity. In two to three (2-3) pages.

  Algorithm for finding two closest numbers in the input list

plan an algorithm for finding two closest numbers in the input list. What is the time complexity? Is it possible to improve the algorithm if the input is a sorted list.

  How bandwidth affects the average consumer of technology

This solution provides the learner with an understanding on why it is important to understand the bandwidth needs for wide area networks. Further, this answer provides a dicussion on how bandwidth affects the average consumer of technology.

  Define types of bagels can''t be mixed in the same bin

Processing - Forty bagels will fit in a bin. Different knids of bagels can't be mixed in the same bin. Using the sample input above, the store will need two bins for plain bagels, on bin for cinnamon-raisin bagels and for bins for sesame seed bage..

  Construct a legal tree of gates

Construct a legal tree of gates which minimizes the total cost of the tree subject to the constraint that the arrival time at the output is no greater than tmax. Use dynamic programming to solve this

  How can a relation be organized in mass storage

How can a relation be organized in mass storage.

  Left most derivation

A->a|aS|bAA, B->b|bS|aBB, For the string “aaabbabbba” determine a Left most derivation.

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