10 Hands-On Activity 1
10 Hands-On Activity 1
Hands-on Activity
Windows Application
Objective:
At the end of the exercise, the students should be able to:
Materials:
One (1) personal computer with pre-installed Windows Operating System
Visual Studio IDE 2015 or higher
Instructions:
1. Create a simple cashier system Windows application. Name the project as CashierApplication and
the form as frmPurchaseDiscountedItem. The application should perform the following specifications:
• get the item to purchase, price, discount, and quantity;
• compute the total amount to purchase;
• get the amount of payment then compute the change.
*Figure 2 shows the layout and the required controls for the project.
Notes:
• To convert the discount value into a double type, multiply the discount with 0.01 (discount * 0.01).
• To compute the discounted price, multiply the discount with the regular item price (32% * price),
then subtract the result from the regular price (discounted price = price * result);
• Use the Convert.ToDouble() and Convert.ToInt32() methods to convert the texts into double or
integer types.
2. The application should contain two (2) separate classes: Item and DiscountedItem. The
DiscountedItem class should inherit from the Item class. Make these classes as members of the
namespace named ItemNamespace. Refer to the UML class diagram in Figure 1 for the required class
members.