Java application for order management

Assignment Help Basic Computer Science
Reference no: EM131049534

A Small Manufacturing Company (SMC) uses a Java application for order management. The company 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 should be between 8 and 25.

You are required to design, implement and test a Java application for order management consisting of three classes: Order, CreditOrder and TestOrders. These classes are specified below.

The class Order defines the instance variables orderId, clientName and orderValue. It 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 defines the instance variable interest. It also defines a constructor with arguments, the get/set methods for the additional instance variable, and the specific methods toString and getCreditOrderTotalValue.

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 order1 and a CreditOrder object creditOrder1 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 order1 and creditOrder1.

3. Instantiate a CreditOrder object creditOrder2 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 creditOrder2.

4. Check if the two orders creditOrder1 and creditOrder2 are issued by the same client. Display the clients of the two orders and an appropriate message depending on the test result.

5. Calculate and display which of the two orders order1 or creditOrder2 would generate the largest income for the SMC.

Reference no: EM131049534

Questions Cloud

Adoption of open-source software in the chapter : Refer to the Real World Case about the U.S. Department of Defense and its adoption of open-source software in the chapter.
Differences between isdn and idn : Explain the differences between ISDN and IDN. How is ISDN accessed? What is broadband ISDN? Compare and contrast the services used in B-ISDN.
Draw graph illustrating competitive markets hiring decision : Draw two side-by-side graphs representing the derived demand for this firms labor demand - Draw a graph illustrating the competitive markets hiring decision (two side-by-side graphs)
Write a script for a communication law and ethics class : Write a script for a communication law and ethics class. I need a word document script which explains the concepts in my Communication Law and Ethics Class.
Java application for order management : You are required to design, implement and test a Java application for order management consisting of three classes: Order, CreditOrder and TestOrders. These classes are specified below.
An operating system necessary : Why is an operating system necessary? That is, why can't an end user just load an application program into a computer and start computing?
Write a paper about environmental pollution : Write a paper about Environmental Pollution.
Pointing out the objectives of research : "A research scholar has to work as a judge and derive the truth and not as a pleader who is only eager to prove his case in favour of his plaintiff." Discuss the statement pointing out the objectives of research.
Second time merge the result of step : What is the complexity (In terms of k and n) of merging k number of arrays each of size n using the merge algorithm. First time, merge array1 and array2, second time merge the result of step 1 with the third array, and so on.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  The concepts of legal writing

In this assignment, we will attemptto utilize some of the concepts of legal writing that we will discuss in class.Below you will find an essay that, to put it mildly, needs a bit of work. Thewording is verbose and uses “slang”. There is no focus or o..

  Access point connectivity statistics collected

Minimum two paragraphs that summarizes your learning and concludes your accomplishments in the lab.

  Do you want to tune up your bicycle or make your own repairs

Do you want to tune up your bicycle or make your own repairs? Come to the Campus Bicycle Resource and Repair Center.

  Determine the angle a u t which he first begins to slip

A roofer, having a mass of 70 kg, walks slowly in an upright position down along the surface of a dome that has a radius of curvature of If the coefficient of static friction between his shoes and the dome is μ = 0.7 determine the angle a u t whic..

  What are the practical benefits

What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. import java.net.* versus import java.net.Socket)?

  What is the output of the following sequence of loops

What is the output of the following sequence of loops

  Which of the following statements is true

Which of the following statements is true?

  The number specified in the integer

VB Scripting exercise: Exercise #3 - Fun With Strings #1 Create a function that takes in a string and an integer and returns a string that contains the original string repeated by the number specified in the integer.

  Show that if l is regular then other may not be context-free

Given a language L we define perm(L) to be the language obtained by taking all the permutations of all the words of L. Show that if L is regular then perm(L) may not even be context-free.

  Effective user-level thread implementation

What must a kernel provide for an effective user-level thread implementation? Do you have immediate help for this answer?

  Advantages of using new technologies in training

List and detail several advantages of using new technologies in training and development

  What does it mean to spawn a process?

Process can be in different states to allocate the resources better. List the symbol and meaning for each of these states. 2. What does it mean to spawn a process?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd