mcd - success =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class mcd { public static void main(String[] args) { boolean success; // create an object representing December (12) starting on Wednesday (3) MonthlyCalendar dec = new MonthlyCalendar(12, 3); // schedule a party for Dec 17 success = dec.makeAppointmentOnDate(17, "party"); System.out.println(success); // should print "true" System.out.println(dec.getAppointment(17)); // should print "party" // schedule a doctor's visit on Dec 17 or next available weekday // (should end up on Mon Dec 20)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: success = dec.makeAppointmentOnNextAvailableWeekday(17, "doctor"); System.out.println(success); // should print "true" System.out.println(dec.getAppointment(17)); // should print "party" System.out.println(dec.getAppointment(18)); // should print "no appointment" System.out.println(dec.getAppointment(19)); // should print "no appointment" System.out.println(dec.getAppointment(20)); // should print "doctor" } }...
View Full Document

This note was uploaded on 07/12/2009 for the course CS 111 taught by Professor Hari during the Fall '08 term at Rutgers.

Ask a homework question - tutors are online