Brother Please end me
This commit is contained in:
		
							parent
							
								
									390b59addf
								
							
						
					
					
						commit
						364fa45534
					
				
					 26 changed files with 378 additions and 2 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/30.10.24-Player-Klasse/src/Player.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/30.10.24-Player-Klasse/src/Player.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										27
									
								
								Code/Steiner/30.10.24-Player-Klasse/src/Player.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								Code/Steiner/30.10.24-Player-Klasse/src/Player.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| public class Player { | ||||
|     private int id; | ||||
|     private String name; | ||||
|     private static int counter = 1; | ||||
| 
 | ||||
|     Player(String name) { | ||||
|         this.id = counter; | ||||
|         counter++; | ||||
|         this.name = name; | ||||
|     } | ||||
| 
 | ||||
|     public int getId() { | ||||
|         return id; | ||||
|     } | ||||
| 
 | ||||
|     public void setId(int id) { | ||||
|         this.id = id; | ||||
|     } | ||||
| 
 | ||||
|     public String getName() { | ||||
|         return name; | ||||
|     } | ||||
| 
 | ||||
|     public void setName(String name) { | ||||
|         this.name = name; | ||||
|     } | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								Code/Steiner/30.10.24-Player-Klasse/src/PlayerTest.class
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Code/Steiner/30.10.24-Player-Klasse/src/PlayerTest.class
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										13
									
								
								Code/Steiner/30.10.24-Player-Klasse/src/PlayerTest.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								Code/Steiner/30.10.24-Player-Klasse/src/PlayerTest.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| public class PlayerTest { | ||||
|     public static void main(String[] args) { | ||||
|         Player[] players = new Player[20]; | ||||
|         String[] names = { "Eva", "Fritz", "Anna", "Luca", "Sara", "Max", "Zoe", "Leo", "Nina", "Tom", | ||||
|                 "Ella", "Jake", "Mia", "Liam", "Sophie", "Noah", "Emma", "Ben", "Olivia", "Eli" }; | ||||
|         for (int i = 0; i < players.length; i++) { | ||||
|             players[i] = new Player(names[i]); | ||||
|         } | ||||
|         for (Player player : players) { | ||||
|             System.out.println(player.getId() + " " + player.getName()); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sage The DM
						Sage The DM