Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this is data structure help please the output should be like that data structure (java) language here is the test so i need the code
this is data structure help please
the output should be like that
data structure (java) language here is the test so i need the code of each class
Implement the following class diagram that models Order Management System. Customer Order Item -Dint -name String -No int Client Customer tems. Arraylist of em shipped boolean code int -price double Book Device HSBN String -title: String -Name String -Type: String 1- To class Order, add method total that returns total of all order's items prices. 2- 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 : a) unShippedOrders(): 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. c) 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) highest(): it returns name of the customer who has the maximum sale! The output : Unshiped orders: ||| Total of book sale: 700.0 The orders of customer no Customers who spent money to buy books more than devices Nasaer ------ The best customer : Khaled 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 di-new Device (123, 2000, "Galaxy S7","Mobile"); Device d2-new Device (124, 1500, "Smart LED","TV"); Device d3-new Device (125,150,"watch xyz", "Watch"); ArrayListStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started