Question: need it using java language the output should be as shown below help please Implement the following class diagram that models Order Management System 20

need it using java language the output should be as shown below help please  need it using java language the output should be as shown
below help please Implement the following class diagram that models Order Management
System 20 Device -Name String type: String To class Order, add method
total that returns total of all order's items prices. Create a new

Implement the following class diagram that models Order Management System 20 Device -Name String type: String To class Order, add method total that returns total of all order's items prices. Create a new class called Company that has array list of customers, books, devices, orders, and add setter/getter for each one of them. Add the following methods : .) unShipped Orders(): it returns array list of all orders that are not shipped (shipped field is false) b) totalBookSales(): it returns total of book sales (money) in all orders. e) customerOrder(int), it receives a customer id, and returns array list of all his orders. d) moreBooks(): it returns an array of customers who bought books and devices but spent more money on books than on devices. e) highestoit returns name of the customer who has the maximum sale 1 Grading: Implementing all classes according to the class diagram Method total in Q1 Method un ShippedOrders ( Q2-a Method totalBookSales0 Q2-b Method customerOrderint) Q2-c Method moreBooks(): Q2-0 Method highesto:Q2-e Total This is the test for HW#1, the output should be same as the one below import java.lang.reflect. Array; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; public class Test { public static void main(String[] args) { // to create an object of company Company c=new Company(); // to create an array list of device Device d1=new Device (123, 2000, "Galaxy S7", "Mobile"); Device d-new Device (124, 1500, "Smart LED","TV"); Device d3=new Device (125,150,"watch xyz", "Watch"); ArrayListdevices=new ArrayList(); // to add the device objects to the array list Collections.addALL(devices, di, d2, d3); // to set the devices of company C.setDevices (devices); Book b1=new Book (201,150,"12345","How to program"); Book b2-new Book (202,50,"55345", "Qatar History"); Book b3-new Book (203,75,"245345","Computer ethics"); ArrayListbooks=new ArrayList(); Collections.addALL(books, b1,b2,63); Customer ci-new Customer (1,"Ahmed"); Customer c2=new Customer (2, "Sara"); Customer c3=new Customer (3,"Nasaer"); Customer c4=new Customer (4, "Khaled"); ArrayListcustomers-new ArrayList(); Collections.addALL(customers, c1, c2,c3,04); c.setCustomers (customers); ArrayList items1=new ArrayList(); Collections.addAll(items, di,d2); ArrayList items2=new ArrayList(); Collections.addALL(items 2, b1,b3); ArrayList items 3=new ArrayList(); Collections.addALL(items 3, d3, b1,b2), ArrayList items4=new ArrayList(); Collections.addALL(items, di, d2,3); ArrayList items5-new ArrayList(); Collections.addALL(items4, d2, d2, b1,b2,63), Order 01-new Order (1,01, items 1, false); order 02=new Order (2,c2,1tems2, true); Order 03=new Order (3,c3, items 3, true); Order 04=new Order (4,c4, items4,false); Order 05=new Order (5,c4, items 5, true); ArrayList orders=new ArrayList(); Collections.addAll(orders, 01,02,03,04,05); c.setOrders (orders); // to test unshiped method System.out.println("Unshiped orders:"); for (Order o:c.unShippedOrders()) System.out.println(o.getNo(); System.out.println("------- // to test totalBookSale System.out.println("Total of book sale:"); System.out.println(c.totalBookSales()); --"); System.out.println("------- // to test customer order System.out.println("The orders of customer no 4"); for (Order o:c.customerOrders (4) System.out.println(o.getNo()); System.out.println(". ---"); //to test moreBook System.out.println("Customers who spent money to buy books more than devices"); for (Customer cust:c.moreBooks () System.out.println(cust.getName()); --"); System.out.println("------- //to test highest method System.out.println("The best customer :"); System.out.println(c.highest()); The output : Com Unshiped orders: Total of book sale: 700.0 The orders of customer no 4 Customers who spent money to buy books more than devices Nasaer - - - The best customer : Khaled

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!