So I already have coded mostly everything but I need help with one part which is all the way at the bottom of the code. So I made an object with a saving of 2531.5 so i can print that out as the initial saving of Mr. Gob's but then you have to add 25,000 to Mr. Gob's savings and print it out again and it prints out the same thing as the first one which is 2531.5. The output needs to come out like this https://gyazo.com/631227169fa677fa389fd029db146ed4 . I just confused on how Im suppose to do task #6 and don't know what I'm doing wrong.
public class Gob
{
//The following are IF/IV
public String position;
public int age;
//task #1 create an Instance Field "saving" as type double
public double saving;
//your work here
public Gob(double d){
//task #2 initialize the saving to user input
saving = d;
//your work here
position = "Teacher";
age = 55;
}
//task #2 create a method printPosition() to print out position
//in the following format
// "My position is a _______"
public void printPosition(){
System.out.println("My position is a " + position);
}
//task #3 create a method to print out saving
//you need to create a whole new method
public void printSaving(){
System.out.println("My saving is "+ saving);
}
//task #4 complete the method below
//add the input amount to the saving you have
public void addSaving(double e){
e = saving;
}
public static void main(String args[]){
//Create an new object with saving = 2531.50
Gob h = new Gob(2531.50);
h.printPosition(); //this is the name of the method
//Task #5 print out the initial saving of Mr. Gob
//your work here
h.printSaving();
//Task #6 add 25,000 to Mr. Gob saving and then
//print the saving again
//your work here
h.printSaving();
}
}