Design, implement and test a Java application for order management to be used by a Small Manufacturing Company (SMC).

SMC accepts orders and credit orders from their clients. For an order, the client pays the order value in advance. For credit orders, the SMC credits the clients with the full dollar value of the order (in other words, the client should not pay in advance for the ordered products). For credit orders, the client and the SMC representatives negotiate the interest (as percentage of the order value) that will be paid by the client on top of the order dollar value, when the ordered items are delivered. The interest value range should be between 10 and 20.

The class Order defines the instance variables orderId, clientName and orderValue. It also defines a constructor with arguments, the method toString and and get/set type methods for the instance variables.

The class CreditOrder inherits the class Order. This class inherits the instance variables of class Order and defines its specific instance variable interest. It also defines a constructor with arguments, the get/set methods for the instance variable interest, the new method getCreditOrderTotalValue and overrides the method toString.

Additional methods for the classes Order and CreditOrder may be defined if necessary.

The class TestOrders contains only the method main. Here, you should do the following:

1. Instantiate an Order object ord1 and a CreditOrder object cord1 by invoking the argument constructors. Use values of your own as argument values. Display to the console the string representation of the two objects by invoking the toString method.

2. Calculate and display the total income of the SMC as a result of delivering the two orders ord1 and cord1.

3. Instantiate a CreditOrder object cord2 by invoking the argument constructor. This time, the argument values will be obtained by inviting the user to enter them one by one, from the console. Display the string representation of the object cord2.

4. Check if the two orders cord1 and cord2 are issued by the same client. Display an appropriate message depending on the test result.

5. Calculate and display which of the two credit orders cord1 or cord2 would generate the largest income for the SMC.

Your program should compile and run without errors.

1. Java source files, and

2. A document file (.pdf or .doc/.docx) describing your solution which should include the following sections: (1) A short problem analysis, (2) Design decisions and assumptions, (3) Short description of classes, (4) User interface, (5) Relevant test cases and screenshots, (6) Error handling, (7) Lessons learned and (8) Possible future developments. The size of the document should be of 3 pages, single spaced, font size 12.

Extra questions:

1. Overloading and overriding are similar but distinct concepts. Explain how they are similar and how they are different. Give appropriate examples to illustrate each concept.

2. Both concepts require a determination to be made about which method is being called. When is that determination made in each case? Which of these two concepts can only be used in a programming language that supports inheritance?

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.


(1) A short problem analysis
This program use inheritance. There are 2 classes Order and CreditOrder. CreditOrder class inherits from Order class. It has its own attribute : interest
(2) Design decisions and assumptions
a. Order value should be a positive number
b. Interest value range should be between 10 and 20
(3) Short description of classes
a. Class Order
i. Attributes :
1. orderId
2. clientName
3. orderValue
ii. Methods :
1. getClientName
2. getOrderId
3. getOrderValue
4. setClientName
5. setOrderId
6. setOrderValue
7. toString
b. Class CreditOrder : extends class Order
i. Attributes :
1. interest
ii. Methods :
1. setInterest
2. getInterest
3. toString
4. getCreditOrderTotalValue...
$30.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats