Connecting Tech Pros Worldwide Help | Site Map

Can't get my inventory program to compile

Member
 
Join Date: Nov 2006
Posts: 59
: Nov 29 '06
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>
Newbie
 
Join Date: May 2007
Posts: 6
#101: May 5 '07

re: Can't get my inventory program to compile


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]
blahbean's Avatar
Newbie
 
Join Date: Sep 2008
Posts: 2
#102: Sep 13 '08

re: Can't get my inventory program to compile


Quote:

Originally Posted by carylrahn

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.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,714
#103: Sep 13 '08

re: Can't get my inventory program to compile


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.
blahbean's Avatar
Newbie
 
Join Date: Sep 2008
Posts: 2
#104: Sep 13 '08

re: Can't get my inventory program to compile


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.
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,865
#105: Sep 14 '08

re: Can't get my inventory program to compile


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.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,714
#106: Sep 14 '08

re: Can't get my inventory program to compile


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.
Newbie
 
Join Date: Jun 2009
Posts: 2
#107: Jul 5 '09

re: Can't get my inventory program to compile


Quote:

Originally Posted by msquared View Post

I agree professor and our moderators and most of our experts also agree with this attitude. We are happy to help out students with errors in their code or help them by giving directions in how to find the solution they are looking for. Although we can't control how all experts respond it is good that you are aware of this site and it's content. Nobody learns anything by copying someone elses code.

ADMIN

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.
Newbie
 
Join Date: Jun 2009
Posts: 2
#108: Jul 5 '09

re: Can't get my inventory program to compile


Quote:

Originally Posted by msquared View Post

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.

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.
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#109: Jul 5 '09

re: Can't get my inventory program to compile


Quote:

Originally Posted by joel72566r View Post

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.

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
Nepomuk's Avatar
Moderator
 
Join Date: Aug 2007
Location: Germany
Posts: 2,466
#110: Jul 5 '09

re: Can't get my inventory program to compile


Quote:

Originally Posted by JosAH View Post

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

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
Reply