Vote count:
0
So I used the debugger and have found that my program is derefrencing a field in this code segment but I don't see what's wrong and how to fix it.
public String generateWeeklyReport() {
String weeklyReport;
String designString = d.toString2();
String salesString = s.toString2();
String manaString = mana.toString2();
String manuString = manu.toString2();
weeklyReport = "WEEKLY PAY REPORT FOR " + companyName + " COMPANY" + "\n" + "EMPLOYEE WEEKLY PAY" + "\n"
+ designString + "\n" + manaString + "\n" + salesString + "\n" + manuString + "\n" + "\n" +
"Total payroll: $" + calculateTotalWeeklyPay() + "\n" + "Total number of Managers paid: " + numManager + "\n"
+ "Total number of Design employees paid: " + numDesign + "\n" + "Total number of Sales employees paid: " + numSales
+ "\n" + "Total number of Manufacturing employees paid: " + numManufacturing;
return weeklyReport;
}
and it is pointing to these two lines which I don't understand why the other two lines don't get the error aswell.
String manaString = mana.toString2();
String manuString = manu.toString2();
I don't see what the error is here is the mana and manu are of two classes btw.Basically what is the problem and how do I fix it I've been looking for hours. Thank you for your help.
I can post the Manager(mana) and Manufacturing(manu) classes if problem is from those.
asked 1 min ago
Aucun commentaire:
Enregistrer un commentaire