30 lines
771 B
Java
30 lines
771 B
Java
import java.io.*;
|
|
|
|
public class Task {
|
|
public static void main(String[] arguments) {
|
|
var coworker = new Coworker();
|
|
|
|
coworker.firstName = "Sebastian";
|
|
coworker.lastName = "Mayer";
|
|
coworker.number = "1234";
|
|
coworker.salary = 3000;
|
|
|
|
System.out.print("Vorname: ");
|
|
System.out.println(coworker.firstName);
|
|
|
|
System.out.print("Nachname: ");
|
|
System.out.println(coworker.lastName);
|
|
|
|
System.out.print("Personalnummer: ");
|
|
System.out.println(coworker.number);
|
|
|
|
System.out.print("Monatslohn: ");
|
|
System.out.println(coworker.salary);
|
|
|
|
coworker.increase(5);
|
|
|
|
System.out.print("Monatslohn erhöht um 5%: ");
|
|
System.out.println(coworker.salary);
|
|
}
|
|
}
|