Userobjekt erstellt, kommentiert. UMLClient erstellt
This commit is contained in:
parent
9591946e9b
commit
09c4af5308
3 changed files with 99 additions and 20 deletions
59
src/client/User.java
Normal file
59
src/client/User.java
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (C) 2021 berdan
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author berdan
|
||||
*/
|
||||
|
||||
|
||||
public class User {
|
||||
|
||||
private String username;
|
||||
private String currentmessage;
|
||||
|
||||
/**
|
||||
* Der Konstrukter des User-Objektes
|
||||
* @param username1 Der Nutzername
|
||||
* @param message1 Die Nachricht
|
||||
*/
|
||||
public User(String username1, String message1){
|
||||
this.username = username1;
|
||||
this.currentmessage = message1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param newMessage Die neue Nachricht
|
||||
*/
|
||||
public void setMessage(String newMessage){
|
||||
this.currentmessage = newMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Die get-Methode für den Username
|
||||
* @return Der Nutzernamen
|
||||
*/
|
||||
|
||||
public String getUsername(){
|
||||
return this.username;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue