First Commit

This commit is contained in:
2023-09-19 22:07:16 +03:00
commit 5e4b81c90d
35 changed files with 1092 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
package org.lumijiez;
public class Member {
private final int age;
private final int handicap;
private final String category;
public int getAge() {
return age;
}
public int getHandicap() {
return handicap;
}
public String getCategory() {
return category;
}
public String getName() {
return name;
}
private String name;
public Member(String name, int age, int handicap) {
this.age = age;
this.handicap = handicap;
this.name = name;
this.category = (age > 55 && handicap > 7) ? "SENIOR" : "OPEN";
}
public void printCategory() {
System.out.println(this.category);
}
}