Bool removeapptstring apptname bool

This preview shows 8 out of 12 pages.

bool removeAppt(string &apptName) bool checkCalendars(Time &slot,                            Calendar others[]) bool login(string &pass) bool logout(void) has a start-time bool setStartTime(Time &st) bool setEndTime(Time &st) bool addParticipant(string &user) bool setLocation(string &location) has an end-time has a list of participants has a location
Image of page 8

Subscribe to view the full document.

RecurringAppointment bool setStartTime(Time &st) bool setEndTime(Time &st) bool addParticipant(string &user) bool setLocation(string &location) bool setRecurRate(int numDays)  RecurringAppointment()  ~RecurringAppointment() Step #2b: Associate Operations w/Classes Next we have to determine  what actions  go  with  which classes Calendar list getListOfAppts(void) bool addAppt(Appointment *addme) bool removeAppt(string &apptName) bool checkCalendars(Time &slot,                            Calendar others[]) bool login(string &pass) bool logout(void) Of course, our classes need  constructors   and  destructors ! Calendar()   and ~Calendar() Appointment bool setStartTime(Time &st) bool setEndTime(Time &st) bool addParticipant(string &user) bool setLocation(string &location) Appointment() and ~Appointment() And now let’s consider our other two  classes. OneTimeAppointment bool setStartTime(Time &st) bool setEndTime(Time &st) bool addParticipant(string &user) bool setLocation(string &location) OneTimeAppointment()  ~OneTimeAppointment() So, do we need all  of our classes? X
Image of page 9
Step 3: Determine Relationships & Data  Now you need to figure out how the  classes  relate to each other  and what  data they hold. There are three relationships to consider: 1.  Uses :  Class X  uses  objects of class Y, but may not      actually hold objects of class Y. 2.  Has-A :  Class X  contains  one or more instances of      class Y (composition). 3.  Is-A :  Class X  is a specialized version  of class Y. This will help you figure out what  private data  each class needs, and will  also help determine  inheritance .
Image of page 10

Subscribe to view the full document.

Calendar list getListOfAppts(void) bool addAppt(Appointment *addme) bool removeAppt(string &apptName) bool checkCalendars(Time &slot,                            Calendar others[]) bool login(string &pass) bool logout(void) Calendar()   and ~Calendar() Step 3: Determine Relationships & Data  A Calendar contains  appointments A Calendar must have a  password private: Appointment  m_app[100]; String            m_password; A Calendar uses other  calendars , but it doesn’t need to hold them. In general, if a class  naturally holds  a piece  of data, your design should place the data  in that class.
Image of page 11
Image of page 12
You've reached the end of this preview.
  • Spring '09
  • John
  • Recursion, Grendel, The Queen, Albert Brandy Carol David Eugene Frank Gordon Grendel

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern