Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(JAVA) 1) Write a blueprint class that tracks the orders made to vendors in a company's product purchasing system. We will create a class called

(JAVA)

image text in transcribedimage text in transcribed

1) Write a blueprint class that tracks the orders made to vendors in a company's product purchasing system. We will create a class called ProductOrder. The requirements are as follows: a) The class ProductOrder has the following private instance variables:productID orderld, quantityRequested quantity Fulfilled all of types integer. We will need separate variables for quantity requested and quantity fulfilled because the vendors may not be able to fulfill the requests completely b) The class/object model will provide the values of the quantityRequested and quantityFulfilled to the client program. To do this, have proper getters and setters for the instance variables. c) The class/object model has method, calculate Payment that will calculate the pending payments to be made to vendors for the product quantity fulfilled. To do this, the method will receive the payment price as a parameter and multiply this price with the quantity Fulfilled to determine the payments that are due. Write a method in the class that will take in a (double) parameter called price and returns the value of the payment due (also a double). This value of payments due is the amount that the company will need to pay to the vendor. d) The class/object model has a method called printPendingOrder that will print the number of un-fulfilled orders. The value of balance is given by the difference between quantityRequested and quantity Fulfilled. The printPendingOrder method takes in no input parameters and has a void return. e) The class/ object model has constructors that will allow default and full-argument overloaded constructors in the client class. Write appropriate default and overloaded constructors. ProductOrder -orderID:int -productID:int -quantityRequested:int -quantityFulfilled:int +ProductOrder) +ProductOrder(int,int,int,int) +getOrderID():int +getQuantity Requested():int +getQuantity Fulfilled():int +setOrderID(int):void +setProductID(int):void +setQuantityRequested (int):void +setQuantity Fulfilled (int):void +calculate Payment(double):double +printPendingOrder():void nswer: Copy and paste the complete code for ProductOrder here

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

Describe the key uses of CPM and Gantt charts.

Answered: 1 week ago