Question: CODE MUST BE IN JAVA MUST (NO C#) CODE MUST USE FILE NAMES, main.java and PlayingCards.java and Poker.java main.cs and PlayingCards.cs are provided files: (Will
CODE MUST BE IN JAVA MUST (NO C#) CODE MUST USE FILE NAMES, main.java and PlayingCards.java and Poker.java main.cs and PlayingCards.cs are provided files: (Will Upvote for good work) Thank you so much I appreciate it deeply! PlayingCards.cs using System; using System.Collections.Generic; class PlayingCards { private List deck = new List(); public PlayingCards() { string[] suite = new string[] {"Clubs","Dimonds","Hearts","Spades"}; string[] values= new string[] {"A","2","3","4","5","6","7","8","9","10","J","Q","K"}; for(int i=0;i<4;i++) { for(int j=0;j<13;j++) { string newCard=values[j]+" of "+suite[i]; deck.Add(newCard); } } } public void Shuffle() { Random myRand=new Random(); int numShuffles=myRand.Next(500); int numCards=deck.Count; for(int i=0;i0) { nc=deck[0]; deck.RemoveAt(0); } else { nc="Deck is empty"; } return nc; } } Program.cs File - using System; using System.Collections.Generic; class Program { public static List testHand1() { List h1 = new List(); h1.Add("A of Hearts"); h1.Add("K of Hearts"); h1.Add("Q of Hearts"); h1.Add("J of Hearts"); h1.Add("10 of Hearts"); return h1; } public static List testHand2() { List h1 = new List(); h1.Add("9 of Hearts"); h1.Add("K of Hearts"); h1.Add("Q of Hearts"); h1.Add("J of Hearts"); h1.Add("10 of Hearts"); return h1; } public static List testHand3() { List h1 = new List(); h1.Add("9 of Hearts"); h1.Add("9 of Spades"); h1.Add("9 of Clubs"); h1.Add("9 of Dimonds"); h1.Add("2 of Hearts"); return h1; } public static List testHand4() { List h1 = new List(); h1.Add("9 of Hearts"); h1.Add("9 of Spades"); h1.Add("2 of Clubs"); h1.Add("2 of Dimonds"); h1.Add("2 of Hearts"); return h1; } public static List testHand5() { List h1 = new List(); h1.Add("2 of Hearts"); h1.Add("9 of Hearts"); h1.Add("A of Hearts"); h1.Add("3 of Hearts"); h1.Add("7 of Hearts"); return h1; } public static List testHand6() { List h1 = new List(); h1.Add("5 of Hearts"); h1.Add("8 of Clubs"); h1.Add("9 of Dimonds"); h1.Add("7 of Spades"); h1.Add("6 of Hearts"); return h1; } public static List testHand7() { List h1 = new List(); h1.Add("A of Hearts"); h1.Add("A of Clubs"); h1.Add("A of Spades"); h1.Add("3 of Hearts"); h1.Add("7 of Hearts"); return h1; } public static List testHand8() { List h1 = new List(); h1.Add("A of Hearts"); h1.Add("A of Clubs"); h1.Add("7 of Spades"); h1.Add("3 of Hearts"); h1.Add("7 of Hearts"); return h1; } public static List testHand9() { List h1 = new List(); h1.Add("A of Hearts"); h1.Add("A of Clubs"); h1.Add("7 of Spades"); h1.Add("3 of Hearts"); h1.Add("K of Hearts"); return h1; } public static List testHand10() { List h1 = new List(); h1.Add("A of Hearts"); h1.Add("4 of Clubs"); h1.Add("7 of Spades"); h1.Add("3 of Hearts"); h1.Add("K of Hearts"); return h1; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
