Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Dit is voor de klasse Datum:
- public boolean komtVoor(Datum d){
- if (d.jaar>this.jaar) return true;
- else{
- if ((d.maand>this.maand)&&(d.jaar==this.jaar)) return true;
- else{
- if((d.dag>this.dag)&&(d.jaar==this.jaar)&&(d.maand==this.maand)) return true;
- else return false;
- }
- }
- }
- // Dit is voor de klasse TijdVanDeDag:
- private int minuten;
- private int uren;
- private int seconden;
- public boolean komtVoor(TijdVanDeDag a) {
- if (a.uren>this.uren){
- return true;
- }
- else{
- if ((a.minuten>this.minuten)&&(a.uren==this.uren)) return true;
- else{
- if((a.seconden>this.seconden)&&(a.uren==this.uren)&&(a.minuten==this.minuten)) return true;
- else return false;
- }
- }
- }
- // Dit is voor de klasse tijdstip
- private TijdVanDeDag tijd;
- private Datum dagen;
- public boolean komtVoor(Tijdstip t){
- if ((this.dagen).komtVoor(t.dagen)) return true;
- else{
- if(((this.tijd).komtVoor(t.tijd))&&(this.dagen==t.dagen)) return true;
- else return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement