@@ -3,7 +3,7 @@ | |||
<component name="JavaScriptSettings"> | |||
<option name="languageLevel" value="ES6" /> | |||
</component> | |||
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="true" project-jdk-name="10" project-jdk-type="JavaSDK"> | |||
<output url="file://$PROJECT_DIR$/../gitchareswe" /> | |||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="false" project-jdk-name="10" project-jdk-type="JavaSDK"> | |||
<output url="file://$USER_HOME$/gitchareswe" /> | |||
</component> | |||
</project> |
@@ -0,0 +1,12 @@ | |||
public class Account { | |||
public Person owner; | |||
public String email; | |||
public void accountErstellen(Person p, String e_email){ | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
public class Beduerftiger { | |||
public String bFirstName; | |||
public String bLastName; | |||
public String bNeed; | |||
public Beduerftiger(){ | |||
} | |||
public Beduerftiger(String theFirstName, String theLastName, String theNeed ){ | |||
this.bFirstName = theFirstName; | |||
this.bLastName = theLastName; | |||
this.bNeed = theNeed; | |||
} | |||
} |
@@ -30,20 +30,12 @@ public class Credentials { | |||
System.out.println(pw); | |||
} | |||
compare(name, pw); | |||
} | |||
return false; | |||
} | |||
private void compare(String name, String pw) { | |||
} | |||
@@ -0,0 +1,15 @@ | |||
public class Person { | |||
public String name; | |||
public String vname; | |||
public int age; | |||
Person(String name, String vname, int age){ | |||
this.name = name; | |||
this.vname = vname; | |||
this.age = age; | |||
} | |||
} |
@@ -0,0 +1,20 @@ | |||
public class Spender extends Person{ | |||
private int amount; | |||
public Spender (String fname, String lname, int age, int summe){ | |||
super(fname, lname, age); | |||
this.amount = summe; | |||
} | |||
public void betragSetzen(int summe){ | |||
if(summe > 0){ | |||
amount = summe; | |||
} | |||
} | |||
public int getAmount(){ | |||
return amount; | |||
} | |||
} |
@@ -0,0 +1,27 @@ | |||
import org.junit.Test; | |||
import static org.junit.Assert.*; | |||
public class TestBeduerftiger { | |||
@Test | |||
public void firstNameChange(){ | |||
String bfirstName= "Jesus"; | |||
String result ="Jesus"; | |||
assertEquals(bfirstName, result); | |||
} | |||
@Test | |||
public void lastNameChange(){ | |||
String bLastName= "Gottessohn"; | |||
String result ="Gottessohn"; | |||
assertEquals(bLastName, result); | |||
} | |||
@Test | |||
public void NeedChange(){ | |||
String bNeed= "Abendmahl"; | |||
String result ="Abendmahl"; | |||
assertEquals(bNeed, result); | |||
} | |||
} |