Find Jobs
Hire Freelancers

class implementation

$30-5000 USD

Færdiggjort
Slået op næsten 22 år siden

$30-5000 USD

Betales ved levering
Candy Machine Class Specifications ================================== a) The c.m. class stocks and sells four items: chips, jawbreakers, cookies, chewing gum. c.m. class must store info about each of these. This includes the quantity on hand and the price of each type of item. In addition, a password is stored in order for the owner to gain special access to the machine. b) c.m. class keeps track of the money collected. c) When a c.m object is initialized for the first time, the quantities for each item are to be set at 50, there is no money in the machine, there are no sales that have been made, and the password is set to “password??. After the first run of a c.m. object, the data for the quantity of each item, the amount of money on hand and the current password will be read from a file called “[login to view URL]?. d) 20 units is the max storage available for the candy machine for an item. e) When a c.m. object passes from scope or the program ends, the data stored in the object is written to a file called “[login to view URL]?. f) Each item costs .50 g) the c.m. class must also have member functions to output a menu of available items, the cost of the items, record the transactions, accept the users money and give change. The menu function can't receive any input nor call any other functions. The function that accepts user choices can't perform any processing but may call other member functions to do so. h) There must be an unlisted choice on the menu that the owner of the c.m. object can access that will return the amount of money in the system if the user inputs a specified password. There must also be a means of setting this password separate from constructors. All constructors should set the password to “password?? initially. The user should only be able to change the password if the password is known. i) There must be an unlisted choice on the menu that allows the owner of the c.m. object to restock the machine. When a machine is restocked, items are set to the maximum allowed and all money is removed from the machine. The password must be entered in order to be able to open the machine and restock it. j) must be an unlisted choice on the menu that allows the owner to shut machine down. the member function that receives the user's choice must return a value indicating that it is time to shut down. the password must be entered to turn it off. k) c.m object can't sell items that are out of stock ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased. Write a program that will operate an object of the candy machine class. The program is to run the machin util the owner elects to shut the machine down. There is no input/output in the program. All input/output is to be performed by calls to member functions the object of class Cany Macine. ## Platform the program needs to run on the unix system and be written in C++. ## Deadline information Must be completed by 4-22-02. Must be done by six o'clock pm
Projekt-ID: 2847686

Om projektet

3 forslag
Projekt på afstand
Aktiv 22 år siden

Leder du efter muligheder for at tjene penge?

Fordele ved budafgivning på Freelancer

Fastsæt dit budget og din tidsramme
Bliv betalt for dit arbejde
Oprids dit forslag
Det er gratis at skrive sig op og byde på jobs
Tildel til:
Brug Avatar.
See private message.
$25,50 USD på 14 dage
5,0 (12 anmeldelser)
3,2
3,2
3 freelancere byder i gennemsnit $33 USD på dette job
Brug Avatar.
See private message.
$22,95 USD på 14 dage
4,9 (5 anmeldelser)
2,8
2,8
Brug Avatar.
See private message.
$51 USD på 14 dage
5,0 (11 anmeldelser)
1,7
1,7

Om klienten

Flag for UNITED STATES
United States
5,0
1
Medlem siden apr. 15, 2002

Klientverificering

Andre jobs fra denne klient

classes
$30-5000 USD
Tak! Vi har sendt dig en e-mail med et link, så du kan modtage din kredit.
Noget gik galt, da vi forsøgte at sende din mail. Prøv venligst igen.
Registrerede brugere Oprettede jobs i alt
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Indlæser forhåndsvisning
Geolokalisering er tilladt.
Din session er udløbet, og du er blevet logget ud. Log venligst ind igen.