Write an applet that simulates a soft drink machine.

Assignment Help JAVA Programming
Reference no: EM13940805

Write an applet that simulates a soft drink machine. The simulated machine dispenses the following soft drinks: cola, lemon-lime soda, grape soda, root beer, and bottled water. These drinks cost $0.75 each to purchase.

When the applet starts, the drink machine should have a supply of 20 of each of the drinks. The applet should have a text field where the user can enter the amount of money he or she is giving the machine. The user can then click on a button to select a drink to dispense. The applet should also display the amount of change it is giving back to the user. The applet should keep track of its inventory of drinks and inform the user if he or she has selected a drink that is out of stock. Be sure to handle operator errors such as selecting a drink with no money entered and selecting a drink with an inadequate amount of money entered.

Reference no: EM13940805

Questions Cloud

Event management strategic plan : Students are reminded that this report should focus upon the event management strategic plan rather than the stakeholders or event owners' external mission, vision, goal, objectives, values and outcomes.
Background reading in the areas of recruitment : This learning module requires you to do background reading in the areas of recruitment, selection and induction. This reading will provide you with the conceptual foundations needed to do the practical assessment tasks.
Identify the key features of the changing business : Identify the key features of the changing business and economic environment in the Asian Pacific region and critically assess the likelihood of countries in this region signing a single free trade agreement.
What irregularities should a fraud examiner look : What irregularities should a fraud examiner look for in a firm's fixed assets?
Write an applet that simulates a soft drink machine. : Write an applet that simulates a soft drink machine. The simulated machine dispenses the following soft drinks: cola, lemon-lime soda, grape soda, root beer, and bottled water. These drinks cost $0.75 each to purchase.
Is the cocaine sentencing law discriminatory : Should judges be allowed to consider special circumstances such as marital status, employment status and education when sentencing defendants?
Interaction between marketing and revenue management : Describe how Porter's five forces analysis can be used as part of a revenue management strategy. Discuss the interaction  between marketing and revenue management , with particular reference to market segmentation distribution channels  and the 7Ps
Write a section on the hr section within the case study : Write a section on the HR section within the case study? Such as there were 3 leaders at the top, and how that had an impact on the communication.
Structure for the report and marking scheme : Your work should comprise on report detailing your research (the report, excluding appendices if required, must be minimum of 1,500 words and a maximum 1,600 words). This report should consider the case study in great detail, analysing the use, im..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Consider a typical certification hierarchy

Why might Bob still not trust that the certificate for Alice truly establishes Alice as the owner of the public key in the certificate?

  Give the syntax of do while statement

Please complete the following short answer questions with code snippets as well as paragraphical responses. This assignment should not be an exercise in copy and paste, but an assessment of your comprehension and evaluation of the course materials..

  Compute the average grades

Write a program that allows a teacher to compute the average grades for EACH student in his or her class (NOT a single average for the entire class)

  Corrections as necessary and output screen snapshots

Submit all completed programs, with corrections as necessary and output screen snapshots, to demonstrate that they all perform properly to meet the specifications.

  Luminous jewels - the polishing game

Once a jewel type is removed from the necklace, all other instances of the same jewel type is treated as polished by the person who removed the jewel

  Employee type and the number of hours

Write a program that calculates the salary for the employee. The hourly rate for permanent staff (P) is 200, contract staff (C) is 150 and temporary staff (T) is 100. The program accepts the employee type and the number of hours the employee work.

  Develop a form based front end for a class management

In this assignment, students will develop a form based front end for a class management system and a database using a combination of JDBC commands, SQL, and Swing GUI components to allow users to query, insert, update and delete records using a si..

  Java program using the net beans ide

For this Assignment, you will update an existing Java program using the NetBeans IDE. You will use the NetBeans Integrated Development Environment to make changes to an existing NetBeans Java Project.

  Write a java program to implement the finite field

Write a program called "GF2.java" to implement the finite field GF(p n ) where p is a prime number and n is a positive integer.  You also need to write four methods to realize "+", "-", "´", and "/".

  Define a piece of dna sequence

Please consider the features of Java classes, and then define a Java class for a DNA sequence object to include instance variable names and methods that you can use to define a piece of DNA sequence

  Creating a list of shapes stored in an array

A Sample program is provided that creates a list of shapes stored in an array. This program uses classes: Shapes, Square, Rectangle and ShapesList.

  Wordlist generator in java

Wordlist generator in java Object oriented my instructor requested for a project using: inheritance, Polymorphism, arraysList, array of object, String class methods

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd