Erster Push
commit
cd545041d8
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -0,0 +1 @@
|
|||
/bin/
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>PR2(UIB)</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,14 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
|
@ -0,0 +1,47 @@
|
|||
package verwaltung.kunde;
|
||||
|
||||
public class Adress {
|
||||
|
||||
private String name;
|
||||
private String straße;
|
||||
private int PLZ;
|
||||
private String wohnort;
|
||||
|
||||
public Adress(String name, String straße, int PLZ, String wohnort) {
|
||||
this.name = name;
|
||||
this.straße = straße;
|
||||
this.PLZ = PLZ;
|
||||
this.wohnort = wohnort;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getStraße() {
|
||||
return straße;
|
||||
}
|
||||
public void setStraße(String straße) {
|
||||
straße = straße;
|
||||
}
|
||||
public int getPLZ() {
|
||||
return PLZ;
|
||||
}
|
||||
public void setPLZ(int pLZ) {
|
||||
PLZ = pLZ;
|
||||
}
|
||||
public String getWohnort() {
|
||||
return wohnort;
|
||||
}
|
||||
public void setWohnort(String wohnort) {
|
||||
wohnort = wohnort;
|
||||
}
|
||||
|
||||
|
||||
public String toString() {
|
||||
String output = "Name des Kunden; " + this.name + " Straße: " + this.straße + " PLZ: " + this.PLZ + " Wohnort: " + this.wohnort;
|
||||
return output;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
package verwaltung.kunde;
|
||||
|
||||
public class GescheaftsKunde {
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package verwaltung.kunde;
|
||||
|
||||
public class Kunde {
|
||||
|
||||
private String vorname, nachname;
|
||||
protected static int lastUsedId;
|
||||
private int kundenId;
|
||||
private Adress adress;
|
||||
|
||||
public Kunde(String vorname, String nachname) {
|
||||
kundenId = lastUsedId;
|
||||
lastUsedId++;
|
||||
|
||||
this.vorname = vorname;
|
||||
this.nachname = nachname;
|
||||
}
|
||||
|
||||
|
||||
public Adress getAdress() {
|
||||
return adress;
|
||||
}
|
||||
|
||||
public void setAdress(Adress adress) {
|
||||
this.adress = adress;
|
||||
}
|
||||
|
||||
public Kunde(Adress adress) {
|
||||
this.adress = adress;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String output = "Kundenadresse: " + this.adress;
|
||||
return output;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Adress adress = new Adress("Max","Q2",68161,"Mannheim");
|
||||
Kunde kunde = new Kunde(adress);
|
||||
|
||||
System.out.println(kunde.toString());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package verwaltung.kunde;
|
||||
|
||||
public class PrivateKunde extends Kunde{
|
||||
|
||||
private String telefone, email;
|
||||
private String berater;
|
||||
|
||||
public PrivateKunde(String vorname, String nachname, String telefon, String email) {
|
||||
super(vorname, nachname);
|
||||
|
||||
this.telefone = telefone;
|
||||
this.email = email;
|
||||
this.berater = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Diese Methode setzt einen Berater einesx PrivateKunden
|
||||
* @param berater
|
||||
* @param overwrite
|
||||
* @return
|
||||
*/
|
||||
|
||||
public boolean setBerater(String berater, boolean overwrite) {
|
||||
if(this.berater != null || overwrite) {
|
||||
this.berater = berater;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue