Beruflich Dokumente
Kultur Dokumente
FORM 1:
Tuesday November
03
2009
Instructions:
Add five Labels to your form
Use the default object name of each label (i.e.. Label1, Label2, Label3, Label4, Label5)
Change Labels properties:
o Label1, Label2, Label3 & Label4
Font: 14
o Label5
Font: 48
Add Timer object
Note: Timer object will be displayed on the form but at the lower part of the screen.
Change Timer properties:
o Enable: TRUE
o Interval: 1000
Use Color and MouseMove Method/Event Procedure to change the background color of the form
depending on the selected color.
Page 1 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Sample Form:
Specifications:
1) TextBox – txtFinalGrade
2) Label – lblRemarks
1) 3) Button – btnTest
4) Button – btnClear
2)
5) Button - btnExit
Sample Output:
Note:
Final grade should be between 50 – 100 only
Use Try and Catch to validate the input
Prompt the user for invalid input using MessageBox.Show function
Page 2 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Formula:
Semestral Grade = 25% of Prelim + 25% of
Midterm + 50% of Final
Problems:
Page 3 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
LAB EXERCISE #3
RadioButton and CheckBox Control with Variables and Constants
Note:
You can select one or more items (check
boxes) (see sample output below)
If no selected discount percentage the
computer will assume of 0% discount.
If no item selected all labels will have a
value of 0.00.
PRICES:
Size:
Small – Php 100.00
Medium – 150.00
Large – 200.00
Crust Type:
Thin Crust – same as size prices
Thick Crust – Plus 50% of size
prices
Drinks:
Soft Drinks – Php 20.00
Fruit Juice – 15.00
Coffee/Chocolate 25.00
Extra Toppings:
Plus Php 10.00 per extra toppings
LAB EXERCISE #4
Random Function
Page 5 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Problems:
Guess number should be from 0 – 9 only
Prompt the user with invalid input
Compare the user’s input and computer generated number then display a message box for correct and
incorrect guess (see sample output)
Specification:
Add 3 labels
o Label1, Label2 & Label3
Name: lblNum1, lblNum2, lblNum3
BorderStyel: FixedSingle
FontSize: 20 FontStyle: Bold
Text: None
TextAlign: MiddleCenter
o Button
Name: btnSpin
Text: &SPIN
Page 6 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Problems:
Spin button, upon clicking will generate a random numbers to each label
Random numbers should be from 0 to 9 only
Display a message as shown in the sample message box (see above)
Instructions:
1. Your bet should not be less than 10 pesos, otherwise it will prompt you with “Enter minimum amount of Php
10.00”
2. Enter single digits for each of the text box
3. If the content of the text box are all equal to the winning numbers (in order) it will prompt you with “You have
won 1 MILLION PESOS JACKPOT” (see sample Message box below), otherwise it will prompt you with
“Sorry better luck next time”
4. But, if the content of the text box are equal to the winning numbers (but not in order) it will prompt you with
“You have won a consolation prize of ____”. The consolation prizes will depend on the BET amount (Example:
Bet is 100, multiply your bet to 1,000.00 to get the consolation amount.)
Page 7 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
LAB EXERCISE #5
ComboBox, ListBox & NumericUpDown
Controls
Specifications:
ListBox
Page 8 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
o Name: lstParts
o Items: see items in the figure
ComboBox
o Name: cboDisc
o Items: 5%, 10%, 15% & No Discount
Label (Name:)
o lblUPrice
o lblSubTot
o lblDisc
o lblTotAmt
o TextAlign: Right
o btnClear
o btnClose
Page 9 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Sample Output:
Selected
UnderwearUnderwear
Specifications:
2 list box (Name: lst1 & lst2 respectively)
2 buttons
Problems:
Double Click items in the Underwear list box then will copied to the Selected Underwear list box
Clear All button – will clear all items in Selected Underwear list box
Clear Selected Item button – will clear only the selected item in Selected Underwear list box
Instructions:
Define your own controls/objects name
Course: (ComboBox)
o Items: BSIT, BSCS, BSA, BSN
Year Level: (ListBox)
o Items: Freshem, Sophomore, Junior, Senior
Total Units: (NumericUpDown)
o Minimum: 3
o Maximum: 30
Lab. Units: (NumericUpDown)
o Minimum: 0
o Maximum: 3
Tuition Fee per unit: Php 100.00
Lab. Fee per unit: Php 1,000.00
Miscellaneous Fees:
Year Level BSIT/BSCS BSA/BSN
Problems: Freshmen 1,000.00 2,000.00
Sophomore 750.00 1,500.00
Junior 500.00 1,000.00 Page 10 of 23
Senior 250.00 500.00
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
LAB EXERCISE #6
FORM #1: Employee Payroll Computation
Page 11 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Position Code Rate/Day Civil Status Basic Pay SSS Rate TAX Rate
A 500.00 Single 10,000 & above 7% 10%
B 400.00 Married 5,000 – 9,999 5% 5%
C 300.00 Widowed 1,000 – 4,999 3% 5%
below 1,000 1%
Upon choosing the desired Employee Number, it will automatically display the Employee Name.
For Compute Button, will compute the Basic Pay, SSS Contribution, Withholding Tax and Net Pay
For Clear Button, will clear all entries
For Quit Button, will close the program/application.
LAB EXERCISE #7
DateTimePicker with DateDiff Function
Page 12 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Problem:
Compute for Total Amount based on the date of check-in and check-out.
Select room capacity, room type and payment type before clicking Compute button otherwise, will
prompt you with “No selected room capacity” or “No selected room type” or “No selected type of
payment”
Note: If the customer checked-in and checked-out on the same day will charge him/her of 1 day.
Page 13 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
LAB EXERCISE #8
FORM #4: Hotel Billing System
FORM #2:
Presidential Candidates
Cast your vote by clicking the ComboBox
and choose your desired candidate.
For Vote button:
o Click Vote button to confirm
your vote
o Then, the voted candidate will
automatically display his votes as
shown in the Actual Tally
For Result button:
o Click Result button to display the
result. (see sample output below
o o
Page 14 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
LAB EXERCISE #9
Array and MainMenu Control
Richard Gwapo
*****
Note: No limit for password, if incorrect password will prompt the user to RETRY & CANCEL and user name should
have an entered value otherwise will prompt the user to enter value for user name.
<File> <Transaction>,
will display the Transaction Form (Form 3)
<File> <Exit>
will close the program
Page 15 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
FORM 3: Transaction
Logical Problems:
Double click Appliance item (List Box) then the selected item will be displayed to the Appliance Sold (List
Box) and UnitPrice (List Box) (see example below)
Note: Be sure that you have enter value in the Quantity
If quantity is less than or equal to zero (0) it will prompt the user to input quantity.
Amount Text Box will be based on the Appliance Unit Price * Quantity
Example: Appliance Sold: Electric Fan, Unit Price: 500, Quantity: 2 (see example below)
Sub-total Text Box will be based on the total item sold.
Example: Appliance Sold: Air Conditioner 10,000.00 X 1 and Electric Fan 500.00 X 2
(see example below);
Choose Type of Payment: Cash or Charge then, will enable Compute button
If Compute button is clicked; for CASH
Total Amount = Sub-total less 5% discount
Page 16 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Page 17 of 23
User Name: Richard Gwapo <Insert Date & Time here>
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Output:
For Cash Payment
User Name: Richard Gwapo <Insert Date & Time here>
Output:
For Charge Payment.
User Name: Richard Gwapo <Insert Date & Time here>
Page 18 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Then, will hide all controls under Total Amount and displays 5% Additional to all Charge Payments (see
example above)
FORM 4:
If button OK is clicked
will close the form window.
Appliance
Store
Page 19 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Sample Output:
New button:
o will clear all the textboxes and student number
will be automatically generated (use 3 digits
format)
Save button:
o will only save data if with complete
information. (make a necessary prompt for
incomplete entry)
Page 20 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Note:
use 08-<three digits #> for UserID
Example: JRU-001
Assign Password & UserName for each UserID
Main Form: Enrolment Monitoring System (EMS)
EMS Table:
Field Name Field Type
studNum Text
studName Text
Course Text
Year Text
Section Text
Note:
Initially, only Add and
Search button are enabled
(1st five buttons only) and
set TextBox &
ComboBox control to
Enabled = False
Upon clicking the Add
button will enabled Save
button only. Student
number will be
automatically generated
with the required format
Page 21 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Page 22 of 23
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES – Computer Engineering Department
COE Elective 3 (Object Oriented Design & Rapid Application Development)
LABORATORY EXERCISES
Instructions:
Design user interface for Advanced Search Form
Add the following items for the three (3) frames
Page 23 of 23