-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4023549
commit 931def8
Showing
6 changed files
with
68 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
|
||
import java.util.Scanner; | ||
|
||
public class Main { | ||
public static void main(String[] args){ | ||
User user1 = new User("elyes2"); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
import java.util.Scanner; | ||
|
||
public class ThreadMenu extends Thread { | ||
|
||
|
||
private static User user; | ||
|
||
public ThreadMenu(String name, User user1){ | ||
super(name); | ||
user = user1; | ||
} | ||
|
||
public void run(){ | ||
int choix = 0; | ||
System.out.println("MENU : \n 1 : Voir liste des utilisateurs présents \n 2 : Initialiser communication (TCP) \n 9 : Quitter"); | ||
|
||
|
||
while(choix != 9) { | ||
|
||
Scanner sc = new Scanner(System.in); | ||
choix = sc.nextInt(); | ||
|
||
switch(choix){ | ||
case 1: user.getListUser().toString(); | ||
System.out.println(">>>>>>"); | ||
break; | ||
// case 2: .. | ||
//break; | ||
case 9 : return ; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters