Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java program screenshot please Super class : Product Member Attributes : Productno, Productname, Price, Quantity, Purchase Amount, and Discount - declare all the variables are

image text in transcribed

image text in transcribed

java program

screenshot please

Super class : Product Member Attributes : Productno, Productname, Price, Quantity, Purchase Amount, and Discount - declare all the variables are public. Member Methods Producto To set the input values of Productno, Productname, Price, and Quantity using parameterized constructor. Calculate To calculate the Purchase Amount using the formula Purchase Amount = Quantity * Price; Processo To calculate the discount amount and retum the discount using the following condition. 5 MARKS Purchase Amount Discount 1000-2000 2.5% of Purchase Amount 2001-3000 5.0%of Purchase Amount 3001-4000 7.5% of Purchase Amount To display the following details Productno, Productname, Price Quantity and Orderdate Display 0 Sub Class : Purchaseorder Member Attributes Orderno, ShippingDate, City, Zipcode - declare all the variables are public. Member Methods Purchaseorder To set the input values Ordemo, ShippingDate, City and Zipcode through using parameterized constructor. Display 0 To display the following details Productno, Productname, Price Quantity, Orderdate, Orderno ShippingDate, City and Zipcode 2.5 MARKS Driver Class : Purchase_test To create object of product. Print Productno, Productname, Price, Quantity, Purchase Amount, and Orderdate To create object of purchase order. Print Order no, ShippingDate, City and Zipcode. To display a Discount of the Product. 2.5 MARKS

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

How would we like to see ourselves?

Answered: 1 week ago