assignment objectives to practice or use the following: 1.controls: - buttons, labels, picture...

12
ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1. CONTROLS: - buttons, labels, picture boxes, groupboxes , and a form 2. 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 use the Visible property. 8. To learn how to exit a program using Me.Close(). “Close” is a method (a behavior). 9. To learn how to accumulate using a counter variable. 10. To learn how to DIMension a variable. 11. To learn how to submit a program. Note: Items in red are new for this assignment.

Upload: gavin-walsh

Post on 17-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

ASSIGNMENT OBJECTIVESTO PRACTICE OR USE THE FOLLOWING:

1. CONTROLS:

- buttons, labels, picture boxes, groupboxes, and a form

2. 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 use the Visible property.

8. To learn how to exit a program using Me.Close(). “Close” is a method(a behavior).

9. To learn how to accumulate using a counter variable.

10. To learn how to DIMension a variable.

11. To learn how to submit a program.

Note: Items in red are new for this assignment.

Page 2: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Due Dates: Part-02 is due Mar 6

START ASAP!20 POINTS: 5 POINTS FOR PART-01 AND 15 POINTS FOR PART-02. Purpose:The manager of a Blockbuster Video store has asked you to modify Program-01 so that he can track which categories are selected most often.In addition, you are to modify Part01 so that the counters are not visible to customers; that is, they are only visible to employees after the employees have entered a password. The employee must be able to reset the counters back to zero, and be able to shut the program off by pressing an EXIT button.

Requirements for Part-02:1. Add the controls below that had been covered up by a panel in Part-01. The GUI must look REASONABLY close to the one below.2. The program MUST behave as indicated in the following slides. Each slide will show what happens after certain buttons are pressed. 3. PAY CLOSE ATTENTION TO EACH SLIDE.(Continued on the next slide.)

Programming Assignment 02-PART02

Necessary prerequisites1. Chapters 1, 2, 3, 42. Notes: 010, 020, 030, 0403. How to accumulate4. Visible Property5. GroupBoxes7. Class Lectures.

Button Location Aisle Color

Comedy Aisle 1 BrownDrama Aisle 2 BlueAction Aisle 3 OrangeSci-Fi Aisle 4 GreenHorror Aisle 5 RedNew Releases Aisle 6 Yellow

Store’s layout

Page 3: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Requirements for Part-02:4. Write the code and set the design-time properties so that the GUI looks as below immediately after the program is run.

Programming Assignment 02-PART02

THIS GUI IS SEEN IMMEDIATELY AFTER THE PROGRAM IS RUN

PRESSING DOWN ON THIS START BUTTON WILL PRODUCE THE GUI ON THE NEXT SLIDE.

When the program starts, the GUI will look like this.See the Exec program onthe Web site.

Page 4: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Requirements for Part-02:5. Write the code and set the design-time properties so that the GUI looks as below while the START button is press down.

Programming Assignment 02-PART02

THIS IS WHAT IS SEEN WHILE THE START BUTTON IS PRESSED DOWN.

NOTE: THE PROPERTIES OF THE START BUTTON ARE THE SAME AS THE SELECTION BUTTONS IN PART01.

Note the colors of the buttons while pressing them.

Page 5: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Requirements for Part-02:6. Write the code and set the design-time properties so that the GUI looks as below immediately after the START button is released.

Programming Assignment 02-PART02

THIS IS WHAT IS SEEN AFTER THE START BUTTON IS RELEASED.

PRESSING DOWN ON THIS ACTION BUTTON WILL PRODUCE THE GUI ON THE NEXT SLIDE.

NOTE: ALL SIX SELECTION BUTTONS BEHAVE AS THEY DID IN PART01 WHEN THEY ARE PRESSED AND RELEASED, AND THE AISLE LOCATIONS AND COLORS REMAIN THE SAME AS THEY DID IN PART01.

Page 6: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Requirements for Part-02:7. Write the code and set the design-time properties so that the GUI looks as below while the Action button is pressed down.

Programming Assignment 02-PART02

THIS IS WHAT IS SEEN WHILE THE ACTION BUTTON IS PRESSED DOWN.

NOTE: ALL SIX SELECTION BUTTONS BEHAVE AS THEY DID IN PART01 WHEN THEY ARE PRESSED AND RELEASED, AND THE AISLE LOCATIONS AND COLORS REMAIN THE SAME AS THEY DID IN PART01.

Page 7: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Requirements for Part-02:8. Write the code and set the design-time properties so that the GUI looks as below immediately after the Action button is released.

Programming Assignment 02-PART02

THIS IS WHAT IS SEEN WHEN THE ACTION BUTTON IS RELEASED.

NOTE: ALL SIX SELECTION BUTTONS BEHAVE AS THEY DID IN PART01 WHEN THEY ARE PRESSED AND RELEASED, AND THE AISLE LOCATIONS AND COLORS REMAIN THE SAME AS THEY DID IN PART01.

Page 8: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Requirements for Part-02:9. Write the code and set the design-time properties so that the GUI looks as below immediately after the password is typed into the textbox.10. The textbox must be set to turn all letters to lower case and to display asterisks for each character entered.11. The password must be “password”. 12. The program does not advance to the next slide when the Display Counters Button is pressed, unless the password is correct. Use an IF-

THEN-ENDIF statement to check for a correct password. (See Videos for Chapter 4.)

Programming Assignment 02-PART02

CLICKING THE Display Counters BUTTON WILL PRODUCE THE GUI ON THE NEXT SLIDE. US

E A

CL

ICK

EV

EN

T F

OR

TH

IS B

UT

TO

N.

THIS IS WHAT IS SEEN WHEN A PASSWORD IS ENTERED BY AN EMPLOYEE.

Page 9: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Requirements for Part-02:13. Write the code and set the design-time properties so that the GUI looks as below immediately after the Display Counters button is clicked.

Programming Assignment 02-PART02

THIS IS WHAT IS SEEN AFTER THE Display Counters BUTTON IS CLICKED.

CLICKING THE Reset BUTTON WILL PRODUCE THE NEXT SLIDE

Assume that New Releases had been pressed 5 times and the others 1 time each.

Page 10: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Requirements for Part-02:14. Write the code and set the design-time properties so that the GUI looks as below immediately after the Reset button is clicked.15. Your program must have internal documentation. See previous slides for an example.16. You must fill out and submit Form-A and Form-B for Part-02.

Programming Assignment 02-PART02

THIS IS WHAT IS SEEN AFTER THE Reset BUTTON IS CLICKED.

WHAT THE Reset BUTTON DOES:1. It Resets the program to its STARTing position.2. It Resets ALL six of the counters to 0.3. The program has been reset and it will now behave as

it did starting from slide 13.

Page 11: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Form-A Form-A

Programming Assignment 02

STUDENT FILLS IN THESE BLANKS:

LAST NAME (PRINT):_______________________________

FIRST NAME (PRINT):________________________

PROGRAM (Circle) 1 2 3 4 5 6 7 8 9

DATE DUE:_____________________

DATE SUBMITTED:___________________

GRADER FILLS IN THESE BLANKS:DESCRIPTION POINTS POSSIBLE POINTS EARNEDCorrect internal documentation: 0 OR 1 _____________Reasonably correct GUI: 0 OR 1 _____________Program runs correctly: 0 OR 10 _____________Proper style for object names: 0 OR 1 _____________Proper style for variable names 0 OR 2 _____________Failure to submit program correctly (See Form-B) 0 OR 5 _____________Late penalty (50% off for each class day late.) - 50 % _____________

TOTAL POINTS OUT OF A POSSIBLE 15: _____________

If your program does not run correctly, get help and hand it in the next class day. 50% deducted for being late is better than 15 points deducted for a faulty program.

Page 12: ASSIGNMENT OBJECTIVES TO PRACTICE OR USE THE FOLLOWING: 1.CONTROLS: - buttons, labels, picture boxes, groupboxes, and a form 2. EVENTS: - Click, MouseDown,

Form-B Form-B

STUDENT FILLS IN THESE BLANKS:

LAST NAME (PRINT) :_______________________________

FIRST NAME (PRINT):________________________

PROGRAM (Circle) 1 2 3 4 5 6 7 8DATE DUE:_________________DATE SUBMITTED:__________________

PLACE A CHECK NEXT TO THE FOLLOWING:

1. ____ Save the Program on a CD-R or DVD-R using the following folder and sub-folder: Your Name\Program 02

2. ____ Print your full name and program number on the CD-R or DVD-R using a permanent black marker.

3. ____ Sign your full name with permanent black marker on the CD or DVD.

4. ____ Submit the CD-R or DVD-R in required envelope style not much larger than the CD-R or DVD-R.

5. ____ Place the CD-R or DVD-R in the envelope.6. ____ Cut out this form along dotted edges and TAPE it to the

envelope.7. ____ Be sure a working program is 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 be

deducted from your score.!!

CUT OUT THIS FORM ALONG THE DOTTED EDGES AND TAPE IT TO THE ENVELOPE.

YOU MUST USE THIS STYLE THATIS 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.

Program #2 Spring 2014