thanks alot. i have solved it.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
thanks alot. i have solved it.
Last edited by kerrina; July 31st, 2011 at 02:47 PM.
What line in your program is supposed to show that? Did you leave off a println?why it is that it does not show my update quantity?
What is the name of the variable that you want to display?
You should test that the value of count is valid. Using its value as an index could case an error.qty[count-1]=input.nextInt();
thanks alot. i have solved it.
Last edited by kerrina; July 31st, 2011 at 02:46 PM.
I can't update my quantity. when i add or subtract, it does not show up.
Please edit your code and wrap it in code tags to preserve the formatting. See: http://www.javaprogrammingforums.com...do=bbcode#code
Please post the console from when you execute your program that shows the problem.
Add comments to it showing where the problem is.
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.
may i know where to add validation?
Sorry, I have no idea what you are asking?may i know where to add validation?
● Validation (and feedback)
The program should handle ALL invalid entries by the user, e.g. invalid numeric data, adding when the array is full, etc. If user made a mistake in the entry, the program should inform the user via appropriate feedback.
Is this a new problem?
Have you solved the quantity update problem?
That is often done by using an if() statement to test the contents of the data before it is stored into an array to be saved. If the data is bad, a message is output and the input requested again.If user made a mistake in the entry, the program should inform the user via appropriate feedback.
I have not yet solve the problem. trying to solve now.
Yeah. but, i don't know where to add validation
Lets work on one problem at a time.
Where does your program update the quantity? Add a println there to show what its new value is.
Then add a println to show its value after the call to the method that updated it to see if there was a problem there.
Please do not delete your original post. This thread has just been rendered useless.
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.