• Post Reply Bookmark Topic Watch Topic
  • New Topic

Chain Of Stores Code/Algorithm  RSS feed

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am to write an algorithm to tackle some actions on a chain of local game stores.
The types of action would include something like;

At which stores is a product in stock?
How many products are checked out versus in stock?
Check out a product to a customer and update the stock records.
Check in a returned product and update the appropriate stock records.
Printing a list of products that are out-of-stock.

The question is that can this be done and the algorithm/code run without writing out the whole code for the five stores and if I am to write the full code, which I think is the only way to achieve this, How can that be done so as to take different record for the whole five local stores and then take the actions on them.

Please all answers will be highly appreciated.

And also, what kind of data structures might be used... LinkedList? Stacks? Queues?
 
Ranch Hand
Posts: 144
Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Where is the algorithm?

2. Any complex application can be written in Java

3. Its your choice to select which data structure. If you have studied all data structures think of pros & cons.

4. once you have done all design work then start writing your code and if you need help post it here so we can direct you in right direction.
 
Omo Jesu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a fresh algorithm that I am looking for a way to write. I know i have to use classes to hold the games - titles, copies and status. Also then use Map<Integer, Map<String, Object>> to hold the values... But I need help on the way forward... maybe a skeleton will do and I will fill in the blanks.
 
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Omo Jesu wrote:It is a fresh algorithm that I am looking for a way to write. I know i have to use classes to hold the games - titles, copies and status. Also then use Map<Integer, Map<String, Object>> to hold the values...

Which you might want to keep in a Store object. Then 5 of those....

But I need help on the way forward... maybe a skeleton will do and I will fill in the blanks.

Erm........nah. That's not how things work here.

ShowSomeEffort (← click), and people will be happy to help if you run into trouble.

Winston
 
Omo Jesu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two classes already created one for product and the other for stores. that is where m stuck.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Omo Jesu wrote:I have two classes already created one for product and the other for stores. that is where m stuck.


Show those classes and explain clearly and precisely what exactly you're stuck on.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!