求专业翻译结果

来源:百度知道 编辑:UC知道 时间:2024/05/24 02:24:52
n this assignment, you are required to write a simple order processing system. To be simple, you are only required to create an Order class as well as an Item class. Each item knows its name and price. For example, item 1 might be a bottle of wine and has a price of $35. Items of goods can be added to the order and be removed from the order as well. The order class has the ability to calculate the total of the prices for all items added into the order. To hold the items, your Order class needs to have an array which is of type Item. Let’s make a rule for the order, that is, each order can take at most 5 items of goods. If more than 5 items are to be added into the order, an error message should be shown. Write a test class OrderTest.java to test your program. Your test program should be able to run forever until user chooses to exit the program. Your test program should run as follows:
Welcome to BCIT order processing system!
To start a new order, press ‘O’, to exit the

这任务, 你要写处理系统的一个简单的次序. 为了很简单, 你只要产生一个次序班级和项目班级. 每个项目知道它的名字和价格. 举例来说, 项目 1 可能是一瓶酒而且有一价格的 $35. 货物的项目能被加到次序而且被从次序恐怕最好移动. 次序班级有能力为进入次序之内被增加的所有的项目计算价格的总数. 为了要举行项目, 你的次序班级需要有有类型项目的排列. Let'the s 为次序制造一条规则,也就是说 , 那货物那能最多每个次序拿 5个项目. 如果比 5个项目多是进入次序之内被增加, 一个错误信息应该被显示. 写测试班级 OrderTest.java 给测试你的计画. 你的测试计画应该能够永远地跑直到使用者选择退出计画. 你的测试计画应该依下列各项跑:
欢迎来到 BCIT 次序处理系统!
那开始一个新的次序, press'O', 那退出计画,press'E'.
O一个新的次序被设定初值. 请增加项目你想要命令. (每个次序最多能拿 5个项目.) 那进入你的次序那对完成 " 完成了 "; 我们将会让你知道最后价格的你的次序.