473,497 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can't get my inventory program to compile

59 New Member
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>
Nov 29 '06
109 25697
lucky29105
6 New Member
Apparently myself and everyone else is having the same problems with the same course! Anyway, I am struggling with my Inventory Program, it's the same assingment as the one posted above. I am on Part 2- can you please help?

[edit]Code Remove as per site posting guidelines[/edit]
May 5 '07 #101
blahbean
2 New Member
Hello students,

I am one of the professors who teach this class. I want everyone to know that I am aware of this forum and if any of the programs posted here are turned in as assignments, they will earn a 0 for plagiarism. You must actually program and work on code in order to learn Java. It is not alright to copy someone else's program posted on a forum and hand it in as your own.

Thank you
** Admin Note **
This post has been heavily edited for language and content where it breaks the site rules. However, the opinion has been expressed and that can stand.
** End Admin Note **

Maybe if {the professors} did their jobs the students wouldn't have to come to these sites for help with coding. I am a past student and am completely appalled that you seem to be upset with students having to go elsewhere. If the level of teaching were adequate, there wouldn't be students on this site trying to learn java second-hand from true experts who actually try and help people.
Sep 13 '08 #102
NeoPa
32,556 Recognized Expert Moderator MVP
I feel you may be missing the point somewhat.

Certainly the way I see it, is that the professors, however well they do or don't teach their subject, do not want to see the learning process sobotaged by students simply picking up pre-done code. This would have the effect that they don't do the course as planned.

Sometimes, to learn something (in university or in life) you have to go through the struggle to get the understanding at the end. If this is bypassed, then the rewards too are lost.

From my own discussions on the subject, I know that most of our moderators feel that they want the members to learn the lessons and progress in their understanding. This is not accomplished by the simple expedient of providing ready-made answers.

As far as I'm aware, we've not had any complaints where the students have been provided with explanations, or been given the opportunity to discuss the technical issues with our experts.
Sep 13 '08 #103
blahbean
2 New Member
I feel you may be missing the point somewhat.

Certainly the way I see it, is that the professors, however well they do or don't teach their subject, do not want to see the learning process sobotaged by students simply picking up pre-done code. This would have the effect that they don't do the course as planned.

Sometimes, to learn something (in university or in life) you have to go through the struggle to get the understanding at the end. If this is bypassed, then the rewards too are lost.

From my own discussions on the subject, I know that most of our moderators feel that they want the members to learn the lessons and progress in their understanding. This is not accomplished by the simple expedient of providing ready-made answers.

As far as I'm aware, we've not had any complaints where the students have been provided with explanations, or been given the opportunity to discuss the technical issues with our experts.


While understand your position as an administrator of this site who is charged with upholding the integrity of the site, and of course with all due respect to you and your job, I wonder if you've ever felt the frustration that we past and present UoP students feel with the inadequacies of the learning materials and course work? My position is simple: If you're going to claim to be a professor of a course then you must do your job correctly in actually teaching the coursework. There are many students online that I've noticed who are struggling with the same problems. We then turn to you (thank you so much by the way for all of our hard work) experts, true experts of coding, for tips, tricks and other input as we muck our way through courses with "professors" who don't provide enough input in their own courses.

UoP students choose UoP out of necessity. Most probably don't have the luxury of going to an actual university due to actual real life obligations which do not involve any sort of computer programming, i.e. raising children, etc. We choose UoP out of necessity and not out of laziness. Those who have been able to go to schools like MIT, etc. are more educated due to having the opportunity to physically attend a university but also due to the high level of education taught at institutions such as MIT as compared to UoP. UoP students don't have the luxury of turning to tutors either. So we come on these sites to learn from the experts, which in a way are like tutors. I for one appreciate very much all of the help you experts provide. But if the faculty at UoP took a more hands-on approach to teaching the coursework, there wouldn't be a need for all of the students to search sites such as this. But at the same time, experts cannot be made in only 9 weeks of class. A level of understanding must be met during those 9 weeks and I do not believe that is happening.
Sep 13 '08 #104
MMcCarthy
14,534 Recognized Expert Moderator MVP
The actual site policy doesn't disagree with any of the points you have made it actually agrees in that the only thing that is not allowed in answers is a full code solution.

That is the issue in question and what the professor was arguing against. Our experts are happy to help you or anyone to reach a solution but not to just give the answer. In our opinion nobody learns that way.

Unfortunately, we can't control all answers and sometimes members unfamiliar with our policy do post full code solutions. When these are found they are deleted or edited as appropriate.
Sep 14 '08 #105
NeoPa
32,556 Recognized Expert Moderator MVP
I have to say that, while I sympathise with your position (clearly expressed), I am (we are) in no position to discuss the situation that may pertain to any individual university. This is not a problem though, as I feel it has very little bearing on the matter at hand. We are, after all, a global site.

How we respond to these questions, and what is acceptable on this site (providing assistance and guidance but no simple code solutions) is beneficial to all. Providing full-code solutions, on the other hand, is not really much help to anyone. It may get them past a hurdle, but they will only fall at the next one if they don't progress their understanding at all.
Sep 14 '08 #106
joel72566r
2 New Member
@msquared
the problem that i am having is that i can not find any examples of the week 8 day seven assignment anywhere including the text, ive whent throughtthe entire book not just what was avalible online through the class help, i would not use there stuff but i would like to see what course of action they are using so that i could at least have a chance to pass this class. im not worryed about being able to program in java after i complete the class but i would like to have the chance3 to pass it.
Jul 5 '09 #107
joel72566r
2 New Member
@msquared
but if we can not even get an example then how can we even learn, i do not even have an idea where to start to find an exaple to see and make the messisay changes to work with my own files to make it not be a plagerisum problem.
Jul 5 '09 #108
JosAH
11,448 Recognized Expert MVP
@joel72566r
You don't learn by example; e.g. if you don't understand your assignment or homework text you wouldn't understand a Java code solution either; you need further examples and even more examples. You learn by understanding what a problem is about and by dissecting it in smaller sub-problems until you can start designing Java code for those sub-problems.

We can help you with the understanding part and with some code snippets that don't work the way you wanted them to work but we won't spoonfeed you with examples. You have to do the work yourself, you'll learn from that.

btw, I don't understand the rest of your sentence.

kind regards,

Jos
Jul 5 '09 #109
Nepomuk
3,112 Recognized Expert Specialist
@JosAH
I think it should be "i do not even have an idea where to start looking to find an example to see and make the necessary changes to make it work with my own files and thereby make sure it will not be a plagiarism problem."

The thing is, you shouldn't learn to get code and change it to do what you want it to do, you should learn to write it yourself. We can give you examples of small parts, constructs that you'll need in some way to fulfill your task. How a for loop works maybe. Or how you can create own classes. Which classes you can find in the standard library that will help you maybe. Stuff like that.

Learning by example can work of course, I learned a great deal of what I know about Java with examples myself. But there has to be a point where you can start from scratch and write a program without an example and your tutor obviously thinks, this time has come. So you'll have to deal with that. If you don't care about actually learning the stuff in a way that will allow you to use it after the course, then you are missing the point of any such course.

Greetings,
Nepomuk
Jul 5 '09 #110

Sign in to post your reply or Sign up for a free account.

Similar topics

12
2369
by: jason | last post by:
Access 2000: I have a customer-inventory table I need to loop through and compile a list of all the inventory items the customer is tracking. The problem I am finding is that a simple loop...
0
7091
by: south622 | last post by:
I'm taking a beginning Java course and I'm stuck in week eight of a nine week course. If anyone could help me I would greatly appreciate it. This assignment was due yesterday and each day I go past...
67
22891
by: hollywoood | last post by:
I am trying to add the Delete button, save and search buttons. I have tried to call my teacher and he is absolutly no help and i have read and reread the text but still have no idea what is going...
4
1854
by: momov4 | last post by:
I can't seem to resolve these errors. I have had people compile these codes on their computers with no problem, but I keep getting errors...can anyone help???? Here are the errors: cannot find...
4
2294
nexcompac
by: nexcompac | last post by:
Ok, I posted a similar post but now need to jump back into it. Here is what I have been able to clean up. I am using textpad and jbuilder. Still getting used to the whole java world and I am...
3
6966
by: cblank | last post by:
I need some help if someone could help me. I know everyone is asking for help in java. But for some reason I'm the same as everyone else when it comes to programming in java. I have an inventory...
2
2501
by: pinkf24 | last post by:
I cannot figure out how to add the following: Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform...
1
2646
by: jcato77 | last post by:
I need help with a class project I'm working on, Below is my assignment and the code I have currently created. Assignment: Modify the Inventory Program by creating a subclass of the product class...
13
2059
by: jcato77 | last post by:
I am having trouble figuring out my code and was hoping someone could point me in the right direction. Below is my code what I need to due is create a method to add and display the value of the...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6991
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7373
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.