Point of Sale UI IN JAVA Point of sale interfaces are designed to simplify the p
ID: 3690705 • Letter: P
Question
Point of Sale UI IN JAVA
Point of sale interfaces are designed to simplify the process of making transactions, often in a retail environment. We often see them used in restaurants where managers can input the menu and waiters can quickly enter customer orders, which are transmitted to the kitchen and recorded. Modern systems usually include a touchscreen interface, which we will simulate with a mouse-based GUI.
The program you should design and build will read a menu from a text file formatted with a menu item and a price separated by a |. To simplify your text-parsing code, we will omit the dollar sign from the price.
For example:
The program should load the file at launch and create a panel full of large buttons (ideal for a touchscreen) for each menu item. A waiter should be able to click on each menu item to add it to the current order. This should add the item to a receipt panel which displays the full order and the total cost. The total cost should be accurate at all times, updated as each item is added (not only when the order is finalized).
The system only takes credit card as payment type however it can handle/validate multiple types of credit cards. (Please see credit card section below).
The waiter should be able to click a “Place Order” button that simulates transmitting the order to the kitchen by printing the order to System.out (in addition to showing the confirmation on screen). You should also include a “Clear” button that will clear the current order (used when a waiter makes a mistake and needs to start over).
Credit Card
In your system you have the following class structure for the credit cards:
a class CreditCard,
classes VisaCC, MasterCC, AmExCC that are all subclasses of CreditCard,
you assume more subclasses for other credit card types will be added later on.
You now have to design the method(s) (and maybe additional classes) that verifies that the credit card number is a possible account number, and creates an instance of the appropriate credit card class.
Important details: Credit card numbers cannot exceed 19 digits, including a single check digit in the rightmost position. The exact algorithm for calculating the check digit as defined in ISO 2894/ANSI 4.13 is not important for this assignment. You can also determine the card issuer based on the credit card number:
Hint: you face here (at least) two problems, one has to do with how you figure out what kind of card a specific record is about, the other one with how you create the appropriate objects. Look at behavioural patterns and at creational patterns.
MasterCard First digit is a 5, second digit is in range 1 through 5 inclusive. Only valid lenght of number is 16 digits. Visa First digit is a 4. Length is either 13 or 16 digits. AmericanExpress First digit is a 3 and second digit a 4 or 7. Length is 15 digits. Discover First four digits are 6011. Length is 16 digits.