Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Q1) In this assignment you will need the Visual Basic language features. A convenient way to determine different poker hands is to keep track of the cards in a player's hand with a table array of rows and columns. Row 1 tracks the clubs dealt, row 2 the diamonds, row 3 the hearts, and row 4, the spades. Column 1 tracks the aces, column 2, the twos, and so on through column 10. Column 11 tracks the Jacks, column 12 the queens, and column 13 the kings. If the name of the table is "cards" then cards(i,j) is set to 1 if the player is dealt face value j in suit i; otherwise cards(i,j) is set to 0. For example, if cards(2,11) = 1 then the player holds the jack of diamonds. Row 0 and Column 0 are not used. A card is represented by a String that indicates the card's face value followed by the suit. The face value is one of the Strings : "A", "2", "3", ..., "9", "10", "J", "Q", or "K". The suit is given by one of the letters "C" (clubs), "D" (diamonds), "H" (hearts), or "S" (Spades). Thus "AH" represents the ace of hearts and "10S" the ten of spades.  A poker hand of 5 cards will be represented by a String of cards, each separated from the next by a comma. For example, the String : "aH, AS, 2D, 3C, 4C" describes a hand consisting of the ace of hearts, ace of spades, two of diamonds, three of clubs, and four of clubs. Note that spaces may occur between cards, but not between the face value and suit  of any card. The user may specify a suit or the ace in either upper or lower case.

1. For each of the following types of poker hands design a Sub procedure that will recognize the hand in the table cards and, if observed, add the corresponding phrase to the ListBox:

a. Four of a kind
b. Three of kind
c. A pair
d. A flush
e. A straight, if ace is low.
f. An ace-high straight; that is the sequence: 10, J, Q, K, A

2. To observe the behavior of your Sub Procedures, design a Form that analyzes a poker hand entered by the user and displays the type of hand as indicated in (1). Your program should include the following:

a. A TextBox for the user to type in a poker hand.

b. A ListBox to display the result of the analysis. Note that a hand may have more than one description. For example, a hand may hold a full house; that is, a pair and three of a kind. Both descriptions should be displayed. However, four of a kind should not also be described as two pair.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9220387

Have any Question?


Related Questions in Programming Language

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As