90 likes | 753 Views
1. To learn how to use these controls: - buttons, labels, picture boxes, and a form. 2. To learn how to use these events: - Click, MouseDown, and MouseUp 3. To learn how to use internal documentation 4. To learn how to place an icon into a button
E N D
1. To learn how to use these controls: - buttons, labels, picture boxes, and a form. 2. To learn how to use these events: - Click, MouseDown, and MouseUp 3. To learn how to use internal documentation 4. To learn how to place an icon into a button 5. To learn how to set properties in the Property Window. 6. To learn how to set properties in the code. 7. To learn how to exit a program using Me.Close(). “Close” is a method (a behavior). 8. To learn how to submit a program. ASSIGNMENT OBJECTIVES
GETTING HELP:You may ask another student for help, but you must not copy their code. Failure of the course will result for the person giving code and the person receiving code. I can get limited help from other students. For additional help, I need to see Dr. Scanlan, his assistant, or the tutoring center.
Programming Assignment 01 Due Date: Feb 20, 2014 (This is a VERY EASY program.) START ASAP! 20 POINTS Purpose: You are the owner of a Blockbuster Video Store and you need to set up a kiosk to help customers locate videos. The store is color-coded so that each movie category is in a physical section of the store with different colored shelves and different colored aisle carpet. Requirements: NOTE: THE COMPILED PROGRAM IN ZIP FORM IS ON THE COURSE WEB SITE. DOWNLOAD AND RUN THE PROGAM TO SEE HOW IT WORKS. YOUR PROGRAM MUST WORK EXACTLY THE SAME WAY, AND IT MUST LOOK SIMILAR. 1. Create a form with seven buttons and six labels. You will need two picture objects for the Blockbuster picture. You can find this icon or picture using Google's image search. Find something very similar if you have trouble finding the exact one. 2. Six buttons have video categories displayed as text. 3. The GUI must reasonably match the one on this slide. (Continued on the next slide.) In-Store Video Locator Make a Selection Aisle Location Store’s layout Action Button Location Aisle Color Comedy Aisle 1 Brown Drama Aisle 2 Blue Action Aisle 3 Orange Sci-Fi Aisle 4 Green Horror Aisle 5 Red New Releases Aisle 6 Yellow Aisle Color Comedy Drama Horror • Necessary prerequisites • 1. Book Chapters 1, 2 • Notes: Chapters 1, 2 • Mouse down and up Events. • 4. Picture Box Properties • 5. In-class lectures. Sci-fi New Releases
PICTURE BOX OBJECTS In-Store Video Locator Action Make a Selection Aisle Location Comedy Drama Use a white backcolor Aisle Color Horror Sci-fi Use a white backcolor New Releases Programming Assignment 01 • Requirements continued: • 6. Do not use the default names for the objects mentioned below. Use the names supplied. Use the default names for all other objects. • Button objects’ names: • btnAction • btnComedy • btnDrama • btnHorror • btnSci_Fi • btnNewReleases • btnExit • Label objects’ names: • lblDisplayAisleLocation • lblDisplayAisleColor • 7. Button MouseDown EVENT: • On a MouseDown event, the pressed button turns black. • On a MouseDown event, the text in the pressed button turns white. • 3. On a MouseDown event, the aisle location is displayed in lblDisplayAisleLocation. • Note: lblDisplayAisleLocation’s backcolor always stays white. • 4. On a MouseDown event, the aisle color is displayed in lblDisplayAisleColor. It must be displayed in the backcolor. • 8. Button MouseUp EVENT: • On a MouseUp event, the button turns white. • On a MouseUp event, the text in the pressed button turns black. • 3. On a MouseUp event, lblDisplayAisleLocation is cleared • of its text, that is, the aisle location. • 4. On a MouseUp event, lblDisplayAisleColor is reset to its • original backcolor, white. MouseDown event is triggered by pressing the left mouse button down. MouseUp event is triggered by releasing the left mouse button after it has been pressed down. Store’s layout Button Location Aisle Color Comedy Aisle 1 Brown Drama Aisle 2 Blue Action Aisle 3 Orange Sci-Fi Aisle 4 Green Horror Aisle 5 Red New Releases Aisle 6 Yellow
Programming Assignment 01 • Requirements continued: • Your program must have internal documentation. See the example on the next two slides. • This program will be accepted late, but with a 50% loss of points for each class day late. • 11. You must fill out and submit Form-B. See the slides at the end.
AN EXAMPLE OF HOW INTERNAL DOCUMENTATION MUST BE DONE. Fig 2-330 INTERNAL DOCUMENTATION EXAMPLE • PROGRAM DOCUMATION • The program must have documentation at its beginning. You MUST use this form for your programs. • SUB PROCEDURE DOCUMENTATION • Each procedure must have documentation at its beginning. You MUST use this form for your programs. The heading must be all caps and contain no more than four words.
AN EXAMPLE OF HOW INTERNAL DOCUMENTATION MUST BE DONE. Fig 2-350 INTERNAL DOCUMENTATION EXAMPLE • SUB PROCEDURE DOCUMENTATION • Each procedure must have documentation at its beginning. You MUST Use this form for your programs. The heading must be all caps and contain no more than four words.
Programming Assignment 01 Spring 2014 • Form-A Form-A GRADER FILLS IN THESE BLANKS: LAST NAME:_______________________________ FIRST NAME:________________________ PROGRAM (Circle) 1 2 3 4 5 6 7 8 9 DATE DUE:_____________________DATE SUBMITTED:___________________ GRADER FILLS IN THESE BLANKS: DESCRIPTION POINTS POSSIBLE POINTS EARNED Correct internal documentation: 0 OR 2 _____________ Reasonably correct GUI: 0 OR 2 _____________ Program runs correctly: 0 OR 14 _____________Proper style for object names: 0 OR 2 _____________ Failure to submit program correctly (See Form-B) 0 OR -5 _____________ Late penalty: 50% off / day _____________ TOTAL POINTS OUT OF A POSSIBLE 20: _____________ IMPORTANT: IF THE GRADER CANNOT READ THE PROGRAM OFF THE DISK OR IF THE PROGRAM FAILS TO COMPILE, AN AUTOMATIC ZERO GRADE WILL RESULT.
Program #1 Spring 2014 • Form-B Form-B CUT OUT THIS FORM ALONG THE DOTTED EDGES AND TAPE IT TO THE ENVELOPE. YOU MUST USE THIS STYLE THAT IS ABOUT THE SIZE OF YOUR CD-Ror DVD-R. Do not lick to seal. Use metal clip. NOTE: You may also use the self sealingtype of envelope found in the bookstore. • STUDENT FILLS IN THESE BLANKS: • LAST NAME (PRINT) :_______________________________ • FIRST NAME (PRINT):________________________ • PROGRAM (Circle) 1 2 3 45 6 7 8 • DATE DUE:_________________ • DATE SUBMITTED:__________________ • PLACE A CHECK NEXT TO THE FOLLOWING: • ____ Save the Program on a CD-R or DVD-R using the following folder and sub-folder: Your Name\Program 01 • ____ Print your full name and program number on the CD-R or DVD- R using a permanent black marker. • ____ Sign your full name with permanent black marker on the CD or DVD. • ____ Submit the CD-R or DVD-R in required envelope style not much larger than the CD-R or DVD-R. • ____ Place the CD-R or DVD-R in the envelope. • ____ Cut out this form along dotted edges and TAPE it to the envelope. • ____ Be sure a working program in on the disk and it can be read. Zero points if PROGRAM is not on the disk or can’t be read. • If not submitted correctly 5 points will bededucted from your score.!!