Inventory and POS System. Stage 5/5

Point of Sale

Report a typo

Description

Well done! Your program now keeps excellent track of the Merchant's inventory! In the final stage, you need to add the final touch — users should be able to input sales orders. The inventory must reflect this.

Objectives

To finalize the project, do the following steps:

  1. The TabbedPane should have a new tab titled Customer Sale. This tab will allow users to input the sales. It should contain the following elements. Make sure that the names are correct. Otherwise, the tests will fail:
    • JPanel named PosTopPanel — it should have one JLabel (PosInstructionLabel) and two JRadioButtons (SingleTypeOrderButton and MixedTypeOrderButton);
    • JPanel named SingleTypePanel that includes one JComboBox (SingleWineKindBox) and one JButton (SingleConfirmButton);
    • JPanel named MixedTypePanel that includes two JComboBox elements (MixedWineComboBox1 and MixedWineComboBox2) as well as one JButton (MixedConfirmButton);
    • JPanel named PosBottomPanel that includes two JTextFields (CustomerNameField and SaleAmountField), one JRadioButton LoyaltyDiscountButton), one JButton (SubmitOrderButton), and, finally, two JLabels: SaleMessageLabel and SaleSuccessMessageLabel.
  2. At this stage, the program prompts users to select whether it is a single type or a mixed sale. A sale includes 12 bottles. If a single type is selected, all 12 bottles will be of the same kind (use SingleWineKindBox to have a dropdown selection menu). If it is a mixed type sale, the sale will include six bottles of two different types; the types must be different in this case. The dropdown selection menu for all three JComboBox should contain the options; Rose, Merlot, Sauvignon.
  3. SingleTypePanel and MixedTypePanel should not be visible before selecting SingleTypeOrderButton and MixedTypeOrderButton respectively. CustomerNameField, SaleAmountField, LoyaltyDiscountButton, SubmitOrderButton should be disabled before the type of wine is confirmed by selecting wines via JComboBox.
  4. Once a sale is selected, users should enter the name of the customer and the sales amount. The customer name includes only the first name and starts with a capital letter. The sales amount is numeric. Introduce an option to apply a 15% discount on the price with a LoyaltyDiscountButton. After pressing on a SubmitOrderButton, your program should check if all of the conditions are met. Should there be an error, it must display a message on SaleSuccessMessageLabel. The message should contain the word Error.
  5. Finally, verify that after selling a box, the inventory reflects the change in the inventory.

Examples

Example 1: the sales type selection

Wine Merchant: the sales type selection

Example 2: customer name & amount input

Wine Merchant: customer name & amount input

Example 3: mixed type sales

Wine Merchant: mixed type sales

Example 4: mixed type sales confirmation

Wine Merchant: mixed type sales confirmation

Example 5: the order is complete!

Wine Merchant: the order is complete

Write a program
IDE integration
Checking the IDE status
___

Create a free account to access the full topic