Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 438 Weeks Ago, 6 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Computer Science Posted 26 Apr 2017 My Price 10.00

Create a class TicTacToe that will enable you

(Tic-Tac-Toe) Create a class TicTacToe that will enable you to write a program to play TicTac-Toe. The class contains a private 3-by-3 two-dimensional array. Use an enum type to represent the value in each cell of the array. 

The enum’s constants should be named X, O and EMPTY (for a position that does not contain an X or an O). The constructor should initialize the board elements to EMPTY.

 Allow two human players. Wherever the first player moves, place an X in the specified square, and place an O wherever the second player moves. Each move must be to an empty square. After each move, determine whether the game has been won and whether it’s a draw.

 If you feel ambitious, modify your program so that the computer makes the moves for one of the players. Also, allow the player to specify whether he or she wants to go first or second. 

If you feel exceptionally ambitious, develop a program that will play three-dimensional Tic-Tac-Toe on a 4-by-4-by-4 board [Note: This is an extremely challenging project!].

 

 

 

Answers

(8)
Status NEW Posted 26 Apr 2017 06:04 AM My Price 10.00

-----------

Attachments

file 1493189535-Answer.docx preview (908 words )
(-----------Tic------------Ta-----------c-T-----------oe)----------- Cr-----------eat-----------e a----------- cl-----------ass----------- Ti-----------cTa-----------cTo-----------e t-----------hat----------- wi-----------ll -----------ena-----------ble----------- yo-----------u t-----------o w-----------rit-----------e a----------- pr-----------ogr-----------am -----------to -----------pla-----------y T-----------icT-----------ac------------Toe-----------. T-----------he -----------cla-----------ss -----------con-----------tai-----------ns -----------a p-----------riv-----------ate----------- 3------------by------------3 t-----------wo------------dim-----------ens-----------ion-----------al -----------arr-----------ay.----------- Us-----------e a-----------n e-----------num----------- ty-----------pe -----------to -----------rep-----------res-----------ent----------- th-----------e v-----------alu-----------e i-----------n e-----------ach----------- ce-----------ll -----------of -----------the----------- ar-----------ray-----------. ----------- Th-----------e e-----------num-----------’-----------s c-----------ons-----------tan-----------ts -----------sho-----------uld----------- be----------- na-----------med----------- X,----------- O -----------and----------- EM-----------PTY----------- (f-----------or -----------a p-----------osi-----------tio-----------n t-----------hat----------- do-----------es -----------not----------- co-----------nta-----------in -----------an -----------X o-----------r a-----------n O-----------). -----------The----------- co-----------nst-----------ruc-----------tor----------- sh-----------oul-----------d i-----------nit-----------ial-----------ize----------- th-----------e b-----------oar-----------d e-----------lem-----------ent-----------s t-----------o E-----------MPT-----------Y. ----------- A-----------llo-----------w t-----------wo -----------hum-----------an -----------pla-----------yer-----------s. -----------Whe-----------rev-----------er
Not Rated(0)