+ 3
This flowchart is correct :-\ ?
I have written an algorithm for a multi drinking vending machine for my first-year assignment the machine should be able to- - Allow each person to decide the composition of his drink. - Perform all important tasks when preparing the drink This is my flowchart- http://i68.tinypic.com/2ihwaqg.jpg Is this flowchart correct? I also need to write the pseudo code for this can anyone help me to write it to this flowchart plzzzz :(
3 Answers
+ 4
The three options when you are dealing with drink type and sugar level can be compressed into a single option since they all serve the same purpose.
Select drink -> (drink == vanilla || drink == faluda || drink == chocolate) ? -> ...
The part near the start where you "withdraw coins" if the amount is less than 50 may also be problematic: What if I only have coins in 20? Your machine would keep returning my money to me in order to get a coin which is >= 50. To fix this:
start -> wait for coin -> coin_sum += coin. coin_sum >= 50 ? continue : go back to "wait for coin" phase...
After that, instead of "X has a value", "X > 0" would be a more appropriate case, since 0 is also a value.
+ 3
Try posting your attempts.
+ 1
Thanks for the answer. I will correct them. Can you tell me the psuedo code for this? :-/