Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

pleas solve it * Consider the following attached class : * Consider a subclass PremiumCust. - PremiumCust has two additional instance variables DiscountPercentage (int) and

pleas solve it
image text in transcribed
* Consider the following attached class : * Consider a subclass PremiumCust. - PremiumCust has two additional instance variables DiscountPercentage (int) and AdditionalDiscount (int) both private. - Write an appropriate constructor for each of the classes making use of the constructor of the superclass in defining those of the subclass. - Override getAmount() method that returns - The Amount of an Invoice after deducting the DiscountPercentage and the AdditionalDiscount of (PremiumCust). IA - (Dis * IA/100) - AddDis - Make use of getAmount of the superelass. Override also toString() method for each class making use of the toString 0 method of the superclass in defining those of the subelasses. (toString 0 should return something that ean be printed on the sereen). - Create the following object from the subclass and print it on the screen. Invoice p1 = new PremiumCust(15673, "Fahd Abdullah", 8400,45,100); * Output should be like the following

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

Students also viewed these Databases questions

Question

WHAT IS AUTOMATION TESTING?

Answered: 1 week ago

Question

What is Selenium? What are the advantages of Selenium?

Answered: 1 week ago

Question

Explain the various collection policies in receivables management.

Answered: 1 week ago