@@ -0,0 +1,1687 @@
+package csce747.nikhil.takehome1;%0A%0A/**%0A * @author nikhil%0A *%0A */%0Apublic class Time %7B%0A%09%0A//%09reference time = midnight Sunday;%0A//%09thus, 0 =%3E mid-night, 800 =%3E 8am Mon, 3200 =%3E 8am Tues %0A//%09and so on...%0A%09%0A%09private String course;%0A%09private int startTime;%0A%09private int duration;%0A%0A%09private String day;%0A%09private int timeOfDay;%0A%0A%09public Time()%7B%0A%09%09startTime = 0;%0A%09%09duration = 75;%0A%09%7D%0A%09%0A%09public Time(String course, int startTime, int duration)%7B%0A%09%09this.course = course;%0A%09%09this.startTime = startTime;%0A%09%09this.duration = duration;%0A%09%7D%0A%0A%09public int getStartTime() %7B%0A%09%09return startTime;%0A%09%7D%0A%0A%09public void setStartTime(int startTime) %7B%0A%09%09this.startTime = startTime;%0A%09%7D%0A%0A%09public int getDuration() %7B%0A%09%09return duration;%0A%09%7D%0A%0A%09public void setDuration(int duration) %7B%0A%09%09this.duration = duration;%0A%09%7D%0A%0A%09public String getDay()%7B%0A%09%09if(startTime %3E= 800 && startTime %3C= 2000)%0A%09%09%09day = %22mon%22;%0A%09%09else if(startTime %3E= 3200 && startTime %3C= 4400)%0A%09%09%09day = %22tues%22;%0A%09%09else if(startTime %3E= 5600 && startTime %3C= 6800)%0A%09%09 %09day = %22wed%22;%0A%09%09else if(startTime %3E= 8000 && startTime %3C= 9200)%0A%09%09  %09day = %22thurs%22;%0A%09%09else if(startTime %3E= 10400 && startTime %3C= 11600)%0A%09%09%09day = %22fri%22;%0A%09%09else %0A%09%09%09day = %22End of week!%22;%0A%0A%09%09return day;%0A%09%7D%0A%09%0A%09public int getTimeOfDay()%7B%0A%09%09if(day == %22mon%22)%0A%09%09%09timeOfDay = this.startTime;%0A%09%09else if(day == %22tues%22)%0A%09%09%09timeOfDay = this.startTime - 2400;%0A%09%09else if(day == %22wed%22)%0A%09%09%09timeOfDay = this.startTime - 4800;%0A%09%09else if(day == %22thurs%22)%0A%09%09%09timeOfDay = this.startTime - 7200;%0A%09%09else if(day == %22fri%22)%0A%09%09%09timeOfDay = this.startTime - 9600;%0A%09%09else %0A%09%09%09timeOfDay = 0000;%0A%0A%09%09return timeOfDay;%0A%09%7D%0A%0A%09public boolean overlap(Time mt)%7B%0A%0A%09%09if(this.startTime == mt.startTime)%7B%0A%09%09%09return true;%0A%09%09%7D%0A%09%09else%0A%09%09%09return false;%0A%09%7D%0A%0A%7D%0A

Create Time.java