Questions
OBJECT ORIENTED PROGRAMMING Design two grid based games or two block based games in c++ In...

OBJECT ORIENTED PROGRAMMING

Design two grid based games or two block based games in c++

In some cases, the bulk of the project lies in producing a nice user interface, probably using the FLTK graphical library, while the algorithmic content is quite simple. In other cases, the bulk of the work is in devising and implementing the algorithms. Some projects are more difficult than others, but a good policy is to choose one which allows extensibility if you have more time, or a suitable half-way stopping point if it proves to be difficult.

  1. Grid based games, ranging from the simple such as Noughts and Crosses through more complex games such as Minesweeper and Battleships. See Levy Computer Gamesmanship pp. 30-39
  2. Block based games, such as Snake or Tetris.
  3. You can design hangman, pong , tic tac toe

Tool: Dev++, Visual Studio or any of your choice.

In: Computer Science

In the following table, the random variable x represents the number of laptop computers that failed...

In the following table, the random variable x represents the number of laptop computers that failed during a drop-test of six sample laptops. Use the table to answer the questions a) - e) below.
x 0 1 2 3 4 5 6

P(x) 0.377 0.399 0.176 0.041 0.005 0.000 0.000

a) Find and report the mean and the standard deviation of this distribution.

b) Using the range rule of thumb, identify the range of values containing the usual number of laptop failures among the six laptops that were tested. Is three laptops an unusually high number of failures among six tested? Explain.

c) Find the probability of getting exactly one laptop that fails among six laptops tested.

d) Find the probability of getting one or fewer laptops that fail among six laptops tested.

e) Which probability is most relevant for determining whether one laptop is an unusually low number of laptops to fail among six laptops tested: the result from part (c) or (d)? f) Is one laptop an unusually low number of laptops that fail among six laptops tested? Why or why not?

In: Math

You are to design two CONCEPUTALLY different synchronous state machines (Mealy and Moore) that perform the...

You are to design two CONCEPUTALLY different synchronous state machines (Mealy and Moore) that perform the task described below. You are allowed to use any type of flip-flop. However, I recommend that you use either JK or D flip-flops. There is a game called screwball. Every time a ball is put into play either player 1 (P1) scores a point or player 2 (P2) scores a point. A winner is declared when one player is ahead by 2 points. Starting with a score of 0:0 for P1 vs. P2, a game might progress as follows: 0:1 1:1 2:1 3:1 (P1 Wins!) Design a finite state machine that uses information about which player scores a point at each stage of a game to determine when a player wins and which player wins. Your design should include one reset input to initialize your win announcer (this may be a synchronous or an asynchronous input, as you desire). The outputs from your designs should indicate BOTH when a win has occurred and which player is the winner. Hint: You design should have one input (Ball) and two outputs (Player 1 (P1) and Player 2 (P2))

Please Use Mealy State. Thank You!

In: Electrical Engineering

Need C++ code for following with a document describing the code as well: Write a program...

Need C++ code for following with a document describing the code as well:

Write a program to implement the game of Tic Tac Toe Four.

The game is played on a 4 × 4 chessboard, within 2 players. The player who is playing "X" always goes first. Players alternate placing Xs and Os on the board until either one player has four in a row, horizontally, vertically, or diagonally; or all 16 squares are filled(which is a draw).

The program should be able to:

1) keep receiving the input from two players in turn.

E.g. receive both row index and column index from keyboard input

2) print the current chessboard pattern for every turn. Below is an example of chessboard printing, with ‘-’ for empty squares. You can use any other pattern you like to visualize the chessboard.

- - - -

- - - -

- - - -

- - - -

game start

- - - -

- - x -

- o - -

- - - -

during game

- - - -

- x x -

- o - -

- - o -

during game

o o o o

- x x -

- o - x

x - o x

“o” wins

3) determine if any player wins the game, or the game comes to a draw. Print out the final game result.

E.g. “Player1 wins” or “Draw”

Please submit all your source codes together with a document describing your code and ideas

In: Computer Science

We roll two fair dice (a black die and a white die). Let x = the...

We roll two fair dice (a black die and a white die). Let
x = the number on the black die − the number on the white die,record x as the outcome of this random experiment.

(a) What is the probability space?

In: Math

Two fair six sided dice are rolled. (i) What is the probability that the smaller value...

Two fair six sided dice are rolled.

(i) What is the probability that the smaller value of the two results is 3 given that the sum of the two results is 8?

(ii) What is the probability that the sum of the two results is at most 5 given that the number 2 appeared at least once?

(iii) What is the probability that the sum of the two results is 7 given that exactly one of the two results is odd?

In: Statistics and Probability

Packets arrive at an infinite buffer at a Poisson rate of 100 packets/sec, and are transmitted...

Packets arrive at an infinite buffer at a Poisson rate of 100 packets/sec, and are transmitted over a link of rate 1 Mbps in an FCFS manner. An arriving packet is a 100-bit packet with probability 0.2, a 1000-bit packet with probability 0.5, and a 10000-bit packet with probability 0.3 . Find (a) the average waiting time for a packet, and (b) the average number of packets in the buffer, in steady state.

In: Statistics and Probability

A university found that 20% of its students withdraw without completing the introductory statistics course. Assume...

A university found that 20% of its students withdraw without completing the introductory statistics course. Assume that 20 students registered for the course.

If required, round your answers to four decimal places.

a. Compute the probability that 2 or fewer will withdraw.

b. Compute the probability that exactly 4 will withdraw.

c. Compute the probability that more than 3 will withdraw.

d. Compute the expected number of withdrawals.

In: Statistics and Probability

The number of complaints received by a company each month follows a Poisson distribution with mean...

The number of complaints received by a company each month follows a Poisson distribution
with mean 6.


(a) Calculate the probability the company receives no complaint in a certain week.
(b) Calculate the probability the company receives more than 4 complaints in a 2-week
period.
(c) Over a certain month, calculate the probability the company receives fewer complaints
than it usually does with respect to its monthly average.

In: Statistics and Probability

30.Consider a coin that comes up heads with probability p and tails with probability 1 −...

30.Consider a coin that comes up heads with probability p and tails with probability 1 − p. Let qn be the probability that after n independent tosses, there have been an even number of heads. Derive a recursion that relates qn to qn−1, and solve this recursion to establish the formula qn = 1 + (1 − 2p) n 2

Using method other than Mathematical Induction

In: Statistics and Probability