User klasse increase fehlt

This commit is contained in:
Alperen
2022-02-10 11:35:59 +01:00
parent ee038e8a7f
commit 120b704cd2
3 changed files with 129 additions and 84 deletions

View File

@@ -13,7 +13,7 @@ public class User
private int winPercentage; private int winPercentage;
private int currentStreak; private int currentStreak;
private int maxStreak; private int maxStreak;
private int[] winInTurn; private int[] wonInTurn;
/** /**
* Konstruktor für Objekte der Klasse User * Konstruktor für Objekte der Klasse User
@@ -30,10 +30,10 @@ public class User
* @param y ein Beispielparameter für eine Methode * @param y ein Beispielparameter für eine Methode
* @return die Summe aus x und y * @return die Summe aus x und y
*/ */
public void setPassword(String pW) public void setPassword(String password)
{ {
// tragen Sie hier den Code ein // tragen Sie hier den Code ein
password = pW; this.password = password;
} }
public String getPassword() public String getPassword()
@@ -41,10 +41,10 @@ public class User
return password; return password;
} }
public void setName(String pN) public void setName(String name)
{ {
// tragen Sie hier den Code ein // tragen Sie hier den Code ein
name = pN; this.name = name;
} }
public String getName() public String getName()
@@ -52,16 +52,61 @@ public class User
return name; return name;
} }
public void setName(String pN) public void setTimesPlayed(int timesPlayed)
{ {
// tragen Sie hier den Code ein // tragen Sie hier den Code ein
name = pN; this.timesPlayed = timesPlayed;
} }
public String getName() public int getTimesPlayed()
{ {
return name; return timesPlayed;
} }
public void setwinPercentage(int winPercentage)
{
// tragen Sie hier den Code ein
this.winPercentage = winPercentage;
}
public int getWinPercentage()
{
return winPercentage;
}
public void setCurrentStreak(int currentStreak)
{
// tragen Sie hier den Code ein
this.currentStreak = currentStreak;
}
public int getCurrentStreak()
{
return currentStreak;
}
public void setMaxStreak(int maxStreak)
{
// tragen Sie hier den Code ein
this.maxStreak = maxStreak;
}
public int getMaxStreak()
{
return maxStreak;
}
public void setWonInTurn(int[] wonInTurn)
{
this.wonInTurn = wonInTurn;
}
public int getWonInTurn(int turn)
{
int temp = wonInTurn[turn];
return temp;
}
} }

View File

@@ -20,10 +20,10 @@ dependency6.type=UsesDependency
dependency7.from=Game dependency7.from=Game
dependency7.to=DatabaseConnector dependency7.to=DatabaseConnector
dependency7.type=UsesDependency dependency7.type=UsesDependency
editor.fx.0.height=722 editor.fx.0.height=1017
editor.fx.0.width=800 editor.fx.0.width=854
editor.fx.0.x=346 editor.fx.0.x=-7
editor.fx.0.y=91 editor.fx.0.y=0
objectbench.height=96 objectbench.height=96
objectbench.width=1201 objectbench.width=1201
package.divider.horizontal=0.6 package.divider.horizontal=0.6
@@ -59,19 +59,19 @@ target2.width=120
target2.x=110 target2.x=110
target2.y=80 target2.y=80
target3.height=70 target3.height=70
target3.name=User target3.name=Game
target3.showInterface=false target3.showInterface=false
target3.type=ClassTarget target3.type=ClassTarget
target3.width=120 target3.width=120
target3.x=770 target3.x=960
target3.y=50 target3.y=30
target4.height=70 target4.height=70
target4.name=Game target4.name=User
target4.showInterface=false target4.showInterface=false
target4.type=ClassTarget target4.type=ClassTarget
target4.width=120 target4.width=120
target4.x=960 target4.x=770
target4.y=30 target4.y=50
target5.height=70 target5.height=70
target5.name=Server target5.name=Server
target5.showInterface=false target5.showInterface=false
@@ -87,23 +87,23 @@ target6.width=120
target6.x=540 target6.x=540
target6.y=210 target6.y=210
target7.height=70 target7.height=70
target7.name=List target7.name=GUI
target7.showInterface=false target7.showInterface=false
target7.type=ClassTarget target7.type=ClassTarget
target7.width=140 target7.width=120
target7.x=390 target7.x=630
target7.y=380 target7.y=80
target8.height=70 target8.height=70
target8.name=GUI target8.name=List
target8.showInterface=false target8.showInterface=false
target8.type=ClassTarget target8.type=ClassTarget
target8.width=120 target8.width=150
target8.x=630 target8.x=390
target8.y=80 target8.y=380
target9.height=60 target9.height=60
target9.name=Queue target9.name=Queue
target9.showInterface=false target9.showInterface=false
target9.type=ClassTarget target9.type=ClassTarget
target9.width=120 target9.width=160
target9.x=80 target9.x=80
target9.y=380 target9.y=380

112
umlet.uxf
View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.3.0"> <diagram program="umlet" version="14.3.0">
<zoom_level>9</zoom_level> <zoom_level>12</zoom_level>
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>648</x> <x>636</x>
<y>198</y> <y>144</y>
<w>90</w> <w>120</w>
<h>27</h> <h>36</h>
</coordinates> </coordinates>
<panel_attributes>Server</panel_attributes> <panel_attributes>Server</panel_attributes>
<additional_attributes/> <additional_attributes/>
@@ -15,10 +15,10 @@
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>648</x> <x>636</x>
<y>315</y> <y>300</y>
<w>90</w> <w>120</w>
<h>27</h> <h>36</h>
</coordinates> </coordinates>
<panel_attributes>WordleServer</panel_attributes> <panel_attributes>WordleServer</panel_attributes>
<additional_attributes/> <additional_attributes/>
@@ -27,9 +27,9 @@
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>684</x> <x>684</x>
<y>216</y> <y>168</y>
<w>27</w> <w>36</w>
<h>117</h> <h>156</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;&lt;-</panel_attributes> <panel_attributes>lt=&lt;&lt;-</panel_attributes>
<additional_attributes>10.0;10.0;10.0;110.0</additional_attributes> <additional_attributes>10.0;10.0;10.0;110.0</additional_attributes>
@@ -37,10 +37,10 @@
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>171</x> <x>0</x>
<y>405</y> <y>420</y>
<w>261</w> <w>348</w>
<h>351</h> <h>468</h>
</coordinates> </coordinates>
<panel_attributes>User <panel_attributes>User
-- --
@@ -53,7 +53,7 @@
-maxStreak: int -maxStreak: int
-wonInTurn: int[] -wonInTurn: int[]
-- --
+setPassword(String pw): void +setPassword(String password): void
+getPassword(): String +getPassword(): String
+setName(String name): void +setName(String name): void
+getName(): String +getName(): String
@@ -72,10 +72,10 @@
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>306</x> <x>180</x>
<y>297</y> <y>276</y>
<w>126</w> <w>168</w>
<h>27</h> <h>36</h>
</coordinates> </coordinates>
<panel_attributes>DatabaseConnector</panel_attributes> <panel_attributes>DatabaseConnector</panel_attributes>
<additional_attributes/> <additional_attributes/>
@@ -84,9 +84,9 @@
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>684</x> <x>684</x>
<y>333</y> <y>324</y>
<w>108</w> <w>144</w>
<h>90</h> <h>120</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
-wordleServer</panel_attributes> -wordleServer</panel_attributes>
@@ -95,10 +95,10 @@
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>558</x> <x>516</x>
<y>405</y> <y>420</y>
<w>270</w> <w>360</w>
<h>99</h> <h>132</h>
</coordinates> </coordinates>
<panel_attributes>Game <panel_attributes>Game
-- --
@@ -113,10 +113,10 @@
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>936</x> <x>1020</x>
<y>405</y> <y>420</y>
<w>216</w> <w>288</w>
<h>63</h> <h>84</h>
</coordinates> </coordinates>
<panel_attributes>GUI <panel_attributes>GUI
-- --
@@ -127,10 +127,10 @@
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>252</x> <x>108</x>
<y>207</y> <y>156</y>
<w>90</w> <w>120</w>
<h>27</h> <h>36</h>
</coordinates> </coordinates>
<panel_attributes>QueryResult</panel_attributes> <panel_attributes>QueryResult</panel_attributes>
<additional_attributes/> <additional_attributes/>
@@ -138,10 +138,10 @@
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>423</x> <x>336</x>
<y>396</y> <y>408</y>
<w>153</w> <w>204</w>
<h>36</h> <h>48</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
-user</panel_attributes> -user</panel_attributes>
@@ -150,10 +150,10 @@
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>819</x> <x>864</x>
<y>396</y> <y>408</y>
<w>135</w> <w>180</w>
<h>36</h> <h>48</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
-gui</panel_attributes> -gui</panel_attributes>
@@ -162,10 +162,10 @@
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>423</x> <x>336</x>
<y>297</y> <y>276</y>
<w>198</w> <w>264</w>
<h>126</h> <h>168</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
-databaseConnector</panel_attributes> -databaseConnector</panel_attributes>
@@ -174,10 +174,10 @@
<element> <element>
<id>UMLClass</id> <id>UMLClass</id>
<coordinates> <coordinates>
<x>936</x> <x>1020</x>
<y>90</y> <y>0</y>
<w>216</w> <w>288</w>
<h>225</h> <h>300</h>
</coordinates> </coordinates>
<panel_attributes>Letter <panel_attributes>Letter
-- --
@@ -196,10 +196,10 @@ GREEN: byte = 2
<element> <element>
<id>Relation</id> <id>Relation</id>
<coordinates> <coordinates>
<x>1035</x> <x>1152</x>
<y>306</y> <y>288</y>
<w>117</w> <w>156</w>
<h>117</h> <h>156</h>
</coordinates> </coordinates>
<panel_attributes>lt=&lt;. <panel_attributes>lt=&lt;.
-letters: Letter[][]</panel_attributes> -letters: Letter[][]</panel_attributes>