Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaktsg authored Apr 30, 2023
1 parent e855451 commit f00346b
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions Minglr/Main.java
Original file line number Diff line number Diff line change
@@ -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");
}
}

0 comments on commit f00346b

Please sign in to comment.