Results 1 to 5 of 5

Thread: Help if you can, newbbie

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    3

    Help if you can, newbbie

    HI I need to write the code for each of the event as it says in the comment and I'm struggling with it. Can you help at all,please
    Thanx


    #include "EventList.h"
    #include "Date.h"

    EventList::EventList(Date d) {
    // create an empty event list - set today's date

    }

    EventList::~EventList() {
    // must go through all the events deleting them
    }

    Date EventList::getToday(){
    // returns todays date
    }

    void EventList::setToday(Date d){
    // sets todays date
    }

    void EventList::setNow(Clock c){
    // sets the time
    }

    Clock EventList::getNow(){
    // returns the time
    }

    bool EventList::addEvent(Event* e){
    // takes an event pointer (event must have been created)
    // and adds it to the event list at the next avilable
    // place in the array - if there is one
    }

    bool EventList::delEvent(Event* e){
    // loops through the array checking the event pointer parameter
    // against the events in the array
    // deletes it when they match
    // consider moving down the later array elements to close the gap??
    }

    Event* EventList::findEvent(Date d, Clock c, Type type){
    // loops through the eventlist array checking each event
    // agains these parameters - if found return the event pointer
    // if not return a null pointer (i.e. zero)
    }

    void EventList:rintByDate(Date d){
    // print all events which have this date
    }


    void EventList:rintAll(){
    // loop through the array of events printing each one
    }

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Is this an array or a linked list?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    3
    It is a linked list..

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Well, do you know how to write a linked list?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width