This lab relates to the following Skill Outcomes:
- Students will apply the steps in the program development process
- Students will implement object-oriented programming through predefined classes
- Students will develop graphical user interface applications using appropriate controls
- Students will implement the sequence control structure
This lab covers the material in Chapter 2. The purpose of this lab is to demonstrate the use of the following controls: Label, PictureBox, and Button. In addition the Visible Property will be implemented. See Tutorial 2-4 and Tutorial 2-5 in particular for assistance. The JPEG images for a complete deck of poker cards is contained in the attached Images.zip file. An image for a card back (Backface_Blue.bmp) is also attached. See video demonstrating the functionality of the lab at the end of the problem statement.
1. MODIFY Programming Problem #3, Card Identifier, on page 113 of the textbook based on the following REQUIREMENTS:
- Use a different set of five cards than those used in Figure 2-80 (see JPEG images in the attached Images.zip file)
- When the program executes each PictureBox control should display the card back and the Label control not displaying a card name (see Backface_Blue.bmp image attached)
- When the user clicks any of the PictureBox controls the card front PictureBox should be displayed and the card name should be displayed in a Label control (hint: use two sets of PictureBox controls)
- When the user clicks on the card front PictureBox, the card back PictureBox should be displayed and the Label control displaying the card name should be cleared
- Only ONE PictureBox control can display a card front and card name at any given time. Therefore, if the user clicks on a different PictureBox control displaying a card back, the other card front PictureBox(s) should be changed to the card back PictureBox and the Label control displaying the card should display the newly selected card name
- DO NOT use Button controls to display the card front PictureBox or the card back PictureBox. Write the appropriate code behind each PictureBox control click event handler.
- Add a Reset button which sets the form back to its original state by making all the card back PictureBox controls visible and setting the Label control displaying the card name to an empty string
- An Exit button should be included which closes the application
The program MUST also include standard features of a Windows application including:
- Change the default Text property of the form to something descriptive
- Appropriate naming conventions for all controls (i.e., buttons, labels, picture boxes). The required naming convention is descriptive name including control type using camelCase notation. For example: aceOfSpadesPictureBox, cardNameLabel, exitButton. The exception is controls not referenced in the code-behind of the Form1. For example, Label controls used for descriptive purposes only or PictureBox controls used for aesthetic purposes only.
- Remove all unused event handlers from the program code
2. Name your project using the naming convention provided in the syllabus: CourseNumber_LastNameFirstInitial_LabXX (e.g., 3333_SharpJ_Lab02)
3. Include the appropriate identification information per the course syllabus using comment statements above the using statements in the code-behind of Form1 (see p. 102, 2.8 Comments, Blank Lines, and Indentation): Name, 9-Digit ID, Due Date, Date Submitted, and Brief Description of Program.
4. You will need to zip/compress the project folder using an appropriate zip/compression utility such as the one found in the Windows or WinZip, etc. Please DO NOT submit .rar (archive) files.
5. Attach and submit the zipped/compressed project folder file under Assessments for Lab 02 under the Chapter 2 Module.