Show the graphics simulation of drinks machine

Assignment Help Programming Languages
Reference no: EM13145787

FIGURE shows the graphics simulation of the drinks machine.

2077_Graphics simulation of the drinks machine.png

The list of inputs and outputs is as follows:

IP0 Coin slot sensor        OP0 Coin hold solenoid
IP1 Cola drink button      OP1 Coin accept solenoid
IP2 Lemon drink button   OP2 Dispense cola drink solenoid
IP3 Cherry drink button   OP3 Dispense lemon drink solenoid
IP4 Lime drink button      OP4 Dispense cherry drink solenoid
IP5 Reject coin button     OP5 Dispense Lime drink solenoid

The operation of the Soft Drinks Machine is as follows;

When a coin is clicked on with the mouse it is placed into the slot, it then operates the coin sensor IP0. This should operate OP0 (coin hold solenoid), which will hold the coin in place. At this point either a drink is selected or the coin rejected.

The rejection of a coin is by operating IP5, which should reset OP0 allowing the coin to fall into the rejection box. If a coin is rejected, pointing the mouse at the coin and clicking resets the machine.

If a drink is selected by the operation of one of the drink select buttons, OP1 (coin accept solenoid) should operate. This allows the coin to fall into the Kept box. Once the coin has dropped into the box, the solenoid corresponding to the selected drink should operate, allowing the drink to be dispensed.

Once the selected drink has been dispensed, clicking the coin will reset the machine.

Important Notes: When writing the program you must ensure that:

(a) The coin cannot be rejected once a drink has been selected.

(b) Selecting a drink disables all of the other drink buttons.

As usual, use the listed inputs and outputs and any flags, timers, and counters you require to complete the assignment. Use the documentation facilities to describe the program function.

Reference no: EM13145787

Questions Cloud

Explain reason inspectors are slower than average : A particular factory can only inspect 46 mice per hour with a standard deviation of 10. At alpha=0.02 company have reason to believe that these inspectors are slower than average?
To share surfing business : Two people are going to share surfing business. They decided to start internet-based business selling surf wear. They don't have previous experience, so they want to keep the business as simple as confidential.
The dissolving of calcium hydroxide in water an endothermic : Is the dissolving of calcium hydroxide in water an endothermic or exothermic process?
Unrecorded trademark with a remaining life : The buildings have a 20-year life and the equipment has a 10-year life. $50,000 was attributed to an unrecorded trademark with a 16-year remaining life. There was no goodwill associated with this investment. Compute the book value of Vega at Janua..
Show the graphics simulation of drinks machine : When a coin is clicked on with the mouse it is placed into the slot, it then operates the coin sensor IP0. This should operate OP0 (coin hold solenoid), which will hold the coin in place. At this point either a drink is selected or the coin rejected.
Find p-value joining weight reducers on average will lose : At the .05 level of significance, can we conclude that those joining Weight Reducers on average will lose less than 10 pounds? Determine the p-value.
Describe the pathway of the conduction from the atria : Describe the pathway of the conduction from the atria to the ventricles and correlate this conduction with the ECG waves.
What are the ground state electron configuration : what are the ground state electron configuration of the elements in period 2 of this alternate reality?
What is the budgeted cash balance : Finally, Giovanni estimates that he needs to withdraw $55,000 from the business (as dividends) to cover his own personal living expenses this year. Will Giovanni have enough cash to get through the year? What is his budgeted cash balance on Decemb..

Reviews

Write a Review

Programming Languages Questions & Answers

  Program asks for number of shares-whole dollar portion price

Program asks for number of shares held, whole dollar portion of price, and fraction portion. fraction portion is to be input as two integer values, one for numerator and one for the denominator.

  Designing class to denote person-s height

Design a class, PersonHeight, to denote the person's height. Our class will include the following members.

  Program to read an employee-s number from keyboard

Write a program that reads an employee's number from the keyboard, number of hours worked and an hourly rate of pay.

  Write down a method which is passed string argument

Write down a method, getFirstLine, which is passed a String argument and that returns first line. (Recall that lines are terminated with the "n" character.)

  Write function which take parameter-string and returns vowel

Write function which takes as parameter and string and returns the vowels (a, e, i, o, u). Function prototype should look like: void countVowels(string str, int& aCt, int& eCt, int& iCt, int& oCt, int& uCt);

  Write program to caculate value of user-s stock

Write a program which caculates value of user's holding of a particular stock. Program asks for number of shares held, whole ¬dollar portion of price for one share, also the fraction portion.

  Write client-side javascript function to convert ampersands

Your job is to write a client-side JavaScript function that converts all ampersands in a form field to the text string " and " when the form loses focus on the textbox in question.

  Include hyperlink for confirming order in online ticket

Include a check box for attending the Awards Event. Include a hyperlink for confirming the order. Make the link invisible to begin but display it after the Submit button has been clicked.

  Function to count number of times the given number occured

Write a main function to input 20 integers in the range of 1 to 6. Write a function to count the number of times the numbers 2 and 5 occur. The function should declare static variables count2 and count5.

  Write ipo steps and detailed pseudo code for program

Write IPO steps and detailed pseudo code for program which will ask user to enter restaurant meal cost. The program should then compute the tax, tip on the restaurant bill,

  Differentiating heavyweight and lightweight process

What is the difference between a heavyweight and a lightweight process? Give an example of where heavyweight processes are appropriate.

  Provide example of array and how it could be used

Provide the example of the Array and how it could be used. Then look over sections on ArrayLists. Would an ArrayList be better suited for your use?

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