Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Practice;
- import java.util.*;
- public class Final
- {//public class braket
- public static void main(String[] args)
- {//String Arguments Bracket
- Scanner in= new Scanner(System.in);
- int main,ctr=2,siz=0,var=0, ctr1=4, ctr2=1,ctr3=3,ctr4=4;//x and y for the number and printlines ctr for mainmen, ctr1 for question names
- String yn; //for yes and no in case 1
- boolean mainMenu =true;
- String[][] customer_name = new String[50][2];
- customer_name[0][0]="Jerick";
- customer_name[0][1]="Razon";
- customer_name[1][0]="Rachelle";
- customer_name[1][1]="Corquera";
- customer_name[2][0]="Myka";
- customer_name[2][1]="Ilao";
- String[]size1 = new String[50];
- size1[0]="SPRITE";
- size1[1]="ROYAL";
- size1[2]="COKE";
- size1[3]="MOUNTAIN DEW";
- String[]size2 = new String[50];
- size2[0]="MOUNTAIN DEW";
- String[]size3 = new String[50];
- size3[0]="SPRITE";
- size3[1]="ROYAL";
- size3[2]="COKE";
- String[]size4 = new String[50];
- size4[0]="ARCY ROOTBEER";
- size4[1]="FRUIT SODA JUICY LEMON";
- size4[2]="RC COLA";
- size4[3]="MEGA COLA";
- String[] questions= {"\nEnter your First Name: ","\nEnter your Last Name: "};
- String[] name= {"First Name: ","Last Name: ",};
- String[] sizes= {"\n(1) 750ml","(2) 355ml","(3) 250ml","(4) 240ml"};
- do{
- System.out.println("Welcome to Barki Softdrinks Dealership!!");
- System.out.println("\n ========Main Menu========");
- System.out.print("\n(1) Sell Softdrinks");
- System.out.print("\n(2) Update Stocks");
- System.out.print("\n(3) Update Price");
- System.out.print("\n(4) Logs of buyer");
- System.out.println("\n(5) Delete Stocks");
- System.out.print("\nInput number: ");
- main = in.nextInt();
- switch (main)
- {
- case 1:
- System.out.print("\nBuy softdrinks?(Yes/No): ");
- yn = in.next();
- if (yn.equalsIgnoreCase("yes"))
- {//closed
- for(int x = 0; x <2; x++)
- {
- System.out.print(questions[x]);
- customer_name[ctr][x] = in.next();
- }
- ctr++;
- System.out.print("\n~Select size of softdrinks per case~ \n");
- for(int x=0; x<4; x++)
- {
- System.out.println(sizes[x]);
- }
- System.out.print("\nInput Number : ");
- siz=in.nextInt();
- System.out.println("\n ========Available Variant/Flavor========");
- if (siz==1)
- {
- for(int y = 0; y<ctr1; y++)
- {
- System.out.print("("+(y+1)+") ");
- System.out.println(size1[y]);
- }
- System.out.print("\nInput Number : ");
- var=in.nextInt();
- }
- else if(siz==2)
- {
- for(int y = 0; y<ctr2; y++)
- {
- System.out.print("("+(y+1)+") ");
- System.out.println(size2[y]);
- }
- System.out.print("\nInput Number : ");
- var=in.nextInt();
- }
- else if(siz==3)
- {
- }
- }//end for if yes
- else if (yn.equalsIgnoreCase("no"))
- {
- System.out.println("\nTHANK YOU FOR VISITING!!\n");
- }
- else
- {
- System.out.println("\nINVALID INPUT\n");
- }
- break;
- }//end for if main
- }while(mainMenu);
- }//end for String
- }//end for public class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement