CJCoding With Joseph

Total Staff Pay

Staff is abstract with an abstract method Pay. Create two subclasses: Manager whose Pay returns 5000, and Developer whose Pay returns 4000. The tester puts one of each in a Staff[], adds up every Pay(), and prints the total. Do NOT write a Main method.

The program prints:

9000

Expected Output:

9000
Topics:
Inheritance
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.