Concepts Arrays Methods Loops Post/Pre Fix Operators Static
Concepts Arrays Methods Loops Post/Pre Fix Operators Static
Concepts
Arrays
Methods
Loops
Post/Pre Fix Operators
Static vs Non-Static Methods
Random numbers
Part I
Tic Tac Toe is a very popular game played by many children all over the world. You will re-create this game using your knowledge of arrays, methods and loops. Here are the program specifications: Build a 1-player game: the player against the computer. Find a resource online that explains how the game is played. This will be your documentation. Include the URL of your documentation in a comment. Use a two-dimensional arrayto represent the game board. Use a nested for loop to initialize the multi-dimensional array with some neutral value (a dash is a sensible choice). Include comments to clarify any code whose purpose is not obvious
You must have a separate method to do each of the following: Initialize the board (use a nested for loop) Print the game board to the console Input the player’s move Determine the computer’s random move (the computer doesn’t need to play intelligently, just legally) Determine a winner diagonally Determine a winner horizontally Determine a winner vertically
Feel free to create additional methods as needed!
You will find many examples of this game implemented on the web. Don’t submit one of them and claim it as your own original work!
This being said, if you want to dissect the various implementations you’ll come across to inform your own original work, go for it!
Part II
What is the difference between post-fix and pre-fix operators? Describe a programming scenario where the post-fix and the pre-fix operators impact the value of a variable in different ways. Could using the wrong operator be an issue?
Part III
Explain static vs non-static methods. Why do we use the keyword static for some methods and not for others?
Submission
Submit a Word document with the code for Part I pasted into the document. Screenshots of your program running on your computer will be in the Word document as well. The Word document will also include Part II and Part III.
Rubric
Part 1: 60%
Part II: 20%
Part III: 20%
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
WHATSAPP CHAT: +1 (781) 253-4162
Click ORDER NOW..
