Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do in Java :) Please edit my code :) package demo; //CLASS ADDRESS class CustomerInfo{ //VARIBALES String customerId; String customerName; long contactNumber; Address address;

Please do in Java :) image text in transcribed

Please edit my code :)

package demo;

//CLASS ADDRESS class CustomerInfo{ //VARIBALES String customerId; String customerName; long contactNumber; Address address; //Constructor CustomerInfo(String customerId,String customerName, long contactNumber, Address address){ this.customerId=customerId; this.customerName=customerName; this.contactNumber=contactNumber; this.address=address; } //Getter and Setter Methods public String getCustomerId() { return customerId; }

public void setCustomerId(String customerId) { this.customerId = customerId; }

public String getCustomerName() { return customerName; }

public void setCustomerName(String customerName) { this.customerName = customerName; }

public long getContactNumber() { return contactNumber; }

public void setContactNumber(String city) { this.contactNumber = contactNumber; }

public int getAddress() { return address; }

public void setZipcode(Address address) { this.address = address; } } //Customer Class class OrderInfo{ private static int orderIdCounter = 100; int orderId; Customer customer; Food[] orderedFood; double totalPrice; String status; public Order() { orderIdCounter++; } public int getTotalNoOfOrders() { return orderId; } Order(int orderId, Customer customer, Food[] orderedFood, double totalPrice){ { this.orderId=orderID; this.customer=customer; this.orderedFood=orderedFood; this.totalPrice=totalPrice; this.status=status; } public int getOrderId(){ return orderId; } public void setOrderId)int orderId){ this.orderId; } public Customer customer() { return customer; } public void setCustomer(Customer customer) { this.customer; } public Food[] getOrderedFood() { return orderedFood; } public void setOrderedFood(Food[] orderedFood) { this.orderedFood; } public double getTotalPrice() { return totalPrice; } public void setTotalPrice(double totalPrice) { this.totalPrice; } public String getStatus() { return status; } public void getStatus(String status) { this.status; } class Food{}

public void displayOrderInfoDetails() {//DISPLAY ALL DETAILS ABOUT CUSTOMER System.out.println("OrderId: "+orderId); System.out.println("Customer: "+customer); System.out.println("Ordered Food: "+orderedFood ); System.out.println("Total Price is: " +totalPrice); System.out.println("Status: " + status); System.out.println("CustomerId: "+customerInfo.customerId + ", Customer Name: "+customerInfo.customerName+", Customer Contact Number: "+customerInfo.contactNumber+", Customer Address "+customerInfo.address); }

public double totalPrice(double totalPrice) { return totalPrice; }

} //Main Class public class CustomerAggregation { public static void main(String args[]) { Address a=new Address(100,"Jonny",8326677,"123 Fake St"); Order c=new Order(100,"Monika","Pizza",13, " , Ready to go!"); o.displayOrderInfo(); System.out.println("The total price is: $"+ c.totalPrice(20.0)); } }

Problem Statement You have already created the Customer and Order classes in the SwiftFood project. Modify the Customer and Order classes based on the class diagram given below Order _orderld Counterlint orderidint customer Customer orderedFoods Food totalPrice double P > One Orderderedfood Foodlotomer Customer Nerdesin Orderlin Overlorderint void getCustomer Customer Customer customer Customer:void eidered sods Food Orderfoods orderedFood Food get Tota Price duble Totaltractalprice doubles void get Sering stat Sering ved Customer * customerld: String custam String contact Number long maddele Address Customer Customerstomer String customer String contact Number long Audio Customer stomeriame String contadNumber long addin Adder Customing Customer customerlasting vod get customer String Customer lamelustame Name String ved getContactomber long contemberontaalumber longlived Address Address Adved deply Custerbetah vid potricidade de

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago

Question

1 The difference between a command system and a market system.

Answered: 1 week ago