0% found this document useful (0 votes)
11 views2 pages

10 Hands-On Activity 1

The document outlines a hands-on activity for students to create a Windows application named CashierApplication, focusing on concepts such as inheritance, method overriding, and polymorphism. Students are required to implement a cashier system that calculates total amounts, discounts, and change using specified classes and methods. The application must utilize Visual Studio IDE and follow provided specifications and class structures.

Uploaded by

Kobe Payawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

10 Hands-On Activity 1

The document outlines a hands-on activity for students to create a Windows application named CashierApplication, focusing on concepts such as inheritance, method overriding, and polymorphism. Students are required to implement a cashier system that calculates total amounts, discounts, and change using specified classes and methods. The application must utilize Visual Studio IDE and follow provided specifications and class structures.

Uploaded by

Kobe Payawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

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.

10 Hands-on Activity 1 *Property of STI


Page 1 of 2
IT1907

Figure 1. The Discounted class inherits from the Item class

Figure 2. Example layout of required controls

10 Hands-on Activity 1 *Property of STI


Page 2 of 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy