Find Jobs
Hire Freelancers

class implementation

$30-5000 USD

已完成
已发布大约 22 年前

$30-5000 USD

货到付款
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
项目 ID: 2847686

关于此项目

3提案
远程项目
活跃22 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
See private message.
$25.50 USD 在14天之内
5.0 (12条评论)
3.2
3.2
3威客以平均价$33 USD来参与此工作竞价
用户头像
See private message.
$22.95 USD 在14天之内
4.9 (5条评论)
2.8
2.8
用户头像
See private message.
$51 USD 在14天之内
5.0 (11条评论)
1.7
1.7

关于客户

UNITED STATES的国旗
United States
5.0
1
会员自4月 15, 2002起

客户认证

这个客户的其他工作

classes
$30-5000 USD
谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。