![]() The toString method should not have any errors being produced, but I believe that the problem lies within the addToCart method. ![]() Thank you.Īn output from running the app is as follows: run:Įxception in thread "main" Īt (ShoppingCart.java:62)Īt (String.java:2854)Īt java.io.PrintStream.println(PrintStream.java:821) So, I basically need help with the addToCart method. That is why it is a null value within the toString method. The shopping cart has a max capacity of 5 items initially, but if the cart size is > 5, it will be increased + 3, via the increaseSize method.Īs stated below, I believe that the addToCart method is not adding the user described item to the cart. The user described item will be added to the shopping cart array, and then it will be printed out once it is successfully added. The app is supposed to allow the user to add an item to the shopping cart(item name, price, quantity). ![]() ![]() I am doing a Java Application for a class and need help with errors that are coming up after running the app. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |