Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Microwave
- /*By อามมมมมมมมี่ ภาคสองเพิ่มแบนวิช
- facebook:codegeassmasterzeronebreakout
- At banlnw*/
- import java.util.Scanner;
- class Main
- {
- public static void main(String[] args)
- {
- Microwave m=new Microwave();
- p("Status:OFF,Microwave\n");
- try{
- m.inputConnect();
- }catch(Exception e)
- {
- p("Error :There is something wrong\n");
- }
- }
- static void p(String input)
- {
- System.out.print(input);
- }
- }
- class Microwave
- {
- static Scanner s=new Scanner(System.in);
- Byte Connect;
- String Bringfood;
- int sec;
- int watt;
- void inputConnect() throws InterruptedException
- {
- p("Switches \n"
- + "1.On \n"
- + "2.Off\n"
- + "Choose Menu :");
- Connect=s.nextByte();
- if(Connect==1)
- {
- p("DETAIL: Microwave SHARP 22 liter ver. R-220 while\n");
- p(":=========Open,Microwave=========:\n");
- inputBringfood();
- inputtime();
- inputspectrum();
- p("Microwave Working Pls Wait.....\n");
- Thread.sleep(200*gettime());
- p("Success\n");
- p(":=========Close,Microwave=========:\n");
- }
- else{
- p("Microwave oven was off to do so\n");
- }
- }
- void inputBringfood()
- {
- p("Input food in Microwave :");
- Bringfood=s.next();
- p("\n");
- }
- void inputtime()
- {
- p("Set Time Second :");
- sec=s.nextInt();
- p("\n");
- }
- int gettime()
- {
- return sec;
- }
- void inputspectrum()
- {
- p("Set Spectrum watt:");
- watt=s.nextInt();
- p("\n");
- }
- static void p(String input)
- {
- System.out.print(input);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment