1
0
Fork 0

Stand nach erstem Tag.

master
Robert Jacob 7 years ago
parent 0d906f0389
commit 332ee69696
  1. 3
      .gitignore
  2. 14
      src/Mitarbeiter.java
  3. 23
      src/Person.java
  4. 17
      src/PersonenListe.java

3
.gitignore vendored

@ -0,0 +1,3 @@
.classpath
.project
.settings/

@ -0,0 +1,14 @@
public class Mitarbeiter extends Person {
int gehalt;
public int getGehalt() {
return this.gehalt;
}
public void setGehalt(int neuesGehalt) {
this.gehalt = neuesGehalt;
}
}

@ -0,0 +1,23 @@
public class Person {
String name;
int alter;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAlter() {
return alter;
}
public void setAlter(int alter) {
this.alter = alter;
}
}

@ -0,0 +1,17 @@
public class PersonenListe {
int variable = 42;
public static void main(String[] args) {
System.out.println("Hacknology");
Person a = new Person();
System.out.println("Person A: " + a);
System.out.println(" Name: " + a.getName());
a.setName("Peter");
System.out.println("Person A: " + a);
System.out.println(" Name: " + a.getName());
}
}
Loading…
Cancel
Save