库存计划第2部分 [英] Inventory Program Part2

查看:81
本文介绍了库存计划第2部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须分配以下内容:修改库存程序,以便应用程序可以处理多个项目。使用数组存储项目。输出应一次显示一个产品的信息,包括产品编号,产品名称,库存单位数量,每个单位的价格以及该产品的库存价值。此外,输出

应该显示整个库存的价值。

·创建一种方法来计算整个库存的价值。

·创建另一种方法,按产品名称对数组项进行排序。


到目前为止,我已尝试过这就是我所拥有的;


I have to assignment which includes the following: Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output
should display the value of the entire inventory.
· Create a method to calculate the value of the entire inventory.
· Create another method to sort the array items by the name of the product.

I have tried so far this is what I have;


展开 | 选择 | Wrap | 行号

推荐答案

您的实际问题是什么?你有没有获得所需的输出,是否有编译/运行时错误?
What is your actual question? Are you not getting the desired output, are there compilation/runtime errors?


我收到了24个编译错误
I received 24 compile errors


Produce.java:53:class,接口,或enum预期

}

^


Produce.java:58:类,接口或枚举预期

var myObjectArray = new Array();

^


Produce.java:60:类,接口或枚举预期

SetObject(胡萝卜,potatoe,......)


我有24个错误,由上面的
Produce.java:53: class, interface, or enum expected
}
^

Produce.java:58: class, interface, or enum expected
var myObjectArray = new Array();
^

Produce.java:60: class, interface, or enum expected
SetObject ( "carrots", "potatoe",...)


I have 24 errors consisting of above


这篇关于库存计划第2部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆