Need Help ?

Expert Answers

(Solved): Player Player is an interface. It defines only one method, t...

Player Player is an interface. It defines only one method, the method play. Play is void and has one input parameter, a reference to a Tic Tac ToeGame. HumanPlayer Human Player is a class which implements the interface Player. In its implementation of the method play, it first checks that the game is indeed playable (and prints out an error message is that is not the case), and then queries the user for a valid input, reusing the code that was in the main of the class Tic Tac Toe of assignment 1. Once such an input has been provided, it plays in on the game and returns. ComputerRandom Player Computer Random Player is a class which also implements the interface Player. In its implementation of the method play, it first checks that the game is indeed playable (and prints out an error message is that is not the case), and then chose randomly the next move and plays it on the game and returns. All the possible next moves have an equal chance of being played. Tic Tac Toe This class implements playing the game. You are provided with the initial part very similar to the one from as signment 1. The entire game is played in the main method. A local variable players, a reference to an array of two players, is used to store the human and the computer player. You must use that array to store your Player references You need to finish the implementation of the main to obtain the specified behaviour. You need to ensure that the first player is initially chosen randomly, and that the first move alternate between both players in subsequent games. Below is another sample run, this time on a 4x4 grid with a win length of 2. The human players makes a series of input mistakes along the way.
X to play: 2 Player 2's turn Player l's turn TXT 1 101 X to play: 2 This cell has already been played 1 X 1 1 101 X to play: -1 The value should be between 1 and 16 IX II
X to play: 3 Game over | XX1 101 Result: XWIN Play again (Y)?:y Player 2's turn. Player l's turn. L XL O to play: 11 This cell has already been played XL O to play: 12 Player 2's turn. Player 1's turn. TIX TIX0 TIL
Tictactoe. Notepad Edit Format View File Help public class Tic Tac Toer - mains/b> of the application. Creates the instance of Game Controller - and starts the game. If two parameters line and column are passed, they are used. - Otherwise, a default value is used. Defaults values are also - used if the paramters are too small (less than 2). • para args command line parameters public static void main(String[] args) { Student Info.display(); Tic Tac ToeGame game int lines 3; int columns 3; int win - 3; try if (args.length > 2) lines - Integer.parseInt(args[]); if(lines 2) lines - Integer.parseInt(args[]); if(lines(2) System.out.println("Invalid argument, using default..."); lines - 3; columns - Integer.parseInt(args[1]); if(columns= 3) win - Integer.parseInt(args[2]); if(win ) System.out.println("Invalid argument, using default..."); win = 3; if (args.length > 3){ System.out.println("Too many arguments. Only the first 3 are used."); } catch (Number FormatException e) { System.out.println("Invalid argument, using default..."); lines - 3; columns 3; win = 3; playerl players; // YOUR CODE HERE - Type here to search

(Solved): You are given the following points in the plane: (1, 3),(2, ...

You are given the following points in the plane: (1, 3),(2, 5),(3, 7),(5, 11),(7, 14),(8, 15),(10, 19). You want to find a line y = ax + b that approximately passes through these points (no line is a perfect fit). Write a linear program (you do not need to solve it) to find the line (find a, b) that minimizes the maximum absolute error:

\max_{1<i<7}|y_i - ax_i -b|

 

(Solved): 1. Why do underwater welders make more money tha...

1. Why do underwater welders make more money than people who feed gorillas at a zoo? Use two graphs to assist your answer.

2. What is the marginal revenue product of labor? How could an economist use this concept to evaluate the worth of a hairdresser? Could it be used to evaluate the worth of a preacher at a church? Why, or why not?

3. When Bob Griese played football for the Miami Dolphins, he was underpaid every year of his career.Why?

4. Where do nonpecuniary wages enter into the earnings of lifeguards, nature photographers, and military snipers?

(Solved): All firms under collusive oligopoly model maxim...

All firms under collusive oligopoly model maximise profit but under leadership model only the leader maximizes profit .Discuss the statement with appropriate diagrams

(Solved): b.Explain the relationship between interest rate...

b.Explain the relationship between interest rates and unemployment. How do changes in the interest rate affect the level of unemployment in the economy?
Answer:

c.Consider the relationship between interest rates and inflation.
(i)Explain the difference between real and nominal interest rates.
Answer:

(ii)If the Fed takes actions that will change interest rates, how is this likely to affect inflation?
Answer:

(Solved): a.The AD/AS model describes changes in the econo...

a.The AD/AS model describes changes in the economy by relating real GDP (output) and the price level.
(i)Compare and contrast the Keynesian portion of the AD/AS model with the classical portion of the AD/AS model, and explain how the level of production is determined in each situation. Use graphs to explain your answer.
Answer:

(ii)Compare and contrast changes in aggregate demand and changes in aggregate supply in the AD/AS model. Use graphs to explain your answer.

(Solved): Icy Candy announces a 1 for 8 bonus issues. Icin...

Icy Candy announces a 1 for 8 bonus issues. Icing Candy shares are trading at $9.00 before the bonus issue.
a. Calculate the theoretical price of Icing Candy’s shares immediately after the bonus issue.
b. Casper has 1,000 shares in Icy Candy before Icing Candy announced the 1 for 8 bonus issue.
i. How many bonus shares will Casper entitle to?
ii. Find the value of Casper’s stockholding in Icy Candy before and after the bonus issue.

(Solved): c.Many people believe trade deficits are a serio...

c.Many people believe trade deficits are a serious problem and need to be eliminated.

(i)Explain the three actions the Fed could take to reduce the trade deficit in the U.S., and explain carefully how these actions would result in a reduced trade deficit.



(ii)What effect would these three actions from part I of the question have on GDP? Describe the effects on each of the components of aggregate demand. Include an AD/AS graphical analysis of your answer.



(Solved): Assuming the quick ratio for a competitor of Que...

Assuming the quick ratio for a competitor of Queen Company for 2018 is 1.90, comment on
Queen Company’s quick ratio.

(Solved): Eason plans to open a do-it-yourself dog bathing...

Eason plans to open a do-it-yourself dog bathing center in Petland. The bathing equipment will cost $50,000. Eason expects the after-tax cash inflows to be $15,000 annually for 8 years, after which he plans to scrap the equipment.
a. Find the project’s payback period.
b. What is the project’s discounted payback period if the required rate of return is 10%?
c. What is the project’s net present value (NPV) if the required rate of return is 10%?
d. What is the project’s Profitability Index (PI) if the required rate of return is 20%? Should the project be accepted according to the rule of PI?