Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Editing order feature  RSS feed

 
Jonni Cashman
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Im pretty new to java so I hope I make sense. I'm creating a GUI Java Application for pizza delivery. I already set it up so that the customer can order a pizza, with details such as size, topping, etc. I also have a database where the customer details and order history is stored. What Im trying to do now but dont really now how to go about is set up a feature where you can edit a existing order for a customer. How do I do this? Thanks in advance.
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the first thing you do is turn off your computer and write out in detail, in your native language, exactly what you want this feature to do and how you want the user to be able to use it.
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Welcome to the Ranch
 
Jonni Cashman
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tony its nice to meet you. Well basically I have kinda put it in steps -

1. Customer enters phone number
2. List of existing orders for customer is shown
3. Customer can choose a order to be edited
4. The order is deleted and the customer is taken to redo the process of "Add new order"

Would something like this be doable?
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it's doble, although as the operator of such an ordering system I'd be horrified if I pressed the edit order button and the order was deleted and I told to re-enter it. Surely edit means you can change one or more items.

BTW I think you need to add a lot more detail than you have before even thinking about implementing this. For example: How does the user enter a phone number? does the phone number also include area code? how is the order list displayed - do you show the order time/date, the whole order contents or something else altogether? is the list or orders sorted into any particular order? etc etc
 
Jonni Cashman
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah I think you may be right I just thought making the order restart anew would be easier but editing it would be a lot better. In terms of other features there isnt going to be a time or order because I havent set that up in my database. Its going to be just the customer name details and their order history with a edit button which would I allow you to edit certain parts of the order. Ideally you could click "Topping" and you would be able to change the topping, same with the rest of the options. Sounds simple enough I just dont have the knowledge yet I think.
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah I think you may be right I just thought making the order restart anew would be easier but editing it would be a lot better.

That's a 'Delete' order feature, which may also be useful although you may want to provide a lock so users can't delete orders that have already been made/paid for.

In terms of other features there isnt going to be a time or order because I havent set that up in my database.

That comes from coding part of the problem before analyzing the whole problem. An order must have a date and most probably a time associated with it or you can't produce legal invoices for the goods.

Its going to be just the customer name details and their order history with a edit button

If there is no date/order no. etc how do you differentiate different orders for a given customer ie how will the user know which order to edit?

Ideally you could click "Topping" and you would be able to change the topping, same with the rest of the options.

That sounds reasonable. You may also want the ability to delete individual items and add new items as well as editing existing ones.

Sounds simple enough I just dont have the knowledge yet I think.

You don't have the knowledge because you haven't fully analyzed the problem yet.
If you write out what you want the system to do - as I said before - in detail it will all become a lot simpler. Pretend you need to explain it to a 5 year old who has never used an ordering system before and that is the level of detail you need to be aiming for.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!