![]() ![]() ProductQuantity = scnr.nextInt() // Set the variable productQuantity for user inputĬartTotal = (item1.getPrice() * item1.getQuantity()) + (item2.getPrice() * item2.getQuantity()) ProductName = scnr.nextLine() // Set the variable productName for user input ProductQuantity = scnr.nextInt() // Set the variable productQuantity for user user input ProductPrice = scnr.nextInt() // Set the variable productPrice for user input ![]() ProductName = scnr.nextLine() // Sets the variable productName for user input ItemToPurchase item2 = new ItemToPurchase() ItemToPurchase item1 = new ItemToPurchase() The result I keep getting are all 0's in "TOTAL COST". ShoppingCartPrinter.java and ItemToPurchase.java ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |