ow to fix this error: Error: Main method not found in class ExpatConsultant, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application public ExpatConsultant(String dob, String sector, double skillPrice, double taxRate, double airfare) { super(); String[] parts = dob.split("/"); super.setDob(Integer.parseInt(parts[1]), Integer.parseInt(parts[0]), Integer.parseInt(parts[2])); this.skillPrice = skillPrice; this.permitTax = skillPrice * taxRate; this.airfare = airfare; this.sector = sector; this.id = getNextId(); } public String getSector() { return sector; } public String getContact() { return "Reg. Expatriate#" + id; } public int getNextId() { id = nextId; nextId++; return id; } public int getId() { return id; } public double getPay() { double earnings = earnFromSkill(); return earnings - permitTax - airfare; } public double earnFromSkill() { return skillPrice; } public String getWorkPermit() { return "WP00" + id; } }
How to fix this error: Error: Main method not found in class ExpatConsultant, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application
public ExpatConsultant(String dob, String sector, double skillPrice, double taxRate, double airfare) {
super();
String[] parts = dob.split("/");
super.setDob(Integer.parseInt(parts[1]), Integer.parseInt(parts[0]), Integer.parseInt(parts[2]));
this.skillPrice = skillPrice;
this.permitTax = skillPrice * taxRate;
this.airfare = airfare;
this.sector = sector;
this.id = getNextId();
}
public String getSector() {
return sector;
}
public String getContact() {
return "Reg. Expatriate#" + id;
}
public int getNextId() {
id = nextId;
nextId++;
return id;
}
public int getId() {
return id;
}
public double getPay() {
double earnings = earnFromSkill();
return earnings - permitTax - airfare;
}
public double earnFromSkill() {
return skillPrice;
}
public String getWorkPermit() {
return "WP00" + id;
}
}

Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images









