I am not sure Why but when I run my program with eclipse and I am trying to verify my methods and variables all work my program misses all tasks please can someone explain or point me in the direction for my solution
package java.Shmoney.Model;
/**
* Able to calcualte someones Budget
* @author dujuanny
*
*/
public class Budget extends Person{
private double totalIncome;
private double expense;
private Map<String, List<Double>> totalBudget;
public Budget() {
}
public double getTotalIncome() {
return totalIncome;
}
public void addTotalIncome(double totalIncome) {
this.totalIncome += totalIncome;
}
public void setTotalIncome(double totalIncome) {
this.totalIncome = totalIncome;
}
public double getCost() {
return expense;
}
public void addToBudget(String description, List<Double> expense) {
totalBudget.put(description, expense);
}
public Map<String, List<Double>> getTotalBudget() {
return totalBudget;
}
public void setTotalBudget(Map<String, List<Double>> totalBudget) {
this.totalBudget = totalBudget;
}
@Override
public String toString() {
return super.toString() + "Budget [totalIncome=" + totalIncome + ", expense=" + expense + ", totalBudget=" + totalBudget + "]";
}
public static void main(String[] args) {
Budget jay = new Budget();
jay.setTotalIncome(10000);
System.out.println(jay.toString());
}
}
Second Class
public abstract class Person {
private String firstName;
private String lastName;
private String email;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
public String toString() {
return " Person [ FirstName = " + firstName + ", LastName = " + lastName + ", Email =" + email + " ]";
}
}
java.util.List
andjava.util.Map
- Hovercraft Full Of Eels