package com.example.habitrack;

import java.util.Date;

/**
 * Created by sshussai on 10/21/17.
 */


public class HabitEvent {
    String word = "hello";

    private String title;
    private String comment;
    private Date date;
    private boolean status;
    private int eventsDone;
    private int totalEventCount;

    public HabitEvent(String title) {
        this.title = title;
        this.date = new Date();
    }

    public String getTitle(){
        return this.title;
    }

    public String getComment(){
        return this.comment;
    }

    public float getProgress(){
        return 100*(eventsDone/totalEventCount);
    }

    public boolean getStatus(){
        return false;
    }

    public String get_my_Word() {
        return word;
    }
}

@@ -46,17 +46,57 @@
 til.
-Date;%0A%0A/*
+Calendar;%0A%0A%0A/**%0A * HabitEvent%0A *%0A * Version 1.0%0A 
 *%0A *
@@ -129,16 +129,19 @@
 /21/17.%0A
+ *%0A
  */%0A%0A%0Apu
@@ -172,85 +172,242 @@
     
-String word = %22hello%22;%0A%0A    private String title;%0A    private String comment;
+/**%0A     * This class is the template for a habit event entity.%0A     *%0A     */%0A%0A    private final Integer habitEventID;         // ID for the event%0A    private final Integer habitTypeID;          // ID for the corresponding habit type
 %0A   
@@ -419,74 +419,150 @@
 ate 
-Date dat
+String titl
 e;
-%0A
     
-private boolean status;%0A    private in
+                   // title of the habit event%0A    private String comment;                     // comment for the habi
 t event
-sDone;
 %0A   
@@ -574,123 +574,337 @@
 ate 
-int totalEventCount;%0A%0A    public HabitEvent(String title) %7B%0A        this.title = title;%0A        this.date = new Dat
+Calendar date;                      // date of the habit event%0A%0A    public HabitEvent(Integer heID, Integer htID) %7B%0A        HabitTypeController htc = new HabitTypeController();%0A        this.title = htc.getHabitTitle(htID);%0A        this.habitEventID = heID;%0A        this.habitTypeID = htID;%0A        this.date = Calendar.getInstanc
 e();
@@ -939,16 +939,17 @@
 tTitle()
+ 
 %7B%0A      
@@ -953,24 +953,87 @@
      return 
+title;%0A    %7D%0A%0A    public void setTitle(String title) %7B%0A        
 this.title;%0A
@@ -1026,24 +1026,32 @@
   this.title
+ = title
 ;%0A    %7D%0A%0A   
@@ -1077,16 +1077,17 @@
 omment()
+ 
 %7B%0A      
@@ -1095,21 +1095,100 @@
  return 
-this.
+comment;%0A    %7D%0A%0A    public void setComment(String comment) %7B%0A        this.comment = 
 comment;
@@ -1210,27 +1210,27 @@
 lic 
-float getProgress
+Calendar getDate
 ()
+ 
 %7B%0A  
@@ -1246,79 +1246,132 @@
 urn 
-100*(eventsDone/totalEventCount);%0A    %7D%0A%0A    public boolean getStatus
+date;%0A    %7D%0A%0A    public void setDate(Calendar date) %7B%0A        this.date = date;%0A    %7D%0A%0A    public Integer getHabitEventID
 ()
+ 
 %7B%0A  
@@ -1387,13 +1387,20 @@
 urn 
-false
+habitEventID
 ;%0A  
@@ -1419,26 +1419,30 @@
 lic 
-String get_my_Word
+Integer getHabitTypeID
 () %7B
@@ -1461,12 +1461,19 @@
 urn 
-word
+habitTypeID
 ;%0A  

add basic habitevent entity