Question: (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)

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!