#### Question Details

(solution) I need help with directions on what to do in the second question

I need help with directions on what to do in the second question in the paper below, it's c# programming

Department of Computing & Information Systems

Trent University COIS 2020H: Data Structures and Algorithms Assignment 1: Games (100 marks) Due date: Wednesday, October 12, 2016 at midnight

10% is deducted for each day late until Monday, October 17, 2016

No assignment can be accepted after midnight on October 17, 2016 Part I: Sudoku (using a rectangular matrix) 35 marks

Sudoku is a well-known puzzle that appears in newspapers around the world. The typical version is a 9x9

grid with nine 3x3 subgrids. For this assignment, the Sudoku is shrunk to a 4x4 grid with four 2x2

subgrids. 1 4 3 2 3 2 1 4 4 3 2 1 2 1 4 3 A proper solution to the above Sudoku puzzle fills in the grid so that each row (four cells wide), each

column (four cells tall), and each 2x2 subgrid contains the digits 1 to 4 in any order.

For this assignment, create an empty Sudoku puzzle and then randomly fill in the 4x4 grid with the digits

1 to 4. Once the grid is randomly filled in, check if it satisfies a proper solution to the Sudoku puzzle.

Note that it is very unlikely that the resultant grid will satisfy a proper solution. However, continue to

generate random grids until 25 proper solutions are found. Divide the total number of grids by 25 to give

an average number of trials required for each proper solution. Doing a little research and calculating how

many random grids can be generated in total, does this result match with your expectations?

Design

The design of the Sudoku problem will include the following Sudoku class with at least three methods as

shown below: class Sudoku

{

private int[,] S;

public Sudoku( ) { ? }

public void Initialize( ) { ? }

public bool VerifySolution ( ) { ? }

{ To generate random integers, use the standard Random class in C#.

Grading Scheme

Initialize

VerifySolution

Calculation of expected results

Main program

Testing

Inline comments 3%

12%

4%

8%

5%

3% // Don?t forget // To determine empirical result Part II: Patjack (using a circular linked list) 65 marks

Patjack is a simple card game where players are seated at a round table. Each player is spotted with $100.

For each game, every player is randomly dealt two cards from a new, standard deck. One card is placed

face up and is known to everyone; the other card is placed face down and is known to no one (including

the player himself).

Each player then places a bet that is at least $10 and is a multiple of 10. Once the bets are placed, the

cards that are face down are revealed and the sum of the two cards is calculated. If a player has a higher

sum than the players to his left and right, he wins his bet. If the player has a lower sum than the players

to his left and right, he loses his bet. Otherwise, the player neither wins nor loses his money (i.e. he

?stands pat?).

The value of each card with a rank of ACE to TEN has a value of 1 to 10, respectively. The value of a

face card (JACK, QUEEN, KING) is 10. Therefore, a QUEEN and ACE has a sum of 11, and a FIVE

and NINE has a sum of 14.

Any player who busts (loses all his money) is removed before the next game is played. Play continues

until only one player remains. Note that if only two players remain, each player is both to the left and to

the right of his opponent.

Your problem is to design and implement a C# program to play Patjack.

Design

The design of your Patjack game will likely include the following classes and types. Not all methods or

properties have been specified. Not all classes and methods may be used.

public enum SuitType {CLUB, DIAMOND, HEART, SPADE};

public enum RankType {ACE, TWO, THREE, FOUR, FIVE, ?, JACK, QUEEN, KING}; class Card

{

public SuitType Suit { get; set; }

public RankType Rank { get; set; }

?

}

class Deck

{

private List<Card> deck;

public Deck ( ) { ? }

public card DealCard( ) { ? }

? // Using the standard generic library class List<T> // Returns a random card from the remaining deck }

class Player

{

private string name;

private int sum;

private int winnings;

private int bet;

?

} // Sum of the two cards

// Money in hand

// Current bet (which must at least $10) class PlayerNode

{

public Player P { get; set; }

public PlayerNode Next { get; set; }

public PlayerNode (Player p, PlayerNode next)

{?}

?

}

class Patjack

{

private PlayerNode firstPlayer;

private Deck deck;

private int numPlayers; // Circular linked list of players public void InitializeGame ( ) { ? }

public void PlayGame ( ) { ? }

?

} Testing

Testing your program is an extremely important part of this assignment. It validates the results of your

program. Testing is first done on each of the classes/methods individually. After which, integration

testing is performed as classes are executed together. Testing also ensures that input is correct (e.g. one

cannot bet more than his winnings). Your test cases are to be described in a separate document which is handed in both digitally and in

hardcopy.

Grading Scheme

Class Card

Class Deck and use of List

Class Player

Class PlayerNode

Class Patjack

Interface

Testing

Inline comments 3%

8%

6%

5%

20%

8%

10%

5% Submission

Submit your projects (all files including an executable) and test results online at myTrent. A hard copy

(paper) version of your project and testing should also be submitted to the professor or teaching assistant.

**Solution details:**

Answered

QUALITY

Approved

ANSWER RATING

This question was answered on: * Sep 13, 2020 *

* * Solution~00021147787522.docx (25.37 KB)

##### Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .

#### About this Question

STATUSAnswered

QUALITYApproved

DATE ANSWEREDSep 13, 2020

EXPERTTutor

ANSWER RATING

#### GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

- As a reference for in-depth understanding of the subject.
- As a source of ideas / reasoning for your own research (if properly referenced)
- For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).

#### NEW ASSIGNMENT HELP?

### Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions.
New orders are original solutions *and precise to your writing instruction requirements. Place a New Order using the button below.*

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.