How to fix these erros LocalResource.java:153: error: LocalResource is not abstract and does not override abstract method getPay() in Person public class LocalResource extends Person { ^ LocalResource.java:160: error: incompatible types: String cannot be converted to int super(firstName, lastName, date);
How to fix these erros
LocalResource.java:153: error: LocalResource is not abstract and does not override abstract method getPay() in Person public class LocalResource extends Person { ^ LocalResource.java:160: error: incompatible types: String cannot be converted to int super(firstName, lastName, date);
public class LocalResource extends Person {
private static int idCounter = 0;
private int id;
private String sector;
private String trn;
public LocalResource(String firstName, String lastName, String trn, String date, String sector){
super(firstName, lastName, date);
this.trn = trn;
this.sector = sector;
this.id = ++idCounter;
}
public String getSector() {
return sector;
}
public void setSector(String sector) {
this.sector = sector;
}
public int getId(){
return id;
}
public String getTRN(){
return Integer.toString(id +100000000);
}
public String getContact() {
return "LocalResource#" + Integer.toString(id);
}
}
class LocalConsultant extends LocalResource implements Citizen, Consultant {
private String skill;
private double permitTax;
public LocalConsultant(String dob, String sector, double skillPrice, double taxRate, String skill) {
super( dob, sector);
this.skill = skill;
this.permitTax = taxRate * skillPrice;
}
public double earnFromSkill(){
return permitTax;
}
public String getContact(){
return "LocalConsultant#" + getId();
}
public double getPay() {
return earnFromSkill()-permitTax;
}
}
![152
153 public class LocalResource extends Person {
154
155
156
157
158
159
160
161
162
163
164}
165
166
167
168
169
170 ▾
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185}
186
private static int idCounter = 0;
private int id;
private String sector;
private String trn;
public LocalResource (String firstName, String lastName, String trn, String date, String sector) {
super (firstName, lastName, date);
this.trn = trn;
this.sector = sector;
this.id = ++idCounter;
public String getSector() {
return sector;
}
public void setSector (String sector) {
this.sector = sector;
}
public int getId() {
return id;
}
public String getTRN () {
}
return Integer.toString(id +100000000) ;|
public String getContact() {
return "LocalResource#" + Integer.toString(id);
}](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2ca3eaf2-3bda-40e1-af2e-245059bd57cf%2Fec9236ff-e6dd-467b-b106-f863352431c5%2Flujycw_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![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)