Results 1 to 2 of 2
  1. #1
    ai_2007 is offline Member
    Join Date
    Jun 2007
    Posts
    21
    Rep Power
    0

    Default Writing the filter method

    I have created a class 'Organizer' that has filter methods that are supposed to :

    a) display list of events between any two days.
    b) display wedding anniversaries and birth day events.
    c) Display events for any month.

    The 'Organizer' class collects information like, date, name, hphone, email, type of relation and event (stack/Q) type through filing methods.

    There is an ADT class 'Event' that has information: event type and date.

    There is an ADT class 'Dear' that has information: name, hphone, email, type of relation and event(stack/Q) type.


    How do I display only list of events between two dates(a)?

    And for (b), is this correct :
    Java Code:
    if((b[i] == wedding anniversaries)|| (b[i] == birthdays))
    return b[i];
    For (c) it is just the matter of displaying all the information gathered correct?
    Last edited by ai_2007; 07-03-2007 at 02:59 PM.

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    10

    Default

    For (a), check the following tip:

    Java Tips - Compare two dates

    You will just need to compare all dates with the given dates and only display the events between these two dates.

    The logic of (b) looks correct. For (c), you can display the events that will be performed between the start and end date of the given month.

Similar Threads

  1. servlet Filter problem
    By saint_jorjo in forum New To Java
    Replies: 1
    Last Post: 03-13-2008, 12:05 PM
  2. Object filter
    By revathi17 in forum New To Java
    Replies: 2
    Last Post: 08-08-2007, 07:40 PM
  3. Need a filter
    By revathi17 in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 07:37 PM

Posting Permissions

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