Menu

(Solved) : 1 Create Interface Named Printable Contains One Method Called Printall Method Takes One S Q32218604 . . .

1. Create an interface named Printable which contains one methodcalled printAll(). This method takes one String argument and returna String. Define a class named Document which implements theinterface Printable. Inside of the Document class, overrides theprintAll() method, returns the String that passes in the Stringargument.

2. The superclass Employee contains:

a constructor that accepts a String corresponding to the name ofthe company

a toString method that returns ’employee at XXX’ where XXX isthe name of the company.

Write a class definition for the subclass HourlyPaidEmployeecontaining:

a constructor accepting a String which is used as a parameter tothe superclass constructor

a toString method that returns ‘Hourly paid employee at XXX’.This method must use the toString method of its superclass.

Expert Answer


Answer to 1 Create Interface Named Printable Contains One Method Called Printall Method Takes One S Q32218604 . . .

OR