Creating form which analyzes poker hand entered by user

Assignment Help Programming Languages
Reference no: EM1345023

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.

Reference no: EM1345023

Questions Cloud

Find the investment in capital project : Telecom Italia is considering investment in a capital project. Initial cost in year 0 is $149,000 to be depreciated straight line over five years to an expected salvage value of 15,000 dollar.
Find the current yield and yeild to maturity : Charlotte's Clothing issued a 5% bond with a maturity date of fifteen years. 5-years have passed and the bond is selling for $690.
Determine the bonds current yield and yield to maturity : A bond with fifteen years until maturity has a semiannual interest rate of $40. If the bond sells for its par value, determine the bond's current yield and yield to maturity values?
Discuss the characteristics of resort business : The estimation of Kitty (Hawk Food), Inc., a restaurant food wholesaler in eastern Carolina. The company is experiencing difficulty paying trade debt & collecting trade receivables on time,
Creating form which analyzes poker hand entered by user : To observe behavior of Sub Procedures, draw a Form which analyzes a poker hand entered by user and displays the type of hand.
Create income statement for the current month : Regal Flair Enterprises has two product lines: jewellery & women's apparel. Cost & revenue data for every product line for current month are as follows;
Explain terrorist attacks foster instability and may affect : Explain terrorist attacks foster instability and may affect productivity over the short and long term.
Evaluate the required return for an asset : Evaluate the required return for an asset with a beta of .90 when the risk-free rate and market return are 6% and 10% respectively and fine the risk-free rate for a firm with a required return of 12% and a beta of 1.25
Explain sensitivity analysis : What role does this type of analysis play in your work environment or in your home environment and also explain  sensitivity analysis.

Reviews

Write a Review

Programming Languages Questions & Answers

  Defining method dashedline with one parameter

Write a definition of method dashedLine, with one parameter, an int .

  Computer sales and repair store system

It is required to design a relational database system for a "realistic" application

  Program to compute person earns in a month

Write a program that calculates how much a person earns in a month if the salary is one penny the first day, two pennies the second day, four pennies the third day.

  Explaining variable in an arrays of ints

Assume that variable A is an arrays of ints. Consider the following code segment.

  Application development and programming languages

Compare and contrast object-oriented languages (Java, C++, C#, etc.) to imperative languages (C, Pascal, etc.) in terms of:

  Explaining exception handling using program

Use exception handling appropriately. Use comments to illustrate the various concepts applied / utilized in the solution.

  Solve the programming problem

Solve the programming problem

  Creating table-find employee attended meeting on given date

The rows of this table record the fact that an employee from a particular project attended a meeting on the given date.

  Create child processes

Create child processes

  Write pseudocode

Write pseudocode that represents the abstract functions of the enqueue and dequeue operations. Define and explain any supplementary information needed by your pseudocode.

  Building instruction set simulators

Building Instruction Set Simulators

  Examine the boxplot

Examine the boxplot and briefly discuss the overall pattern of electricity usage for the households.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd