Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program is to be written in visual basic Question Two Tylon-Gh is a retail chain with shops dotted around the capital. Management recently decided to

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Program is to be written in visual basic

Question Two Tylon-Gh is a retail chain with shops dotted around the capital. Management recently decided to acquire a Point of Sale (POS) system for their checkout desks and have contacted you to develop the software for the system. The software is to allow an employee at the checkout desk to add products, quantities purchases and their corresponding unit prices to generate a sales receipt for the transaction. Customer are require to pay two (2) types of taxes in all Tylon-Gh shops. ie. VAT and NHIL. Also, Tylon-Gh runs a discount program based on membership status and mode of payment. The total amount a customer need to pay at the shop will depend on all these factors. Tylon Gh 0 X Membership Mode of Payment Enter Product Info Product Unit Price (GHC) None Gold O Cash Mobile Money Quantity Visa Diamond Platinum Add Other Payment Sales Information PRODUCT I UNIT PRICE | QUANTITY TOTAL Sugar I GHC 10 15 IGHC 50 Sub Total VAT NHIA Discount Amount Due Reset Compute Exit Fig. 1. GUI of the Proposed system Application Use and Special Instructions The application user will enter the Product Name, the quantity to be purchased, and the unit price as shown in the fig. 1 above. Price: The price for a product is written on the label of the products itself. The employee at the checkout desk need to pick each product and then enter the details into the system, one at a time to generate a receipt for the purchase. A receipt may contain multiple products. Table 2. Taxes to be paid Tax NHIL VAT Amount (%) 2.6 17.5 Data Input: Data is entered into the input TextBox controls. This includes entering the Product Name, quantity, unit price, checking the appropriate membership and mode of payment radio buttons. Programming Events. Use the above information to answer sub questions (a) to (e). ii. a. When the ADD Button is clicked, your code must: i. Compute Total: This is computed for each product separately (unit price times quantity). [2 Mark] Add the product, quantity, unit price and Total into the Receipt (Listbox Control) [3 Marks] iii. Compute Subtotal: This is computed as the sum of all the Totals in the receipt. The price of the sale before tax and discount. [ 2 Mark] iv. Constants: You must declare constants to store the discount rates and tax rates, as appropriate. [ 2 Mark] V. Add remarks to the program as required. [ 1 Mark] vi. You must set OPTION STRICT ON. [ 1 Mark] vii. Use the appropriate methods to FORMAT all your outputs. [ 1 Mark] b. Validating Data. You must write code to enforce the business rules listed below i. Rule #1 - none of the textboxes (Product, unit price and quantity) in the "Enter Product Info group can be blank. [ 3 Marks] ii. Rule #2 - the quantity and unit price TextBoxes must each contain only a numeric value that is greater than zero. [ 3 Marks] iii. Rule #3 the Quantity TextBox must contain a whole number value that is greater than zero (customer should not be able to by half a tin of milk). [3 Marks] When the Compute Button is clicked, your code must: i. ii. iii. iv. Calculate VAT: All customers must pay VAT on their purchase. The tax rate is 17.5% and is computed on the subtotal. [3 Marks] Calculate NHIL: All customers must pay NHIL on their purchase. The tax rate is 2.6% and is computed on the subtotal. [3 Marks] Calculate Membership Discount : Customers are given a discount based on their membership level. Depending on which membership radio button is selected, the appropriate discount must be calculated. (use the rates in table la in the discount section above to compute the discount on the subtotal. [ 4 Marks) Calculate Discount based on Mode of payment: Customers are given a discount based on their mode of payment. Depending on which radio button is selected from the mode of payment section, the appropriate discount must be calculated. (use the rates in table 1b in the discount section above to compute the discount on the subtotal. [4 Marks] Calculate Discount: calculate the total discount given for the sale. [ 2 Mark] Calculate Grand Total: This is computed as the subtotal plus all taxes less the value of the Discount. [ 2 Mark] Display all results in the textboxes controls in the Payment Group. [ 3 Marks] V. vi. vii. d. When the Reset Button is clicked, your code must: i. Clear all data input and output TextBox controls. [ 3 Marks] ii. Reset the Membership RadioButton control to the None option. [ 2 Mark] iii. Reset the Mode of payment RadioButton control to the Cash option. [ 2 Mark] iv. Set focus to the Product TextBox control. [ 1 Mark] e. Exit Button Coding. When the Button is clicked, do not automatically close the form. Instead, write code to only close the form if the application user responds Yes to the question from a dialog box. The code should default the selection to the No button. [5 marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

What is the principle of thermodynamics? Explain with examples

Answered: 1 week ago