LAB 3 – USING CLASSES AND OBJECTS TO DEAL CARDS

(Due before class on February 14, 2007) The following assignment is intended to enhance your understanding of the basics of Java programming and to introduce you to the use of classes and objects. Be sure to review Java Language Guidelines before you start on this assignment. [Post the solution in WebCT by 9:00 a.m. Wednesday, February 14, 2007.]

YOU MUST DO YOUR OWN WORK!!!


Your task is to write a program that displays a frame containing three panels. The top two panels should each contain an image of a playing card (your choice [be creative]). The bottom panel should contain the result of selecting two cards, i.e. "You were dealt a two and a queen." The values of the cards are to be hard-coded, but should be easy to change by the programmer.

HINT: You should use Enumerated Types to represent the values of the two cards. You should use JLabels to hold the contents for each panel.

Be sure to properly document your program.

 

Grades are determined using the following scale:
  • Runs correctly..…………………:___/10
  • Correct output……..……………:___/10
  • Design of output..………………:___/8
  • Design of logic…………………:___/10
  • Standards……………………….:___/7
  • Documentation.………………...:___/5