26 lines
820 B
Java

package com.bib.essensbestellungsverwaltung;
import java.util.ArrayList;
import java.util.List;
/**
* one constructor is used to create new parents the other is used to create existing parents from database
* @author Malte Schulze Hobeling
*/
public class Parent extends User{
List<Child> children;
public Parent(long id, String name, String firstname, String password, String email, Address address, List<Child> children) {
super(id, name, firstname, password, email, address);
this.children = children;
}
public Parent(String name, String firstname, String password, String email, Address address) {
super(name, firstname, password, email, address);
this.children = new ArrayList<>();
}
public List<Child> getChildren() {
return children;
}
}