Question: Java Question Write a method called displayOrders that will write the details of a fast food company's orders to the screen. These details are stored

Java Question

Java Question Write a method called displayOrders that will write the details

Write a method called displayOrders that will write the details of a fast food company's orders to the screen. These details are stored in objects of the class Order and each object of class Order is stored in an ArrayList called orders. You may assume that orders has been declared elsewhere in the class containing the method displayOrders and is visible inside displayOrders. An Order has many attributes, but the only details of an order to be written to screen are the following, which are stored as individual fields inside an Order object: orderNumber, of type int, that uniquely denotes the order. * customerName, of type String. * suburb, of type String indicating the suburb the order was sent to. totalPrice, of type double showing the total price of all items in an order. The method displayOrders takes no parameters and returns nothing. The screen will show the details of each order on separate lines in the form: 1001 John Citizen Caulfield 24.00 You may assume class Order has accessor (get) methods that return the value of each attribute

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!