Answer to Question #255951 in Java | JSP | JSF for Frans

Question #255951

The application should prompt the owner for a login confirmation code after their have enter the pin. Once logged in system will then offer the following options to the admin, the privilege to restock/ add new items to the vending machine, change prices, Cash out certain amounts from machine, cash in amount, print out a summary of all items in stock, print out amount of cash in categories(How many 100s, 50s up to 5cs)and print out only items that need restocking (all items below 25 need ) or exit, create a menu for this options. [ When cashing out/in amounts the owner indicates how many 100s, 50s and so on] The customer should be able to buy items and get a receipts with all details of items bought, can be able to buy more than one items. The printed receipt contains the details: the item name, quantity, price and total, it should also give a description of the change given out. Your change is disbursed as follows: N$100 X 1, N$10X1, N$5X1 ,N$1X3,10centsX3 and 5centsX1. Do the codes, pseudocodes, flowchart

1
Expert's answer
2021-10-24T18:49:14-0400
import java.util.Scanner;
public class Main
{
    static void getPin(){
        
    }
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		String pin,pin2;
		while(true){
		    System.out.println("Set pin: ");
    		pin=in.next();
    		int n=pin.length();
    		System.out.println("Confirm pin: ");
    		pin2=in.next();
    		int n2=pin.length();
    		if (n>=6 && n2>=6)
    		    break;
		}
		if(pin.equals(pin2)){
		    System.out.println("The pin is set successfully");
		    System.out.println("Your pin is: "+pin);
		}
		else
		    System.out.println("The pins entered do not match. Please run the program and try again.");
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS