| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1327 人关注过本帖
标题:◆求C++程序代写◆这是期末作业我实在是不会了...555◆
只看楼主 加入收藏
锅锅
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-12-7
收藏
 问题点数:0 回复次数:3 
◆求C++程序代写◆这是期末作业我实在是不会了...555◆
给你们看下作业要求..我快崩溃了 有偿求代码~~加我QQ:1942903

Problem Description:
With your recent software development experience, you are now asked to design and create a Point of Sale (POS) system.
The system will start by asking for a 4-digit security code, which must exist in the security file (security.txt). This file also stores the users’ names (so the system can be polite) and admin level.
After the code has been accepted, there will be a menu with the following functionality:
1.    List items for sale - this gives the user the choice of listing all items or only items within a certain price range.
2.    *Add item - for adding the details for a new item and storing it in the data file and memory.
3.    Purchase items - for POS processing; customers buy one or more items (the clerk enters the codes) and the system presents a ‘docket’ with the total price and other details.
4.    Logout - this option allows a new clerk to login, entering a new security code.
5.    Quit
*The Add item functionality is only available to administrators. Administrators are identified by the ‘a’ character after their code in the security file.

You are provided with sample security and data files, which the system must use (no other file format).
You are also provided with a working executable, so you can test the program to see how it should run.
See the sample output below (and executable file) for more details of how the program should work.

    Your program should format all currency amounts with two decimal places, e.g. $450.00.
    You should check the login code is exactly 4 numeric characters, as shown in the sample.
    When adding items, you should check for valid input: item codes must be 4 numeric characters and must not already exist, item names and descriptions can’t be blank, item prices can’t be $0 or less, GST must be 1 or 0.
    You are to handle file errors with the following error messages: if a file fails to open for reading, display “Error opening file!”, or writing, display “Error writing to file!”.
    You can assume that the data file will have a maximum of 100 entries and that customers will purchase no more than 20 items per transaction.
    You only need to load the data file into memory once, at the start of the program. You should use an appropriate array of structs for this. The security file should not be loaded into memory.
    Your output formatting should match the samples provided. Use these to test your work. The sample output and exe form part of the specification. Your program should match as exactly as possible.
    You should create functions as appropriate (using logical function design). E.g. if you need to display the products when listing them and also when purchasing them, you might use a function for this.
    You should write good code using the principles taught in class, including things like choosing appropriate data types, use of constants, variable naming conventions, formatting and good commenting. Try not to repeat any mistakes you made in your first assignment.
    Check the assignment marking sheet for details on how marks are given for this assignment. Try not to miss anything, and if you are unsure of something, please ask about it on the LearnJCU discussion board, in the Assignment 2 forum.

 
You are to produce:
    An IPO chart with the algorithm in either pseudocode or flowchart.
You must use the template IPO file provided, including the sample function (note that each function goes in a separate table). This part of the assignment can be shown to your tutor during the practical in week 11, where they will give feedback. If you are doing a flowchart, it can be hand-drawn if you like. If creating an electronic flowchart, copy it into your IPO Word document. Pseudo code may not be hand-written. (No desk-check is required, but you may like to do one for your testing.)
Name this file as for the template you’re provided: LastnameFirstNameCP1200A2IPO.doc
    Functional sub-section code file called LastnameFirstnameCP1200A2Part1.cpp.
This is due in week 11 and is to be a working, partially complete program that does the main looping menu system and has mostly empty functions for each function you plan to write (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). This is an important step in code development (doing a complete sub-section of the whole program), and to encourage you to work this way, you will lose 10% of the total if this is not submitted. Do this as the first step in coding your IPO plan!
    Complete, functional code (one .cpp file) containing appropriate comments.
Call this: LastnameFirstnameCP1200A2.cpp (don’t submit projects/solutions, etc.)

[[it] 本帖最后由 锅锅 于 2008-12-7 16:14 编辑 [/it]]
搜索更多相关主题的帖子: 作业 
2008-12-07 16:12
锅锅
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-12-7
收藏
得分:0 
Submission
Your Part1 code file gets submitted individually to the “A2 Part1” box on LearnJCU.
Your two main files (IPO in Word or PDF and your cpp code file) get submitted to the “A2 POS” box in LearnJCU. Do not zip them up. Just add one file, then click “Add another file” to upload the second, then click Submit. If you have a hand-drawn flowchart, please clearly name this and give it to your lecturer. Other kinds of files (VSD, ZIP, RAR, etc.) will not be accepted.

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 . . .
2008-12-07 16:13
supernpu
Rank: 1
来 自:西安
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-12-6
收藏
得分:0 
好长啊,有没有中文的题目。。
2008-12-07 16:53
锅锅
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-12-7
收藏
得分:0 
有中文,我翻译了一下

问题描述:
运用你最近掌握的软件知识,设计并制作一个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 . . .
2008-12-08 11:49
快速回复:◆求C++程序代写◆这是期末作业我实在是不会了...555◆
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.047852 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved