Click here to Skip to main content
15,888,031 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I would like to improve on improving my logic towards threading, timers, delegate, events etc. The case study is like Car Washing Slot and Payment.

• There are 10 washing slots (this can be configured).
• A car will request for slot for washing
o If available then it will be allocated else it has to wait in the queue.
o Each car can wait up to 10 to 30 mins. The more the washing types the more time it will take. There are 3 types of Washing (this can be configured). Each type will take 10 mins extra time. It means the time for washing car is 10 to 30 mins.
o Each car has 100% fuel when it comes for washing. For every X minutes Y% of car fuel will be reduced. (X and Y should be configured)
• All the cars which came and which are in queue needs to be shown on the screen.
• Once the washing is done it would be send to payment depending upon the washing type.

The above operations are handled by operator. He will allocate the slot and type and monitors etc.

Can any one give me approach and steps to solve the above so that I would create the solution.
Posted
Updated 13-May-12 20:51pm
v2
Comments
Sergey Alexandrovich Kryukov 8-May-12 11:42am    
Reason for my vote of 3:

Unfortunately, this is not a valid question. Formally, not a question at all. This request provokes an answer: "hire an application architect or a lead developer", because this is more like an order for creation of architectural artifact or tutoring. I don't think we have resources for such things.

By the way, one problem of your case study is those figures like 10, 30. I might end up hand-coded in the immediate constants, which is a big no-no. Everything should be parametrized. Introduce variable names for those parameters and indicate estimate ranges or orders of magnitude of each. There is nothing more variable than "I tell you, it will never ever change" kind of "constants".

--SA
[no name] 14-May-12 2:53am    
Need just pointers not the entire c# code:-)
Sergey Alexandrovich Kryukov 14-May-12 15:10pm    
I understand that (if you demanded code for the same settings, my vote would be 1). But even the pointers... you see, your problem does not have anything special. It's just a work. If you think you can write code but don't know how to start -- this is still work, a work of an architect or a technical lead. Or you need some architectural artifact you could start with. But I don't think we have resources to do it.
--SA
Ganesan Senthilvel 8-May-12 15:43pm    
First, you clearly understand the concepts of timer, delegate and events. Then proceed with your logic.
[no name] 14-May-12 2:53am    
Thank you very much for the reply:-)

1 solution

You can find some useful information in these tutorials[^] and elsewhere in articles, Google searches etc.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900