Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91773956
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

A researcher knows that the average distance commuting

A researcher knows that the average distance commuting students live from campus was previously 8.2 miles. Because of the rising prices of gasoline, the research wants to test the claim that commuting students now live c ...

Could you help me to solve the following stats problemthe

Could you help me to solve the following stats problem? The number of patients waiting for flu vaccine at A hospital has the following probability distributions. x 1 2 3 4 p(x) 0.2 0.3 0.4 0.1 What is the variance of num ...

In some states allow requires drivers to turn on their

In some states allow requires drivers to turn on their headlights when driving in the rain. A highway patrol officer believes that lesson one-quarter of all the drivers follow this rule. As a test, he randomly samples 20 ...

A street vendor is asking people to play a simple game you

A street vendor is asking people to play a simple game. You roll a pair of dice. If the sum on the dice is 10 or higher, you win $10. If you roll a pair of 1's, you win $59. Otherwise you lose $5. If the random variable ...

If a wooden car has 30 independent components that all must

If a wooden car has 30 independent components that all must function for the wooden car to operate successfully during a race, and the probability of successful operation for any single component is 0.999, what is the pr ...

Question based upon your company profile install and

Question: Based upon your company profile, install and configure Windows Server within the virtual environment. 1. Ensure that the server name is appropriate for your corporation. 2. Create a complex password for the Adm ...

If the annualized five-year rate of return is 15 and if the

If the annualized five-year rate of return is 15%, and if the first year's rate of return is 20%, and if the returns in all other years are equal, what are they? Provide the answer in % with four decimal places without r ...

Be sure to show the equation and proportion from table you

Be sure to show the equation and proportion from table you used to calculate your answer 1) What is the upper arm weight for a 70 kg male? 2) What is the torso mass for a 65 kg female? 3) What is the weight of the right ...

Discuss why a financial services organization would benefit

Discuss why a financial services organization would benefit from using one framework over another (COSO, COBIT,) -- choose a framework or frameworks that in your opinion would be most ideally suited for such an organizat ...

The question is asking how to do it in linuxa scientist ran

The question is asking how to do it in Linux. A scientist ran an experiment that generated data that accumulated in a sequence of files: data1, data2, data3, data4 and data5. He wants to know how many lines of data he ha ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As