This commit is contained in:
2025-04-25 10:53:02 +02:00
parent 6fcf072c09
commit aa10711fa1
6 changed files with 135 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package org.example;
import java.util.Date;
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
public static void main(String[] args) {
var arbeiter = new Mitarbeiter("Bernd", 55, 123, 213);
var person = new Student("Jakob", 24, 12345);
var frau = new Person("Gerda", 54);
var test = arbeiter.heiraten(frau);
System.out.println(test);
System.out.println(person.isVerheirated());
System.out.println(person.istVolljaehrig());
}
}