Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2007, 03:56 PM
Member
 
Join Date: Jun 2007
Posts: 21
ai_2007 is on a distinguished road
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 :
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 03:59 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-03-2007, 04:32 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
servlet Filter problem saint_jorjo New To Java 1 03-13-2008 01:05 PM
The Intercepting Filter (II) JavaForums Java Blogs 0 02-11-2008 12:20 PM
The Intercepting Filter (I) JavaForums Java Blogs 0 02-10-2008 03:52 PM
Object filter revathi17 New To Java 2 08-08-2007 08:40 PM
Need a filter revathi17 New To Java 1 08-08-2007 08:37 PM


All times are GMT +3. The time now is 02:12 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org