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 currentStreak;
private int maxStreak;
private int[] winInTurn;
private int[] wonInTurn;
/**
* Konstruktor für Objekte der Klasse User
@ -30,10 +30,10 @@ public class User
* @param y ein Beispielparameter für eine Methode
* @return die Summe aus x und y
*/
public void setPassword(String pW)
public void setPassword(String password)
{
// tragen Sie hier den Code ein
password = pW;
this.password = password;
}
public String getPassword()
@ -41,10 +41,10 @@ public class User
return password;
}
public void setName(String pN)
public void setName(String name)
{
// tragen Sie hier den Code ein
name = pN;
this.name = name;
}
public String getName()
@ -52,16 +52,61 @@ public class User
return name;
}
public void setName(String pN)
public void setTimesPlayed(int timesPlayed)
{
// 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.to=DatabaseConnector
dependency7.type=UsesDependency
editor.fx.0.height=722
editor.fx.0.width=800
editor.fx.0.x=346
editor.fx.0.y=91
editor.fx.0.height=1017
editor.fx.0.width=854
editor.fx.0.x=-7
editor.fx.0.y=0
objectbench.height=96
objectbench.width=1201
package.divider.horizontal=0.6
@ -59,19 +59,19 @@ target2.width=120
target2.x=110
target2.y=80
target3.height=70
target3.name=User
target3.name=Game
target3.showInterface=false
target3.type=ClassTarget
target3.width=120
target3.x=770
target3.y=50
target3.x=960
target3.y=30
target4.height=70
target4.name=Game
target4.name=User
target4.showInterface=false
target4.type=ClassTarget
target4.width=120
target4.x=960
target4.y=30
target4.x=770
target4.y=50
target5.height=70
target5.name=Server
target5.showInterface=false
@ -87,23 +87,23 @@ target6.width=120
target6.x=540
target6.y=210
target7.height=70
target7.name=List
target7.name=GUI
target7.showInterface=false
target7.type=ClassTarget
target7.width=140
target7.x=390
target7.y=380
target7.width=120
target7.x=630
target7.y=80
target8.height=70
target8.name=GUI
target8.name=List
target8.showInterface=false
target8.type=ClassTarget
target8.width=120
target8.x=630
target8.y=80
target8.width=150
target8.x=390
target8.y=380
target9.height=60
target9.name=Queue
target9.showInterface=false
target9.type=ClassTarget
target9.width=120
target9.width=160
target9.x=80
target9.y=380

112
umlet.uxf
View File

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