CJCoding With Joseph
15free / daySign inCreate account

Seller is an abstract class with two protected fields and an abstract method commission(). Unlike a private field, a protected field can be used directly inside a subclass. Complete commission() in SeniorSeller.

Requirements: 1. The commission is 10 percent of sales. 2. When sales is above 5000, add a bonus of 100.0. Sales of exactly 5000 earn no bonus. 3. Use the sales field directly. There is no getter for it.

Do not change the Seller class.

Do NOT write a main method.

Expected output

Ravi earns 200.00
Mei earns 900.00

= newline. The output ends with a newline, so print one after the last line.

Hints4 available
Topics
Abstract ClassesClasses
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.