无法让我的库存程序进行编译 [英] Can't get my inventory program to compile

查看:70
本文介绍了无法让我的库存程序进行编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个java课程会持续一个星期左右,如果我找不到这个简单的程序,我将会失败。我不能得到任何东西来编译至少得到几点......这是作业...


4. CheckPoint:库存计划第1部分

?资源:Java:如何编程

?截止日期:第5天[个人]论坛

?选择适合库存的产品(例如,工作场所,办公用品,音乐CD,DVD电影或软件中的产品)。

?创建一个产品类,其中包含产品编号,产品名称,库存单位数量
以及每个单元的价格。

?创建一个Java应用程序,显示产品编号,产品名称,库存单位数量,每个单元的价格以及库存的价值(

库存单位数乘以每个单位的价格)。注意文本中的良好

编程实践,以确保您的源代码可读和良好

记录。



1. CheckPoint:库存计划第2部分

?资源:Java:如何编程

?截止日期:第4天[个人]论坛

?修改库存程序,以便应用程序可以处理多个项目。使用数组

来存储项目。输出应该一次显示一个产品的信息,

包括产品编号,产品名称,库存单位数量,每个产品的价格。单位,以及该产品的库存价值。另外,输出

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

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

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


2. CheckPoint:库存计划第3部分

?资源:Java:如何编程

?截止日期:第7天[个人]论坛

?通过创建产品类的子类来修改库存程序,该子类使用您选择的产品的一个额外的独特功能(对于DVD子类,您可以使用

电影标题, 例如)。在子类中,创建一个方法来计算产品的

库存值,其名称与先前为

产品类创建的方法相同。子类方法还应该为该产品的库存增加5%的重新进货费用



?修改输出以显示您选择的此附加功能和重新进货

费用。


4. CheckPoint:库存计划第4部分

?资源:Java:如何编程

?截止日期:第5天[个人]论坛

?修改库存程序以使用GUI。 GUI应该一次显示一个产品信息,包括产品编号,产品名称,库存数量,每个产品的价格,每个产品的价格。单位,以及该产品的库存价值。在

中,GUI应该显示整个库存的价值,附加属性,

和补货费。


>
2. CheckPoint:库存计划第5部分

?资源:Java:如何编程

?截止日期:第7天[个人]论坛

?通过向GUI添加一个按钮来修改库存程序,该按钮允许用户将

移动到库存中的第一个项目,上一个项目,下一个项目和最后一个项目。如果显示

第一项并且用户点击了上一个按钮,则最后一项应该显示为
。如果显示最后一项并且用户单击下一步按钮,则应显示第一项



?使用Java图形类向GUI添加公司徽标。


这是我能够编译的最后一个程序...我应该删除用户输入部分,但无论我尝试什么,它都行不通....


[根据网站规则删除程序 - 参见常见问题解答]


Pleeeease java geniuses ...帮助!!! :)

我可以通过<电子邮件已删除>

I have a java class that goes for another week or so, and I am going to fail if I can''t figure out this simple program. I can''t get anything to compile to at least get a few points... Here are the assignments...

4. CheckPoint: Inventory Program Part 1
? Resource: Java: How to Program
? Due Date: Day 5 [Individual] forum
? Choose a product that lends itself to an inventory (for example, products at your
workplace, office supplies, music CDs, DVD movies, or software).
? Create a product class that holds the item number, the name of the product, the number
of units in stock, and the price of each unit.
? Create a Java application that displays the product number, the name of the product, the
number of units in stock, the price of each unit, and the value of the inventory (the
number of units in stock multiplied by the price of each unit). Pay attention to the good
programming practices in the text to ensure your source code is readable and well
documented.


1. CheckPoint: Inventory Program Part 2
? Resource: Java: How to Program
? Due Date: Day 4 [Individual] forum
? 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.


2. CheckPoint: Inventory Program Part 3
? Resource: Java: How to Program
? Due Date: Day 7 [Individual] forum
? Modify the Inventory Program by creating a subclass of the product class that uses one
additional unique feature of the product you chose (for the DVDs subclass, you could use
movie title, for example). In the subclass, create a method to calculate the value of the
inventory of a product with the same name as the method previously created for the
product class. The subclass method should also add a 5% restocking fee to the value of
the inventory of that product.
? Modify the output to display this additional feature you have chosen and the restocking
fee.


4. CheckPoint: Inventory Program Part 4
? Resource: Java: How to Program
? Due Date: Day 5 [Individual] forum
? Modify the Inventory Program to use a GUI. The GUI 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 GUI should display the value of the entire inventory, the additional attribute,
and the restocking fee.


2. CheckPoint: Inventory Program Part 5
? Resource: Java: How to Program
? Due Date: Day 7 [Individual] forum
? Modify the Inventory Program by adding a button to the GUI that allows the user to move
to the first item, the previous item, the next item, and the last item in the inventory. If the
first item is displayed and the user clicks on the Previous button, the last item should
display. If the last item is displayed and the user clicks on the Next button, the first item
should display.
? Add a company logo to the GUI using Java graphics classes.

Here is the last program that I was able to get to compile... I am supposed to remove the user input section, but no matter what I try, it doesn''t work....

[Program removed as per site rules - see FAQ]

Pleeeease java geniuses... HELP!!! :)
I can be reached at <email removed>

推荐答案

让我们一次进入一个阶段然后


[根据网站规则删除的程序 - 请参阅常见问题解答]
Let''s go one stage at a time then

[Program removed as per site rules - see FAQ]


main()中的print语句是C ++和Java的混合,即用Java打印到屏幕上你使用System.out.println( )不是System.out.printf()

main()应该看起来像
your print statements in main() are a mixture of C++ and Java, i.e. to print to the screen in Java you use System.out.println() not System.out.printf()
main() should look like
展开 | 选择 | Wrap | 行号


是的,谢谢你......你是一个救生员!!
yes please and thank you... you are a life saver!!


这篇关于无法让我的库存程序进行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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