I'd like to create a piece of software that has the functionality of a common written planner. To do this, it will have a Calendar. When planning the program, I became confused as to how I would implement the functionality of a Calendar.

I thought have a Calendar class that stores and array of Date objects, and each Date object contains event or task objects, and so on. But a Calendar has infinite dates, and of course I can't make an object for every date and store it in an array.

How would I go forward with the object oriented software design of a Calendar program. I am talking about software design and how to handle the data, not UI design. I am using Java, but these concepts are universal.

  • There's already a Calendar class in Java. Is your planner going to handle things like "The book club meets on the second Tuesday of the month at 7 pm."? Dec 5, 2014 at 21:42

1 Answer 1


The basic class in such an app will be an "Appointment" or "Event" class. It will contain the date/time and place of the meeting, who will be there, whether a reminder alarm should sound, whether the event repeats... All that sort of stuff.

There should also be some sort of AppointmentCollection class that holds all the appointments, allows appointments to be added and deleted, as well as having the ability of doling out appointments based on certain parameters.

That way, the month view can display all the appointments for its month by asking the AppointmentCollection to give it an array of all the appointments that will transpire during that month, the day view can ask for all the appointments that will happen that day, etc...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.