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.
Creating a calendar/planner program. Confused about OO logic?
java;object oriented;design
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...