JAVA program that stores and displays the on-duty schedule for a team. Features
ID: 666296 • Letter: J
Question
JAVA program that stores and displays the on-duty schedule for a team.
Features
(No restrictions on how to develop)
Display today’s Schedule.
Display a single user’s schedule showing the days they are assigned to Support.
Display the full schedule for all users in the current month.
Users should be able to mark one of their days on duty as undoable
The system should reschedule accordingly
Should take into account weekends and California’s holidays.
Users should be able to swap duty with another user’s specific day
STARTING ORDER
[''Sherry'', ''Boris'', ''Vicente'', ''Matte'', ''Jack'',
''Sherry'', ''Matte'', ''Kevin'', ''Kevin'', ''Vicente'',
''Zoe'', ''Kevin'', ''Matte'', ''Zoe'', ''Jay'',
''Boris'', ''Eadon'', ''Sherry'', ''Franky'', ''Sherry'',
''Matte'', ''Franky'', ''Franky'', ''Kevin'', ''Boris'',
''Franky'', ''Vicente'', ''Luis'', ''Eadon'', ''Boris'',
''Kevin'', ''Matte'', ''Jay'', ''James'', ''Kevin'',
''Sherry'', ''Sherry'', ''Jack'', ''Sherry'', ''Jack'']
EXTRA INFO:
# A guideline would be the length of the initial seed list that is provided in the exercise
# 1 user per day
# The minimum requirement is command line.
# California holidays
Monday, September 7 - Labor Day
Explanation / Answer
DefaultSeed.java
Seed.java
/**
* Created by thomasyeung on 7/4/15.
*/
public interface Seed {
public void loadInitalData();
public void clearData();
}
Global.java
import play.Application;
import play.GlobalSettings;
import play.db.DB;
import play.libs.F;
import play.mvc.Http;
import play.mvc.Result;
public class Global extends GlobalSettings {
Seed seed;
//@Override
public void onStart(play.Application application) {
super.onStart(application);
seed = new DefaultSeed(DB.getConnection());
seed.clearData();
seed.loadInitalData();
}
//@Override
public F.Promise<Result> onError(Http.RequestHeader request, Throwable t) {
super.onError(request, t);
return null;
}
// @Override
public void onStop(Application var1) {
super.onStop(var1);
//seed.clearData();
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.