7/26/2023 0 Comments Java Program On Pizza Hut![]() ("Additional toppings are $1.25 each, choose from Pepperoni or Sausage. Here's the code public static void main(String args) Maybe I'm missing something obvious, maybe not. 3 Answers Sorted by: 1 I noticed a few potential problems with your code: You need to initialize your ArrayLists using new ArrayList<> () instead of new ArrayList () Im a bit confused as to how youre calling menu.addPizza () and orderList.addPizza () seeing as the two are instances of ArrayList, and such a method does not exist in that class.![]() ![]() ![]() My final print ends up with orders that are always over $100 and i cant seem to figure out why other than it has something to do with numberOfToppings variable. I am having trouble with a basic pizza order program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |