Question: public abstract class Vacation { protected String destination; protected int budget; public Vacation ( String name, int budget ) { this.destination = name; this.budget =

public abstract class Vacation {
protected String destination;
protected int budget;
public Vacation(String name, int budget){
this.destination=name;
this.budget=budget;
}
public String getDestination(){ return destination; }
public int getBudget(){ return budget; }
public void setDestination(String name){ destination=name;
public void setBudget (int budget){this.budget=budget; }
public abstract int overBudget();
//returns by how much vacation is over budget (could be negative)
public String toString(){//returns the details of the current vacation
return "unknown vacation details";
}
}
 public abstract class Vacation { protected String destination; protected int budget;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!