From 48fba228533f6e9f4cba246f1ba3cb7eae7fe692 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Thu, 28 Apr 2022 14:10:41 +0200 Subject: [PATCH] added Date of Birth to Player.java --- .../zhaw/projekt2/turnierverwaltung/Player.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/Player.java b/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/Player.java index 567f49b..4273fd1 100644 --- a/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/Player.java +++ b/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/Player.java @@ -1,10 +1,21 @@ package ch.zhaw.projekt2.turnierverwaltung; -public class Player extends Person{ +import java.util.Date; +public class Player extends Person implements Participant{ - public Player(String firstName, String name, String phoneNumber){ + private Date dateOfBirth; + + public Player(String firstName, String name, String phoneNumber, Date dateOfBirth){ super(firstName, name, phoneNumber); + setDateOfBirth(dateOfBirth); } + public Date getDateOfBirth() { + return dateOfBirth; + } + + public void setDateOfBirth(Date dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } }