Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 Cash Mobile Money Visa Other Quantity Diamond Platinum Add 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. Discounts: Tylon-Gh runs a discount program based on membership status and mode of payment. If the customer has a membership card, his membership level is selected from the membership group of radio buttons. Otherwise, the None radio button is selected. Also, the user must select the payment mode from the group of radio buttons. For Memberships and mode of payment, the None and Cash RadioButton controls should be checked as the default, respectively, when the form starts up. Details of the discount is as shown in tables la and 1b below: Table 1a. Membership Discount Rates Table 1b. Payment Mode Discount rates Page 3 of 8 Discount (%) 0 Membership Type None Gold Diamond Platinum Discount (%) 0 5 7.5 10 Payment Mode Cash Mobile Money Visa Card Other 1 3 0.5 Taxes: The laws of Ghana requires all Customer of Tylon-Gh to pay two (2) types of taxes in all shops. ie. VAT and NHIL. The taxes are calculated separately on the cost of the purchase and later added to the cost of the purchase. Details of the taxes are given in Table 2 below: 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) 13 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] 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started