Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the uml make a class file named order, and then create a program named TestOrder that test the Order class file. Design a class

Using the uml make a class file named order, and then create a program named TestOrder that test the Order class file. image text in transcribed
image text in transcribed
Design a class Order following the given UML diagram UML for class "Order" Description declared as public static final, a constant with value 0 declared as public static final, a constant with value 1 declared as public static final, a constant with value 2 declared as private static, initialized to 0, represent the total number of orders private private, Date class is defined in the java.util package private, use ON ORDER,CANCELED, SHIPPED constants to represent statuses private private Order ON ORDER: int CANCELED: int -orderName: String -date: Date -status: int -shippingAddress: String -phoneNumber: String billingAddress: String +Order(Name: String) totalOrder+-1 orderName Name status ON ORDER date new Date) set the cancel date by date- new Date(), status is set to CANCELED set the shipping date by date- new Date(), status is set to SHIPPED return the date (it might be the order date, or shipping date, or cancel date depending on the status) +cancel): void +ship): void +getDateO: Date +setShippingAddress (a: String): void shippingAddress a tsetPhoneNumber(p: String): void phoneNumber- p +setBillingAddress(add: String): void billingAddress-add return totalOrder return orderName return date +getOrderName): String +getDateO: Date +getStatus: int FgetShippingAddress: String return status return shippingAddress return phoneNumber PhoneNumber): String etBillingAddressO: String return billingAddress return the information of orderName, date, status, shippingAddress, billingAddress, and phoneNumber as a String +toString0: String

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions