Select Git revision
Forked from
programmation_sequentielle / travaux_pratiques / c_lang / simulation_galaxie / enonce
Source project has a limited visibility.
MyDate.java 814 B
public class MyDate{
private int day;
private int month;
private int year;
private Time from;
private Time to;
public MyDate(int[] date, int[] from, int[] to){
this.day = date[0];
this.month = date[1];
this.year = date[2];
this.from = new Time(from[0], from[1]);
this.to = new Time(to[0], to[1]);
}
public int get_day(){
return this.day;
}
public int get_month(){
return this.month;
}
public int get_year(){
return this.year;
}
public int[] get_t_from(){
int[] table = {this.from.hour, this.from.minutes};
return table;
}
public int[] get_t_to(){
int[] table = {this.to.hour, this.to.minutes};
return table;
}
}
class Time{
int hour;
int minutes;
Time(int h, int m){
this.hour = h;
this.minutes = m;
}
}