Data Warehousing Community Forum
October 24, 2019, 01:18:41 am

Pages: [1]   Go Down
Author Topic: Black Jack Gaming Program - Java  (Read 14766 times)
Global Moderator

Reputation: +11/-0
Offline Offline

Posts: 78

View Profile
« on: November 06, 2009, 08:53:11 am »


Can anyone resolve this and generate a program by using only JAVA and  defining Classes, Loops and Arrays...  No need of using any APPLETS and GUI'S....

Description of program:

The program  is simplified version of the card game of ’Pontoon’ (also known as ’twenty-one’ or ’Black-Jack’).

The aim of the game is to collect a hand of cards that sum to a value as close as possible to, but not exceeding 21. Face cards (the jack, queen and king) have a value of ten, other cards have their normal face value, except the ace can count as either 1 or 11 at the players discretion. A hand that has a minimum value greater than 21 is said to be ’bust’ and is worth nothing. A hand of 5 cards with a value of 21 or less is known as a ’five card trick’ and is worth more than any hand other than a ’Pontoon’, a hand consisting of an ace and a face card. The bank (the dealer) deals a hand of two cards (face down), one for the bank and one for the player.
The player can then inspect his cards and choose either to ‘stick’, in which case it is the bank’s turn to play, or ‘twist’ in which case the bank deals the player another card. This continues until the player ’sticks’,achieves a ‘five card trick’ or is ‘bust’. The bank then deals itself cards until it has a hand with a value greater than or equal to that of the player (in which case the bank wins) or goes ‘bust’ (in which case the player wins).


Java program implementing the game of Pontoon as described above. The program must also save the details of all games played to a file in order to allow subsequent statistical analysis of player’s behavior. In implementing your solution you should bear in mind that the aim of this exercise is to gain experience in object-oriented programming, so your program should include at least the following classes : Card representing a conventional playing cards,
Hand representing a Hand of up to five playing cards and Deck which represents the set of 52 unique playing cards from which the Hand are dealt. Hints:

  • Tackle the problem one class at a time (I would start with Card; have it fully implemented and tested before moving on to Deck and then Hand). Only once you have implemented and tested classes representing each type of object, should you try to implement the game.
  • It is important to test each class in isolation (don’t write all the code for all three classes and expect them to work with the Pontoon program first time). Each class should have a main method, used as a test harness. Choose which main method is active using the Java Target setting under Codewarrior.
  • Implementation of Hand and Deck requires the use of arrays…

Need it in very simple and straight format. Waiting for ur reply eagerly... Lips sealed Lips sealed

DW Fresher

Reputation: +0/-0
Offline Offline

Posts: 1

View Profile
« Reply #1 on: June 09, 2018, 11:22:59 am »

The game will be a simplified version of Blackjack as it is played in a casino. The computer will act as the dealer. As in the previous exercise, your program will need the classes defined in,,, and
More details visit us : java training in chennai

Suresh kumar (Digital Marketing Executive)
java training in chennai
Pages: [1]   Go Up
Jump to: