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

  Centralized and distributed data processing

Discuss in detail the difference between the centralized and the distributed data processing.

  Estimating the output

Provided: enum cropType {WHEAT,CORN,RYE,BARLEY,OATS} cropType crop;

  Write program using array that asks user to input 10 numbers

Write a program using array that asks user to input 10 numbers, then calculates the average of those numbers and finds out the total number that is greater or equal to the average.

  Show an appropriate message regarding the bonus

show an appropriate message regarding the bonus when the QuarterlySales for the SalesPerson falls within these ranges.

  Consider the fundamentals of object oriented programming

give an accompanying illustration for each of the fundamentals(example, code sample, etc.)Note: Try to use Java and not C++ for examples.

  Explain the fundamental components of a distributed system

explain the fundamental components of a distributed system.

  Designing program

Write down a Program that lets the user enter an amount as a float value representing a total in the dollars and cents.

  An example of the complexities involved in the case

We know there are problems of understanding natural languages as opposed to formal programming languages. As an instance of the complexities involved in the case of natural languages, identify situations in which the question "Do you know what tim..

  What is the rest balance at the end of one year

A student borrows 3,000 at an interest rate of 2 % per month on the unpaid balance. If the student pays $200 at the end of each month, what will be the remaining balance at the end of one year.

  The primary function of the steering committee

What do you find one of the most interesting advances in health care informatics and why.

  Decision-making process

Banner advertising on the Web sites helps activate the realization that there is a gap between the reality and desired state that happens in the --------------- stage of EC purchase decision-making process.

  Design a heat exchanger for the following duty

Fix a tentative geometry and perform all standard calculations and verify the adequacy of your proposed design in terms of operating parameters

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