Modify the Firm example such that it accomplishes its polymorphism using an interface called Payable. I got an error (attached image). How can I solve it? Firm.java: public class Firm { //----------------------------------------------------------------- // Creates a staff of employees for a firm and pays them. //----------------------------------------------------------------- public static void main (String[] args) { Staff personnel = new Staff(); personnel.payday(); } } Clark.java: public class Clark implements Payable { public static void main (String[] args) { public void wages(); { System.out.println("Wages can be paid to the clerks"); } } } Payable.java: public interface Payable { public void wages();
Question: Modify the Firm example such that it accomplishes its polymorphism using an interface called Payable.
I got an error (attached image). How can I solve it?
Firm.java:
public class Firm
{
//-----------------------------------------------------------------
// Creates a staff of employees for a firm and pays them.
//-----------------------------------------------------------------
public static void main (String[] args)
{
Staff personnel = new Staff();
personnel.payday();
}
}
Clark.java:
public class Clark implements Payable
{
public static void main (String[] args)
{
public void wages();
{
System.out.println("Wages can be paid to the clerks");
}
}
}
Payable.java:
public interface Payable {
public void wages();
}
![Clark.java:5: error: illegal start of expression
public void wages ();
Clark.java:5: error: illegal character: '\u3000'
public void wages ();
Clark.java:5: error: invalid method declaration; return type required
public void wages ();
Clark.java :5: error: illegal character: '\uff1b'
void wages ( ) ;
public
Clark.java :10: error: class, interface, enum, or record expected
}
5 errorS](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F909d4e96-ec45-4f89-986e-8cb112f8d100%2F8c924524-6c9e-4c4b-ad47-bb9bb1870749%2F0izlx6q_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)