Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Tic tac toe java eclipse

29/11/2021 Client: muhammad11 Deadline: 2 Day

Final Project Specification

Task
Enhance and correct a Tic Tac Toe game. The game is intended to be played against a computer.

The object TicTacToeBoard is initialized to indicate if the computer is the player 1 or player 2. Your task is to allow turns between the player and computer and to determine if a winner exists.

Keyboard input implies using the Scanner object.

Review Section 7.7 in the textbook.

Ideally, do 1 task at a time and test the results. The tasks are arranged so that the previous work will help with your testing.

The TicTacToeBoard class uses a Character class which is a wrapper class for char. It allows for the value null. Thus, the board values can be ‘X’,’O’ or null.

Deliverables
Submit the modified and corrected TicTacToe class and TicTacToeBoard class.

Be sure to submit both files. If you neglect to include a file, you must email me the missing file before the due date.

The file GuiBoard.java does not need to be included as there are no required changes.

Program Assumptions
The TicTacToeBoard is instantiated with the Computer as player 2. This setting also determines who is ‘X’ and who is ‘O’. ‘X’ always goes first.

In the TicTacToe board will have null values in the ‘squares’ when started.

Program Requirements
1. In the TicTacToe class and TicTacToeBoard class, modify the comment headers to include your name and student ID and semester.

2. In the TicTacToe class, set the existing Long variable named securityCode with a value as defined below. The TicTacToeBoard instance will do these validations for you. The program must simply load a number that qualifies. You may need to test this several times to create a qualifying security code.

a. securityCode must be a 16 digit number.

b. securityCode must start with the digit 2.

c. securityCode must not have sequential repeating digits.

i. Such as ‘4’ in 271744.

d. securityCode must not have sequential incrementing or decrementing digits. The next digit in the code cannot be 1 digit higher or 1 digit lower

i. Such as ‘45’ in 27145.

ii. Such as ‘54’ in 27154.

e. securityCode must contain every digit (0-9)

f. Being that securityCode is a Long variable type, it must be defined with a following L.

i. Long securityCode = 1234L.

g. You may optionally define the security code value with underscores for readability.

i. Long securityCode = 1234_4444_4444_4444L;

h. Do not prompt for a security code, it must be coded inside the TicTacToe class.

3. Create a loop in the TicTacToe class to play the game. This will be referred to as the ‘main’ loop for this process.

a. Create an int variable for row position. This declaration should be done only once and before the loop starts.

b. Create an int variable for column position. This declaration should be done before the loop starts.

c. Inside the loop, do the following tasks

i. Display “Your Turn” and prompt to enter a row number (0-2) to place your TicTacToe square.

ii. Prompt to enter a column number (0-2) to place your TicTacToe square.

iii. Call the setValue() method of the TicTacToeBoard instance with the input given.

1. setValue requires 2 parameters, Row and Column.

2. setValue is a boolean value method. It generates a true or false result. If the setValue method returns false, it was unable to process the request. When this occurs, display “Try again” and resume the loop at the beginning.

iv. Call the method hasWinner() of the TicTacToeBoard instance.

1. If hasWinner() returns true then

a. Call the method theWinnerIs() of the TicTacToeBoard instance and display the value returned from theWinnerIs() method as in the example below.

b. i.e. “The winner is X”

c. Exit the loop.

v. Call the method theComputersTurn() of the TicTacToeBoard instance. If this method returns a false value, display that “The computer has forfeited” and exit the loop.

vi. Do task iv again.

d. After the loop is completed – display “Game over” from the main() method.

4. The method setValue() in the TicTacToeBoard class can be called with out of range numeric values and create a runtime error. Modify the setValue method so that it returns false if data passed is not in the range of possible values. (0 – 2).

5. The TicTacToeBoard class does not have a way to indicate that all entries are loaded. Create a public method named hasSquaresAvailable() in the the TicTacToeBoard class that will report true if there are available squares or false is the board is full. (Review the existing checkFirstPlay() method for a similar example.)

a. Call this new method from the TicTacToe class inside the main loop.

i. Do this before calling setValue().

ii. Do this before calling theComputersTurn().

iii. If there are no remaining spaces then:

1. Display “No Available spaces”.

2. Terminate the loop.

6. The TicTacToeBoard class currently only checks rows and columns.

XXX XOX

OXO XOO

OOX OOX

It does not check diagonal values.

XXO XOO

OXX XOX

OOX OXX

a. Create a private method inside the TicTacToeBoard class named checkForDiagonalWin that will check for a possible diagonal win. This method does not need internal loops. Study how the private method checkRowOrColumnForWinner() works to understand what to look for. Be careful to check for null values before doing other compares as this can result in a null pointer exception.

b. Call the method created above in step 8a from the theWinnerIs() method in the TicTacToeBoard class.

5 points Extra Credit – Change the valid input range from 0 -2 to 1-3 for the row and column indicators as part of the processing in the TicTacToe class. Do not change the setValue method in the TicTacToeBoard class. All other work must be completed to receive extra credit.

Grading Rubric
Requirements
Percemtage
Working program with no crashes or run time errors.

No Eclipse Warnings – No TODOS, etc.

All COSC-Programming Guide Rules are honored.

25

Code contains useful comments. These can be per method and as desired.

5

Step 1

5

Step 2

5

Step 3

20

Step 4

15

Step 5

10

Step 6

15

12/6/2019 Service Specification Page 2

12/6/2019 Page 3

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Helping Engineer
Coursework Help Online
Assignments Hut
ECFX Market
Smart Homework Helper
Innovative Writer
Writer Writer Name Offer Chat
Helping Engineer

ONLINE

Helping Engineer

I am an academic and research writer with having an MBA degree in business and finance. I have written many business reports on several topics and am well aware of all academic referencing styles.

$23 Chat With Writer
Coursework Help Online

ONLINE

Coursework Help Online

I have worked on wide variety of research papers including; Analytical research paper, Argumentative research paper, Interpretative research, experimental research etc.

$42 Chat With Writer
Assignments Hut

ONLINE

Assignments Hut

I am a professional and experienced writer and I have written research reports, proposals, essays, thesis and dissertations on a variety of topics.

$41 Chat With Writer
ECFX Market

ONLINE

ECFX Market

I am an academic and research writer with having an MBA degree in business and finance. I have written many business reports on several topics and am well aware of all academic referencing styles.

$35 Chat With Writer
Smart Homework Helper

ONLINE

Smart Homework Helper

I have read your project description carefully and you will get plagiarism free writing according to your requirements. Thank You

$27 Chat With Writer
Innovative Writer

ONLINE

Innovative Writer

I have done dissertations, thesis, reports related to these topics, and I cover all the CHAPTERS accordingly and provide proper updates on the project.

$34 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Internal resistance of a battery lab report - Assignment due in 36 hours - Project management chapter 6 solutions - Microbiology case study paper - Mystic monk coffee case pdf - Stephen leacock public school - Agent loki international man of mayhem - How has globalization impacted the world’s political realm? - Titration gizmo answer key - Rasmussen accounting - Http ga water usgs gov edu wuww html - Skills required to work at starbucks - Group Dynamics Group Development - No soil cultivation crossword - Glenn colquhoun bred in south auckland - Application of hrm practices in a work related context - Ir spectrum of d limonene - 32.3 inches to cm - 112 waitomo street broadbeach waters - How to manipulate surds - Can pinworms cause appendicitis - 870 centaur road lavington - Health insurance database design - Write an essay of at least 500 words discussing the reasons for the two new auditing roles in Oracle 12c. Why did Oracle consider them necessary? What problems do they solve? How do they benefit companies? - Excerpt from food how altered essay - List nicks advantages in the great gatsby - 3 lbs to ounces - Bulbs by cecil taylor - Name the following compound according to substitutive iupac nomenclature - Reynolds intellectual assessment scales iq - A foolish stag meaning in urdu - Dawes hacksaw - What is rms customer number - V for vendetta movie questions - Chaos theory management ppt - At a construction site a pipe wrench struck the ground - Identify and evaluate marketing opportunities answers - 560 fe - Sqlmap pdf - Blank training matrix template - Hotel investment business plan - Average weight of a round bale of hay - Crofton and sharlston medical practice - How to interpret vertical analysis of income statement - What is test criteria - Discussion (min. of 100 words) - Apple capital structure - Week 7 340b - 7148 nw 100th ter tamarac fl 33321 - Marriages families and relationships 13th edition lamanna - John lewis harmony light - General inquiry cover letter - Define purpose statement in research - What is the most beautiful thing you ever seen? - Pooja ashar kangana english tutor - Fuel cells bbc bitesize - Jomo kenyatta the gentlemen of the jungle summary - The lost letters of pergamum thesis - Forked river brewing company case study - Book essay - David ulrich's hr model - Zakariyya bari abdul rahman - Where to find Udaipur Escorts VIP Call Girls Service? - Convert nfa to dfa with epsilon example - Standard chartered 150 banknote - Journal Article Analysis - Usyd jane foss russell building - Multichannel Marketing - As data overflows online researchers grapple with ethics - Penn foster information literacy lesson 1 exam answers - World language research foundation - Quantitative research survey questions - A wall of fire rising - Paraphrasing exercises for kids - I have 500 words a file and I wanted you to rewrite and rephrase - Little countable or uncountable - Everson v board of education - Arl collect text message - Chapter 5 medicine and law study guide answers - How many edges does a pentagon have - Hebburn marina boat club - Transcultural concepts in nursing care andrews and boyle - How you do anything is how you do everything quote - Warlow v harrison case brief - Norms and Nations Case Study - Volume license service centre - Preparation of smears and simple staining lab report answers - 1-5 rating scale excellent to poor - Multisim agilent oscilloscope - Kepnock state high school - Carbon dioxide fire extinguisher colour code - Contract for interior design services - Nursing conceptual model and metaparadigm concepts - Mo'omo'oga sa molia i talosaga lyrics - Ge lighting control relay panel - Nomenclature activity type i binary ionic compounds - Cultural Diversity - Architecture studio firm - Pr 2 3a journal entries and trial balance - The case for short words richard lederer