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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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