Java noob - ADT help

Associate
Joined
30 Oct 2014
Posts
2,079
Location
Norfolk
So i'm learning Java..and I must say, im pretty noobish, or sometimes illogical and struggling. But I've got an ADT and variables of what I want which is.

A client's details is recorded, id,name etc.
And I need to make a search algorithm of some sort to search for the certain id and bring its details up. If it's possible calculate the difference in time/date that it was entered from the current date.

And be able to sort them. I've also looked into Queues, for the interface..and I dont seem to understand it very well.

Any insightful knowledge or ways to go about it, with points to the right direction.

Thanks :)
 
Associate
Joined
7 Nov 2013
Posts
255
Location
Kent, England
Where are you storing these entered client details, in a database or in a collection in memory? The solution will be different depending upon where the data is being retrieved from. For a database you will want to filter using a SQL query (most likely through an ORM). For a collection in memory you could use the java streams API which makes filtering/ordering incredibly simple.

I may not quite understand but why do you think you need a queue for anything, are you doing anything which needs FIFO behaviour?

Let me know what you've tried and where you've gotten stuck and I will try to remember to check back and offer some help :)
 
Associate
OP
Joined
30 Oct 2014
Posts
2,079
Location
Norfolk
Where are you storing these entered client details, in a database or in a collection in memory? The solution will be different depending upon where the data is being retrieved from. For a database you will want to filter using a SQL query (most likely through an ORM). For a collection in memory you could use the java streams API which makes filtering/ordering incredibly simple.

I may not quite understand but why do you think you need a queue for anything, are you doing anything which needs FIFO behaviour?

Let me know what you've tried and where you've gotten stuck and I will try to remember to check back and offer some help :)

Hey, i'm going to get down to doing it tonight.
No, I'm not using sql, just going to have the details within a collection, or array list. I'll update it later on. Thanks for the help
 
Back
Top Bottom