Erster Push

master
gevorgmargaryan 2024-04-08 10:08:57 +02:00
commit cd545041d8
9 changed files with 172 additions and 0 deletions

View File

@ -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>

1
PR2(UIB)/.gitignore vendored 100644
View File

@ -0,0 +1 @@
/bin/

17
PR2(UIB)/.project 100644
View File

@ -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>

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -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

View File

@ -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;
}
}

View File

@ -0,0 +1,5 @@
package verwaltung.kunde;
public class GescheaftsKunde {
}

View File

@ -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());
}
}

View File

@ -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;
}
}