Skip to content

Commit b62917a

Browse files
committed
Added fish weight to weight of penguin
1 parent 59b33d8 commit b62917a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/animals/Penguin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public void swim()
5959
public void eat( Fish fish )
6060
{
6161
System.out.println( "\t" + name + " is eating fish " + fish.name );
62+
weight += fish.weight;
6263
isHungry = false;
6364
}
6465

0 commit comments

Comments
 (0)