Thursday, 21 May 2015

PRG 410 Week 3 Assignment

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 will win with 10 points for one value.

• Ask input range is between (101-200) player will win with 20 points for one value.

• Ask input range is between (201-500) player will win with 50 points for one value.

Add all five values for HERO/HEROs and printout the winner of the game.


Problem 2: Rock, Paper, Scissors Game [marks 20]

Write a program that lets the user play the game of Rock, Paper, and Scissors against the computer. The

program should work as follows.

1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is

1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the

number is 3, then the computer has chosen scissors. (Don’t display the computers choice yet)

2. The user enters his or her choice of rock, paper, or scissors at the key-board. (Use a menu)

3. The computers choice is displayed.

4. A winner is selected according to the following rules:

• If one player chooses rock and the other player chooses scissors, then rockwins. (The rock

smashes the scissors.)

• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors

cuts paper.)

• If one player chooses paper and the other player chooses rock, then paper wins. (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


Course Home Work aims to provide quality study notes and tutorials to the students of PRG 410 Week 3 Assignment in order to ace their studies.


Course Home Work - Best Home Work Tutorials


Home Work CIS 312 Complete Class All Assignments

PRG 410 Week 3 Assignment


Course Home Work, PRG 410 Week 3 Assignment, Home Work Tutorials, Home Work Solutions, Home Work Essay, Home Work Questions.ACC 565 Wk 7 Assignment 3, ACC403 week 2 assignment, ACC565 Week 10, ACCT 212 (Financial Accounting),  ACCT 344 (Entire Course) - Devry, ACCT 344 Final Exam Latest 2014 - Devry,  ACCT 346 (Managerial Accounting), ACCT 346 Midterm Exam Updated DeVry, ACCT 504, ACCT 504 Week 8, ACCT 553, ART 101 Week 8, Ashford BUS 401, ASHFORD BUS 640, Ashford HIS 204, ASHFORD MAT 222 Week 3, BA 215 (Business Statistics), BA 215 All Assignments Week 1 -8 - Grantham, BA 225, BA 260, BA 265 (Business Law II), BA 265 (Business Law II) FINAL EXAM, BA 340 All Course Assignments, BA 340 Human Resource, BA 370 (Employment Law), BA 405 Multinational Management, BA 470 Week 3 - 5 - 6 - 7, BA 470 Entrepreneurship, BA350 Principles Of Finance, BIS 155 Final Exam - DeVry, BIS 220 Final Exam, BSOP 429, BSOP 434 Entire Course - Devry, BUS 303 Week 2, BUS 303 Week 3, BUS 303 Week 5, BUS 311 Business Law, BUS 330 Week 1, BUS 330 Week 3, BUS 330 Week 5, BUS 401 Week 4 DQ 1, BUS 401 Week 4 DQ 2, BUS 402 WEEK 4, BUS 405 (Principles of Investment), BUS 475, BUS 475 Final Exam 100 MCQS, BUS 475 Final Exam 600 MCQS, BUS 599 (STRAYER), BUS 599 Assignment, BUS 620 Week 4, BUS 640 Week 1, BUS499 Asignment 4, BUS508 Asignment 1, BUS499 Assignment 3


Course Home Work is a not for profit organization that aims to provide quality study notes to the students in order to ace their studies.


For more courses visit


http://www.coursehomework.com



PRG 410 Week 3 Assignment

No comments:

Post a Comment