# Prg 410 Week 3 Assignment Essay

946 Words
Jun 1st, 2015
4 Pages

PRG 410 WEEK 3 ASSIGNMENT

http://www.coursehomework.com/product/prg-410-week-3-assignment/

Contact us at:

+1 315-750-4434

help@coursehomework.com

PRG 410 WEEK 3 ASSIGNMENT

C++ Programming I

PRG-410

Assignment#3

Problem 1: [marks 20]

Write a program that implements simple game scenario. Game has two-player or a three-player MODE.

For each MODE you have to choose among four HEROs. These are ALPHA, BRAVO, CHALIE and

DELTA. You have to design and implement proper notation for each MODE and implement them accordingly using appropriate conditions e.g., First player is selecting ALPHA then Second Player can’t select ALPHA.

Against each MODE ask five values for each player if:

• Ask input range is between (1-100) player

http://www.coursehomework.com/product/prg-410-week-3-assignment/

Contact us at:

+1 315-750-4434

help@coursehomework.com

PRG 410 WEEK 3 ASSIGNMENT

C++ Programming I

PRG-410

Assignment#3

Problem 1: [marks 20]

Write a program that implements simple game scenario. Game has two-player or a three-player MODE.

For each MODE you have to choose among four HEROs. These are ALPHA, BRAVO, CHALIE and

DELTA. You have to design and implement proper notation for each MODE and implement them accordingly using appropriate conditions e.g., First player is selecting ALPHA then Second Player can’t select ALPHA.

Against each MODE ask five values for each player if:

• Ask input range is between (1-100) player

*…show more content…*
(Paper wraps rock.)

• If both players make the same choice, the game must be played again to determine the winner. Problem 3: [marks 10]

Write a program to get the greatest common divisor of two integers. The greatest common divisor of two integers is the value that evenly divides each of the numbers. For example the even divisor of integer 4 are: 1,2 and evenly divisors of integer 10 are: 1,2,5. So the greatest common divisor of these two integers is 2.

Problem 4: [marks 10]

Write a program by defining a function “power” to find and return the exponential power i.e., base^exponent. For example, if base = 2 and exponent = 3 then function should return 8.

Problem 5: TIC TAC TOE [marks 40]

Tic Tac Toe is a two player game with nine boxes having three rows and three columns. First player one makes his turn, which is followed by player two turn. Player one will fill the box with mark “X” and player two mark with “O”. There will be nine turns in total and at any stage of game the player who succeeds in placing three marks in a horizontal, vertical, or diagonal row wins the game.

You have to implement this game without using arrays. Implement proper checks according to the rules of game. If a player mark at any position then that position cannot be accessed by any of the players.

You can use internet to learn the rules of game.

Click Here to Buy this;

http://www.coursehomework.com/product/prg-410-week-3-assignment

• If both players make the same choice, the game must be played again to determine the winner. Problem 3: [marks 10]

Write a program to get the greatest common divisor of two integers. The greatest common divisor of two integers is the value that evenly divides each of the numbers. For example the even divisor of integer 4 are: 1,2 and evenly divisors of integer 10 are: 1,2,5. So the greatest common divisor of these two integers is 2.

Problem 4: [marks 10]

Write a program by defining a function “power” to find and return the exponential power i.e., base^exponent. For example, if base = 2 and exponent = 3 then function should return 8.

Problem 5: TIC TAC TOE [marks 40]

Tic Tac Toe is a two player game with nine boxes having three rows and three columns. First player one makes his turn, which is followed by player two turn. Player one will fill the box with mark “X” and player two mark with “O”. There will be nine turns in total and at any stage of game the player who succeeds in placing three marks in a horizontal, vertical, or diagonal row wins the game.

You have to implement this game without using arrays. Implement proper checks according to the rules of game. If a player mark at any position then that position cannot be accessed by any of the players.

You can use internet to learn the rules of game.

Click Here to Buy this;

http://www.coursehomework.com/product/prg-410-week-3-assignment