Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribed

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

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

Compose the six common types of social business messages.

Answered: 1 week ago

Question

Describe positive and neutral messages.

Answered: 1 week ago