Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

IT1808

Hands-on Activity
Windows Application
Objective:

At the end of the exercise, the students should be able to:

 Use inheritance and protected members;


 Invoke base class constructors;
 Apply method overriding;
 Use the abstract classes and abstract methods; and
 Implement polymorphism in a program.

Materials:

 One (1) personal computer with pre-installed Windows Operating System


 Visual Studio IDE 2015 or higher
 CashierApplication and frmPurchaseDiscountedItem output from 07 Hands-on Activity 1

Instructions:
1. Create a simple user login system. Open the project CashierApplication from 07 Hands-on Activity 1 and
add new form named frmLoginAccount. Figure 2 shows the layout and the required controls for the
frmLoginAccount and Figure 3 shows frmPurchaseDiscountedItem with a menu strip control.
2. The application should meet the following specifications:
 Upon starting of the application, display frmLoginAccount and ask the user to enter username and
password;
 Validate the user’s username and password if it matches the required credentials;
 If the user has successfully logged in, close the login form and display the full name and department of the
user;
 After the login, open frmPurchaseDiscountedItem;
 Add menu strip to the frmPurchaseDiscountedItem;
 User can select Logout and Exit application from the menu strip; and
 When the user selects Logout, the frmLoginAccount form should display again.
3. The application should contain two (2) separate classes: UserAccount and Cashier. The Cashier class
should inherit from the UserAccount class. Make these classes as members of the namespace
UserAccountNamespace. Refer to the UML class diagram in Figure 1 for the required class members.

Figure 1. The Cashier class inherits from the UserAccount class

10 Hands-on Activity *Property of


STI
IT19

Figure 2. Example frmLoginAccount form layout and welcome message after successfully
logging in

Figure 3. Example frmPurchaseDiscountedItem with a menu strip control

10 Hands-on *Property of
STI

You might also like