@@ -0,0 +1,1994 @@
+%0Apackage com.cmput301f17t07.ingroove;%0A%0Aimport java.text.SimpleDateFormat%0A%0A%0Aclass HabitEvent %7B%0A%0A%09private String name;%0A%09private String comment;%0A%09private Date day;%0A%09private Bitmap photo; %0A%09private int id;%0A%09private String location;%0A%0A%09//Name getter/setter%0A%09public String getName() %7B return name; %7D%0A%09public void setName(String name) %7Bthis.name = name;%7D%0A%09//Comment getter/setter%0A%09public String getComment() %7B return comment; %7D%0A%09public void setComment(String comment) %7Bthis.comment = comment;%7D%0A%09//Day getter/setter%0A%09public String getDay() %7B return day; %7D%0A%09public void setDay(Date day) %7Bthis.day = day;%7D%0A%09//Photo getter/setter%0A%09public Bitmap getPhoto() %7B return photo; %7D%0A%09public void setPhoto(Bitmap photo) %7Bthis.photo = photo;%7D%0A%09//ID getter/setter%0A%09public int getID() %7B return id; %7D%0A%09public void setID(int id) %7Bthis.id = id;%7D%0A%09//Location getter/setter%0A%09public String getLocation() %7B return location; %7D%0A%09public void setLocation(String location) %7Bthis.location = location;%7D%0A%0A%09//Constructors.%0A%09public HabitEvent(String name, String comment, Date day, Bitmap photo, String location)%7B%0A%09%09this.name = name;%0A%09%09this.comment = comment;%0A%09%09this.day = day;%0A%09%09this.photo = photo;%0A%09%09this.id = id;%0A%09%09this.location = location;%0A%09%7D%0A%09public HabitEvent(String name, Date day)%7B%0A%09%09this(name, %22%22, day, null, %22%22);%0A%09%7D%0A%09public HabitEvent(String name, Date day, String location)%7B%0A%09%09this(name, %22%22, day, null, location);%0A%09%7D%0A%09public HabitEvent(String name, String comment, Date day)%7B%0A%09%09this(name, comment, day, null, %22%22);%0A%09%7D%0A%09public HabitEvent(String name, String comment, Date day, String location)%7B%0A%09%09this(name, comment, day, null, location);%0A%09%7D%0A%09public HabitEvent(String name, Date day, Bitmap photo)%7B%0A%09%09this(name, %22%22, day, photo, %22%22);%0A%09%7D%0A%09public HabitEvent(String name, Date day, Bitmap photo, String location)%7B%0A%09%09this(name, %22%22, day, photo, location);%0A%09%7D%0A%0A%09public String toString() %7B%0A%09%09SimpleDateFormat sdf = new SimpleDateFormat(%22yyyy-MM-dd%22);%0A%09%09String dateStr = sdf.format(this.day);%0A%09%09return %09this.name + %22: %22 + dateStr;%0A%09%7D%0A%7D%0A

Add files via upload