Press ← and → on your keyboard to move between
letters
Dear FutureMe,
public class bucket {
private int capacity;
private double currentamout;
public bucket(int capacity, double currentamout) {
this.capacity = capacity;
this.currentamout = currentamout;
}
public int getCapacity() {
return capacity;
}
public void setCapacity(int capacity) {
this.capacity = capacity;
}
public double getCurrentamout() {
return currentamout;
}
public void setCurrentamout(double currentamout) {
if (currentamout > this.capacity){
this.currentamout = 0;
}
else{
this.currentamout = currentamout;
}
}
@Override
public String toString() {
return "bucket{" +
"capacity=" + capacity +
", currentamout=" + currentamout +
'}';
}
}
Sign in to FutureMe
or use your email address
Create an account
or use your email address
FutureMe uses cookies, read how
Share this FutureMe letter
Copy the link to your clipboard:
Or share directly via social media:
Why is this inappropriate?