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

  Writing a java program that provides simple statistics

You will be writing a Java program that provides simple statistics about the input data. The method stubs are given below. This assignment will give you experience with methods

  Design a class named large integers

Design a class named largeIntegers such that an object of this class can store an integer of any number of digits.

  Create a class named box that includes integer data fields

Create a class named Box that includes integer data fields for length, width and height. Create three constructors that require one, two and three arguments, respectively.

  What is an advantage of executing a process in background

What is an advantage of executing a process in background? How do you execute one program from within another?

  Write a fraction class called fraction.java

Write a Fraction class called Fraction.java that implements these methods: add - This method receives a Fraction parameter and adds the parameter fraction to the calling object fraction. multiply - This method receives a Fraction parameter and multip..

  What type of output does the javadoc command

What type of output does the javadoc command generate and how do you view the output?

  Discuss quasi-experimental designs

Jackson (2012), even-numbered chapter exercises, p 360. Describe the advantages and disadvantages of quasi-experiments? What is the fundamental weakness of a quasi-experimental design? Why is it a weakness? Does its weakness always matter?

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Write a void function this passed three integers

1. Write a void function this passed three integers by reference. The function should rearrange the parameter values so that the first parameter will get the smallest value; the second parameter the middle value; and the third parameter the largest v..

  Write a program in java to perform lzw decoding

Write a program in java to perform LZW decoding. It should read and write textual lists of integers.

  Consider the following conditions

Consider the following conditions: An enqueuer waiting on a full-queue or a dequeuer waiting on an empty queue sleep indefinitely, unless woken up by another thread. A thread must send a signal ONLY when it adds an element to an empty queue or remove..

  Define java implementation to implement the requirements

Produce a Java implementation to implement the requirements of Question 1, that is, to perform the 32-bits two complement and 32-bit floating-point conversion of a given number.

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