• Post Reply Bookmark Topic Watch Topic
  • New Topic

Vending Machine Applet  RSS feed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider a vending machine that offers the following options:
1. Coffee €2.00
2. Tea €2.00
3. Soup €2.00
4. Water €1.50
5. Finish and pay
Design an applet that continually allows the users to select from these options. When options 1-4 are selected an appropriate message should be displayed. This should acknowledge the users choice.

New to Java, anyone able to write the code for me?

Thanks
 
Sheriff
Posts: 4289
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Vincent.

We're NotACodeMill (that's a link) so no one's going to write the program for you, but we will help you along the way.

I'm assuming this is some kind of school assignment.  Otherwise you should not be using Applets.  They are very outdated.

The best first step is not to write code but to write down on paper (or a text editor) what the program should do at each step.
 
Vincent Hammond
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah it's a college assignment , thanks anyhow for now . I'll give it a go and post what I come up with here and see what kind of responses I get. Should have it posted by tomorrow evening , hopefully 😬
 
Marshal
Posts: 56605
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome again

Start by telling us what classes you are going to use. That will give us an idea of how well you are designing your app.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!