Need a program that consists of a blackjack game written using processing. Proce
ID: 3633625 • Letter: N
Question
Need a program that consists of a blackjack game written using processing. Processing is a form of java so if you don't know processing you can use tht too
Some rules are:
An ace can count as either 1 or 11
The cards from 2 through 9 are valued at their face value
The 10,Jack,Queen,and King are all valued at 10
For the Dealer, if the hand is below 16, the dealer must take another card
Make a flowchart for the program.
Also please don't make the program too good this is an intro to programming class
Explanation / Answer
String[] suit = { "Clubs", "Diamonds", "Hearts", "Spades" }; String[] rank = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace" } After creating the two arrays, we might use them to print out a random card name such as Queen of Clubs, as follows. int i = (int) (Math.random() * rank.length); int j = (int) (Math.random() * suit.length); System.out.println(rank[i] + " of " + suit[j]); Setting array values at run time. A more typical situation is when we wish to compute the values to be stored in an array For example, we might use the following code to initialize an array of size 52 that represents a deck of playing cards, using the arrays rank[] and suit[] just defined. String[] deck = new String[ranks.length * suits.length]; for (int i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.