How to fix error: LocalResource.java:194: error: constructor LocalResource in class LocalResource cannot be applied to given types; super( dob, sector);  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;

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 8PE
icon
Related questions
Question

How to fix error: LocalResource.java:194: error: constructor LocalResource in class LocalResource cannot be applied to given types; super( dob, sector);

 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;
    
}

             

 

186
187
188 class LocalConsultant extends Local Resource implements Citizen, Consultant |
189
190
191
192
193 ▼
194
195
196
197
198
199
200
201
202
203
204
205
206
207 ▾
208
209
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;
Transcribed Image Text:186 187 188 class LocalConsultant extends Local Resource implements Citizen, Consultant | 189 190 191 192 193 ▼ 194 195 196 197 198 199 200 201 202 203 204 205 206 207 ▾ 208 209 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;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,