I am having trouble with this hw assigment. I need a java program using GUI. A c
ID: 3718463 • Letter: I
Question
I am having trouble with this hw assigment. I need a java program using GUI. A class uml diagram to help with brainstorming is good, and starter code is appreciated.
Thanks!
will be changed to the day view of March 30. If the user clicked onbutton from the given calendar, the month view (at left side) will present the view of April, the rectangle will highlight the day 1, and the day view will change to the view of Apr A user should be able to move the calendar back and forth as far as the GregorianCalendar can g The calendar comes with CREATE button through which a user can enter events to be scheduled in the calendar. To schedule an event on a particular day, a user first clicks on the day of the monthe view, and then clicks on the CREATE button. The CREATE button pops up input box(es) through which the user can enter an event. The following is a sample screen 6. 7. You may simplify the way to get an event from the user as long as the calendar can take an event name, starting time and ending time. (Since the user clicked on the day before choosing the CREATE option, the user does not have to re-enter the day information.) Untitled even 3/31/14 10:30am to 11:30am SAVE Doesn't have to be entered We assume a user always correctly enters an event in the format shown in the above sample. After the user saves the event, the event is stored in the calendar. When the calendar present a day view representing the day with event(s), All scheduled event should be presented on the day view.Explanation / Answer
Event event = new Event()
.setSummary("Google I/O 2015")
.setLocation("800 Howard St., San Francisco, CA 94103")
.setDescription("A chance to hear more.........");
DateTime startDateTime = new DateTime("2015-05-28T09:00:00-07:00");
EventDateTime start = new EventDateTime()
.setDateTime(startDateTime)
.setTimeZone("America/Los_Angeles");
event.setStart(start);
DateTime endDateTime = new DateTime ("2015-05-28T17:00:00-07:00");
EventDateTime end =new EventDateTime()
.setDateTime(endDateTime)
.setTimeZone("America/Los_Angeles");
event.setEnd(end);
String[] recurrent = new String[] {"RRULE : FREQ=DAILY ; COUNT=2"};
event.setRecurrent(Arrays.asList(recurrent));
EventAttendee[] attendees = new EventAttendee[] {
new EventAttendee().setEmail("aaa@example.com"),
new EventAttendee().setEmail("bbb@example.com),
};
event. setAttendees(Arrays.asList(attendees));
EventReminder[] reminderOverrides = new EventReminder[] {
new EventReminder().setMethod("email").setMinutes(24*60),
new EventReminder().setMethod("popup").setMinutes(10),
};
Event.Reminder reminders = new Event.Reminders()
.setUseDefault(false)
.setOverrides(Arrays.asList(reminderOverrides));
event.setReminders(reminders);
String calandarId = "primary";
event = service.events().insert(calenderId, event).execute();
System.out.printf("Event created: %s ", event.getHtmlLink());
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.