Paper Order or Assignment Requirements see attachments. Project 2 is method us

Paper Order or Assignment Requirements

see attachments. Project 2 is method used for Project 1.
Note: Must be completed with Oracle SQL developer Version 4.0.3.16 used with Oracle SQL Server 11g.
Project 2 Break Down Instructions
For Project 2 you will implement the design as specified in project 1.
Some ideas for functions and procedures:
RANDOM function or package picks a random number 2 examples are given to you
PX procedure prints stars for separation
PL procedure to save typing DBMS_OUTPUT.PUT_LINE
GET_SUIT function Use a random number from 1 4 to return one of four suits (Hearts Clubs etc..)
GET_CARD_NAME function turns a 1 into an ACE a 2 into TWO 11 into Jack 12 into Queen etc..
NORMALIZE function to convert jacks queens and Kings into a value of ten
DRAW procedure used by a player or dealer to draw a card
CHECK_BUSTED function see if anyone has a score over 21
you get the idea
Example of desired output:
SQL> @objack1
Enter value for player_limit: 17
*******************************
Dealers turn:
Drew a Ten of Diamonds
Thats worth 10 points
. The total is now: 10 points.
*******************************
Players turn:
Drew a Five of Spades
Thats worth 5 points.
. The total is now: 5 points.
*******************************
Dealers turn:
Drew a Four of Hearts
Thats worth 4 points.
. The total is now: 14 points.
*******************************
Players turn:
Drew a Seven of Clubs
Thats worth 7 points.
. The total is now: 12 points.
******************************
Dealers turn:
Drew a Seven of Hearts
Thats worth 7 points.
. The total is now: 21 points
******************************
Players Turn:
Drew an Eight of Spades
That worth 8 points.
. The total is now: 20 points.
******************************
Dealer won. What a Shame. Oh well Play again.
This is to get you started:

DECLARE
p_score number := 0; Players score declare variables BEFORE
D_score number := 0; Dealers score procedures and functions
P_Limit number := &Player_Limit; The highest number the player is
willing to draw against.
Seed number := 8;
Seed2 number := 5;

You may also like

Leave a Reply