From f00346b6cbb7aa8fb1ddae556a76f35a6fdfb5f2 Mon Sep 17 00:00:00 2001 From: Bhakti Girase <109686977+bhaktsg@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:17:44 +0530 Subject: [PATCH] Add files via upload --- Minglr/Main.java | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Minglr/Main.java diff --git a/Minglr/Main.java b/Minglr/Main.java new file mode 100644 index 0000000..5fe6b8d --- /dev/null +++ b/Minglr/Main.java @@ -0,0 +1,69 @@ +package socialnetwork; + +import java.io.IOException; +import java.util.*; + +// Class MainPage +public class Main +{ + public static void clearScreen() + { + System.out.flush(); + } + + // Main Function + public static void main(String[] args) throws IOException, InterruptedException + { + clearScreen(); + + // Add already created accounts + AddAcc.addAcc(); + + int choice; + Scanner sc = new Scanner(System.in); + + // Object of CreateAccount Class + CreateAccount obj1 = new CreateAccount(); + + // Object of Login Class + Login obj2 = new Login(); + + // MAIN PAGE + do { + System.out.println("\n\n------------------------------------------------------------"); + System.out.println("\t\t WELCOME TO MINGLR !!!"); + System.out.println("------------------------------------------------------------"); + + System.out.println("\n\n To Create a New Account: Enter 1"); + System.out.println("\n\n To Login: Enter 2"); + System.out.println("\n\n To Exit: Enter 3"); + System.out.println("\n\n------------------------------------------------------------"); + System.out.print("\n\n Enter Your Choice: "); + choice = sc.nextInt(); + + switch (choice) + { + case 1: + // Create Account + obj1.createAccount(); + break; + + case 2: + // Login + obj2.login(); + break; + + default: + // Clear Screen + clearScreen(); + } + + } while (choice != 3); + + sc.close(); + + System.out.println("\n\n\n\n-----------------------------"); + System.out.println("\n THANK YOU!!!"); + System.out.println("\n-----------------------------\n\n\n"); + } +} \ No newline at end of file