InClassExercise13

InClassExercise13 - CS112: In-class Exercise 13 More on...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS112: In-class Exercise 13 1. Copy the project ttt-solution from the Public\Yuen(CS)\cs112BlueJ folder. Copy-paste the play() method into a new method called playLoop() method. Edit the playLoop() method so that it uses a loop to go through the moves. Feel free to make new variables if needed. Hint: you can use the gameOver() method of the TicTacToe object to know when to stop the loop. Boolean negation: The syntax for negating a Boolean expression is an ! in front of the expression. (You may or may not find this useful.) It is okay to test for wins and draws even when you know it can’t happen yet. But bonus pride points if you make your code efficient. 2. Make a copy of your files-12 project, and call it files-13. In the Testing class, modify the previous methods so they work on the new formatted data files. Write a void method, getMinFromFile(String filename) throws Exception that will open the file filename , then read the data from it, and finds the minimum of the numbers, and
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online