File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Assignment Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Assignment Question" Watch "Assignment Question" New topic
Author

Assignment Question

harshal deshpande
Ranch Hand

Joined: Sep 06, 2012
Posts: 34
i know that you are not going to give me the code but i want guidance for how to solve this assignment because i am finding difficult to start this assignment
the question is i have to create application named as EventManager it will manage different events such as birthday,anniversary,wedding the eventmanager should support different operation such as addition,deletion,updation.and it should also support retrieval of events on particular day,month or year.so to do so how should i approach this problem

i tried like create one class i.e.eventmanager as abstract class and i dont know which method should i write there in this particular class please guide me i am confused i need help not code i want approach to solve this
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

Forget coding for now. Start with basics
1) Where are you going to store the data?
2) How will you gain access to that data?
3) How will the user interact? Command line? GUI?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
harshal deshpande
Ranch Hand

Joined: Sep 06, 2012
Posts: 34
hello sir,sorry but i really dont know how to store it what i am going to do i am going to ask user that enter an event for which you want information like birthdays for this month,or gettogethers in this month then my app will give him the necessary result,and if he wants to add some information about an event then that option is also there
1)i am using string to get the information about data i dont know about saving
2)i will create methods to gain access for that data i.e.for adding an event i will call add method
3)through commandline user will interact
thank you for your valuable time sir
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

harshal deshpande wrote:hello sir,sorry but i really dont know how to store it ..

Is this a college assignment? Did your professor give you any guidelines on storing data? Or is this assignment not supposed to store data?
harshal deshpande
Ranch Hand

Joined: Sep 06, 2012
Posts: 34
nothing is mentioned about storing in assignment question as we are retrieving means we are supposed to store data but i dont know how?? and this is college assignment and professor only told to read statement and create the app. specifically nothing is mentioned about storing the data in given assignment
Wesleigh Pieters
Ranch Hand

Joined: Sep 04, 2012
Posts: 81
Well without more info it is hard to say but I would create a class to make object of all the events, it would have a type, a date and any other relevant information. Perhaps you can add them to a ArrayList when new events are added and then you can save them to a file by writing out that list to a file (serialization). then you can create some methods to iterate over the lsit and retrieve all events for a given date or perhaps all events of a certain type etc.

just some ideas.
harshal deshpande
Ranch Hand

Joined: Sep 06, 2012
Posts: 34
yes thats the way i am supposed to do but whether i need to use abstract classes or i can use inheritance you said that is the way to go i think but how to go about your ideas
if you can elaborate please
Wesleigh Pieters
Ranch Hand

Joined: Sep 04, 2012
Posts: 81
Why would you need to do that? or is that the assignment to use inheritance, or is a requirement to have an abstract class that you extend etc?

Do you want to make an abstract class that defines the methods all of your subclasses will implement and the create a class for each type of event and implement them? seems very overkill when one single class like I said would do the job? or is that the requirement?

is this really varsity/college level work?
harshal deshpande
Ranch Hand

Joined: Sep 06, 2012
Posts: 34
now i am able to understand somethings about this after pieters sirs explaination.what i will do create two classes i.e EventManager and Event and then i will write attributes of event class such as String type,String date,String name and methods as addEvent(),deleteEvent() etc.then i will create objects like Event birthday=new Event();
and call the methods using that object.if this is right then good but the problem is which methods should i write in event class and which method should i write in eventmanager class .and pieters sir am understanding exactly what you meant to say so if you guide me a bit more i will complete this assignment. if i am wrong please get me on right track.
thank you for your valuable time sir
Wesleigh Pieters
Ranch Hand

Joined: Sep 04, 2012
Posts: 81
the EventManager class can maybe hold your List and thus perform all of the actions such as creating new event object and then adding them to the list. Likewise it can have your methods for searching, removing etc.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assignment Question
 
Similar Threads
Messaging System For TrayIcon
custom events in j2me
How to get the status and memory usage in Javsa
Design benefits of creating Sessionfactory in an utility class
Hibernate Maping error