Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(JAVA) 4) Create a class called Test ProductOrder in the same package that you created ProductOrder class in problem 1. The requirements for TestProductOrder class
(JAVA)
4) Create a class called Test ProductOrder in the same package that you created ProductOrder class in problem 1. The requirements for TestProductOrder class is as given below. Create a main method and write the code for main method as given below: a) Create a ProductOrder object called prodOrder1, using the default constructor. b) Use the setters on prodOrder 1 to set the values of instance variables. (Make sure quantity Fulfilled is lesser that quantityRequested) c) Prompt the user to provide a value for amount and scan this into a variable called price d) Call the calculate Payments method for prodOrder1 and to this method, pass on the value of price, (obtained from user). Print out the return value of this method call. e) Call the printPendingOrder method for prodOrder1. f) Prompt the user to provide a new value for quantityFulfilled and use the setter on prodOrder to set the new value of quantity Fulfilled. g) Create a new object called prodOrder2 using the overloaded constructor h) Call the printPendingOrder method for prodOrder2 i) Prompt the user to provide a new value of payment amount and scan this into the variable called price. i) Call the calculate Payments method for prodOrder and to this method, pass on the value of price, (obtained from user).Print out the return value of this method call. k) Use the setter and change the value of quantityRequested by increasing the orders requested to new value. 1) Call printPendingOrder method for cashReg2 to print out the pending orders. Answer: copy/paste your code below. Also provide a screen shot of the results. The outputs should be formatted such that each out put line should describe what is the output stands for
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started