谁帮小弟做份考试题?
看到一份题,怎么这么难,谁能帮我做做啊?CP1200 - Assignment 2 - 2007-1 - Point of Sale System
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.
[[it] 本帖最后由 zhangleitb 于 2008-12-9 21:06 编辑 [/it]]