求人帮写个C++程序,期末大作业不会了~有尝的!!!

yujiahaoasd 2008-12-20 10:01:10
大作业不会了,希望有人来帮帮我,有尝的!我的QQ642856164
问题描述:
运用你最近掌握的软件知识,设计并制作一个POS系统。
这个系统应该要以4个数字的安全密码开头(必须是在security.txt这个文件中)。这个文件(security.txt)同时提供了the users’ names(以便系统辨识)以及管理层。
在密码通过以后,将会出现一个具有以下函数的菜单:
1、 列举出for sale的物品-这将给user做出选择来列举所有物品或仅有包含主要价目顺序的物品。
2、 *添加物品:添加关于一个新的物品的细节,将它储存到data file and memory中。
3、 获得物品:用于POS的运行;顾客买一项或更多的物品(clerk通过了密码),系统将提供一个记载着主要价目和其他细节的摘要。
4、 切断链接:允许一个新的clerk用一个新的安全密码登陆。
5、 退出。
*第三条只有管理员拥有使用权限。管理员将会被‘a’ character在他们的security file中的安全密码后鉴别。
你会被提供样品,系统必用security and data files(no other file format).。
你还将被提供一个working executable,这样你就可以测试这个program看看他该如何运行。
看一下这些简单的output below (and executable file)寻找更多的有关于这个program如何运行的细节。
• 你的 program应该使用十斤重编排所有的货币总额, e.g. $450.00.
• 你应该检查登陆密码是否是4个字符, as shown in the sample.
• 当添加物品时, 你应该检查合法收入: 物品密码必须是4个字符并且一定不能持续存在, 物品名称以及描述不能为空, 物品价格不能是 $0 或更少, GST 必须是1或0.
• 你将上交带有以下错误信息的文件错误:一个文件无法打开reading, 显示 “Error opening file!”, 或显示“Error writing to file!”.
• 你可以假定这个data file有一个最大值为100的账目,顾客每一笔业务的购买数目不能超过20.
• 你只需要在这个progarm的开头处load the data file into memory一次,. 你应该用一个 适当的结构来处理它. security file不应当读取到 memory中.
• 你的产品格式应该符合给出的样品. 使用这些来核查你的工作. 这个样品和exe文件形成板式的一部分。你的program 应该尽量符合要求进行对应.
• 你应该尽量恰当的制造函数 (使用逻辑函数设计). E.g. 如果你在列举或购买这些产品时需要display它们, 你应该使用一个function.
• 你应该用课堂上讲过的方法编写好的密码, 包括选择恰当的 data types, 采用固定的途径,命名的原则与设计富于变化, 以及做出好的评述. 尽量不要再次犯下你第一次作业中出现的错误.
• 仔细检查作业分数单的细节. 尽量不要遗漏东西, 如果你对有些东西不太明白, 请到LearnJCU discussion board上提问, in the Assignment 2 forum.

你将要做的

• 用既不是pseudocode也不是flowchart的方式做一个 IPO chart .
你必须使用IPO file 提供的样板, 包括样品函数 (标明出每一个函数在分开的表格中进行). 作业的这一部分可以在第11周给你的老师看, 他们将做出点评. 如果你在做一个 flowchart, 它可以是手绘的. 如果是一个electronic flowchart, 在你的IPO Word document. 里拷贝一份。伪代码不必手写. (不作要求, 你可以为你的考试准备做一份.)
用LastnameFirstNameCP1200A2IPO.doc给你提供的模板为这份文件命名。
• Functional sub-section code file called LastnameFirstnameCP1200A2Part1.cpp.
该文件第十一周到期, 文件即将开始运行,完成主要循环菜单系统的一部分并且拥有你计划写的每个函数的空白函数(e.g. when the user chooses 1, it runs the function to list the items, which doesn’t have to do anything except maybe a cout statement).这是代码中重要的一步(为整个程序做一个完整的段落小节), 为了鼓励你这么做, 没有完成要求的人将会失去10%的总成绩. 把这个作为你编写IPO plan的第一步!
• 完成的函数编码 (one .cpp file) 包括适当的评述.
命名为: LastnameFirstnameCP1200A2.cpp (不要上交 projects/solutions, etc.)
提交
你的Part1的代码文件单独交到LearnJCU的“A2 Part1” box.
你的两个主要文件 (IPO in Word or PDF and your cpp code file) 交到LearnJCU的“A2 POS” box. 不要把他们分开.加一个文件, 然后点击“Add another file”来上传第二, 点击提交. I如果你有一个手写的 flowchart, 请明确命名交给你的导师.其他文件类型 (VSD, ZIP, RAR, etc.)不符合要求.

Sample Output
Run the executable file for more examples of how your system should respond (e.g. if it doesn’t check for invalid characters in the price, then you don’t have to).

Welcome to the CP1200 POS System
Created by Student Name
Please enter your security code: 5044
Security code not found!
Please enter your security code: 50455
Invalid length security code.
Please enter your security code: '123
Invalid character in security code.
Please enter your security code: 5844

Bruce, please choose an option:
1. List items for sale
2. *Add item
3. Purchase items
4. Logout
5. Quit
1
List (a)ll, or only within price (r)ange? a
0001 - Fish hook (Useful for catching fish): $0.50*
0110 - Metronome (A device for keeping musical time): $49.00*
1234 - Basil (Bunch of basil): $2.50

Bruce, please choose an option:
1. List items for sale
2. *Add item
3. Purchase items
4. Logout
5. Quit
2
You need to be an administrator to add items.

Bruce, please choose an option:
1. List items for sale
2. *Add item
3. Purchase items
4. Logout
5. Quit
4
Goodbye, Bruce
Please enter your security code: 1234

Lindsay, please choose an option:
1. List items for sale
2. *Add item
3. Purchase items
4. Logout
5. Quit
2
Please enter item details:
Code: 0001
Item code 0001 already exists!
Code: 0002
Name: Bread
Descr:
Description can not be blank!
Descr: Essene Sprouted Bread
Price: 5.20
GST(1/0): 8
GST must be 0 or 1!
GST(1/0): 0
Bread added.

Lindsay, please choose an option:
1. List items for sale
2. *Add item
3. Purchase items
4. Logout
5. Quit
1
List (a)ll, or only within price (r)ange? r
Lowest price: $-2
Lowest price must be $0 or more!
Lowest price: $0
Highest price: $0
Highest price must be greater than lowest price!
Highest price: $6
0001 - Fish hook (Useful for catching fish): $0.50*
1234 - Basil (Bunch of basil): $2.50
0002 - Bread (Essene Sprouted Bread): $5.20

Lindsay, please choose an option:
1. List items for sale
2. *Add item
3. Purchase items
4. Logout
5. Quit
3
Enter code of item to buy (-1 to finish): 0001
Enter code of item to buy: 0001
Enter code of item to buy: 0003
Invalid item code!
Enter code of item to buy: 0002
Enter code of item to buy: -1
0001 - Fish hook (Useful for catching fish): $0.50*
0001 - Fish hook (Useful for catching fish): $0.50*
0002 - Bread (Essene Sprouted Bread): $5.20
3 items.
Total cost: $6.30
Including GST of: $0.10

Lindsay, please choose an option:
1. List items for sale
2. *Add item
3. Purchase items
4. Logout
5. Quit
6
Invalid option!

Lindsay, please choose an option:
1. List items for sale
2. *Add item
3. Purchase items
4. Logout
5. Quit
5
Goodbye, Lindsay
Press any key to continue . . .
...全文
508 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaosaner3 2008-12-21
  • 打赏
  • 举报
回复
LZ是不会,
又不是不做
建议高手能给LZ一个思路
xtting_8984313 2008-12-21
  • 打赏
  • 举报
回复
作业都让人写啊!
我非计算机的,所有东西都是自己写的,需要具体的细节再提问吧.
sagegz 2008-12-21
  • 打赏
  • 举报
回复
自己先搞清楚,这作业的考察主要是哪方面,然后再具体去细看那方面的知识.
Dreamz 2008-12-20
  • 打赏
  • 举报
回复
作业还是建议自己做,具体哪里不会了再多调试调试,修改修改,实在搞不定了来这里问问,呵呵.
jieao111 2008-12-20
  • 打赏
  • 举报
回复
so long~
ypb362148418 2008-12-20
  • 打赏
  • 举报
回复
Very Long ,顶LS的同志,真的,否则你永远不会
owldestiny 2008-12-20
  • 打赏
  • 举报
回复
自己写吧,否则你永远不会

65,211

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧