The Hat Shop POS class project that allows customers to choose from an array of hats that is tracked by our inventory system.
As a group assignment, we were instructed to write a cash register or self-service terminal for a fictitious retail location.
How the POS Works
- Present a menu to the user and let them choose an item number.
- Allow the user to choose a quantity for the item ordered.
- Give the user a line total (item price * quantity).
- Through separate question, allow them to re-display the menu and to complete the purchase.
- We Ask for payment type—cash, credit, check, and Cryptocurrency.
- Once the receipt is displayed, the menu is redisplayed.
Special Features
What makes our project different is that we decided to modernize our POS system, and chose to accept Crypto Currency as a payment option. We also added loyalty points for returning customers.
Special Functions
This function allows the customer to add loyalty points for future discounts.
public static void loyaltyCard() {
Scanner scan = new Scanner(System.in);
System.out.println("Please enter your customer loyalty card number:");
String cardNum = scan.nextLine();
System.out.println("The points you've earned today will print on your receipt!");
}
This function allows customers to use digital currency.
public static void walletAddress() {
Scanner scan = new Scanner(System.in);
System.out.println("Please enter your wallet address:");
String address = scan.nextLine();
while(address.length() < 23 || address.length() > 35){
if(address.length() < 23 || address.length() > 35) {
System.out.println("Please enter a valid address:");
address = scan.nextLine();
}
}
scan.close();
}