Forgot your password?
Register
|
Login
Customer
Freelancer
Tell a Friend
Home
 
Post a new project
 
Activity
 
Cashier
 
Settings
 
Help
- All Categories -
Business & Marketing
Graphic Design
Photo
Programming
Translations
Video & Audio
Websites
Writing
Search Services
Home
>
Find work
>
Programming
>
Programming Languages
>
Simple Java Program written
Project:
Simple Java Program written
Posted on:
29/06/2008 22:07(GMT)
Customer's Budget:
Not sure
Status:
Completed
Project Description:
> I need this completed by Monday evening. Must be done in Java JDK 6.0 and should be written in "beginner" style. I am looking for a "by the hour" quote and an estimate of how many hours it will take. If you are a prgrammer this should be easy.
Your task in this assignment is to write a simple class definition for a vending machine. The class should have:
Attributes
Soda count
Money credit (how much money has been inserted)
Methods
Add money
Vend
Restock
Constructor
For simplicity sake, you may assume that the machine can hold up to 50 of one type of soda; you may also assume that all sodas cost $0.65. When adding money, simply take in a floating-point number representing how much money to add (i.e. you do not have to manage different coins).
Be sure to make sure that enough money was added to the machine before a soda is vended. Also, when a soda is vended, return the appropriate change (i.e. if more than $0.65 was added to the machine, then return the extra money). Again, don’t worry about managing different kinds of coins – just display the amount returned.
When the machine is "restocked," just set the soda count to the maximum that the machine will hold.
Once you have written the class, create a main/driver program that interacts with an instance of the class. Your program should present a menu of options to the user and process the user’s choice; use creativity and object-oriented design in your solution
Contacting this Buyer:
One-time fee for first contact:
$3.60 (next bid: $4.40)
The customer has been contacted by:
1 out of 5 requested offers
Nader
30/06/2008 09:41(GMT)
Additional Info:
Project ID:
15216
Customer:
ima...
Customer's Rating:
Work from:
All Countries
Work duration:
1 days
Sitemap
|
About Us
|
Contact support
|
User agreement
|
Privacy policy
|
Affiliate program
Copyright © 2008 BizReef™ ( MeVideo Ltd.) All rights reserved.
International Sites:
International
|
Canada
|
Australia
|
Español
|
Deutsch
Freelancers registered with BizReef automatically accept:
Processing request