Commit 58dd563b authored by jinny.wilkin's avatar jinny.wilkin

final2

parent 9a7c7e11
...@@ -22,7 +22,7 @@ public class Baboon extends Mammal{ ...@@ -22,7 +22,7 @@ public class Baboon extends Mammal{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Height: %f\nLocomotion: %s\n", this.height, this.locomotion); System.out.printf("Height: %f\nLocomotion: %s\n", this.height, this.locomotion);
System.out.printf("Hierarchy: %d", this.hierarchy); System.out.printf("Hierarchy: %d\nSpecies: %s", this.hierarchy, this.getClass().getSimpleName());
} }
} }
...@@ -12,7 +12,7 @@ public class Catfish extends Fish{ ...@@ -12,7 +12,7 @@ public class Catfish extends Fish{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Length: %d\nColourings: %s\n", this.length, this.Colourings); System.out.printf("Length: %d\nColourings: %s\n", this.length, this.Colourings);
System.out.printf("Barbel Length: %f", this.whiskerLength); System.out.printf("Barbel Length: %f\nSpecies: %s", this.whiskerLength, this.getClass().getSimpleName());
} }
} }
...@@ -17,7 +17,7 @@ public class Chameleon extends Reptile{ ...@@ -17,7 +17,7 @@ public class Chameleon extends Reptile{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Length: %f\nAmphibious: %s\n", this.length, this.amphibious); System.out.printf("Length: %f\nAmphibious: %s\n", this.length, this.amphibious);
System.out.printf("Current Colour: %s", this.currentColour); System.out.printf("Current Colour: %s\nSpecies: %s", this.currentColour, this.getClass().getSimpleName());
} }
} }
...@@ -17,7 +17,7 @@ public class Crocodile extends Reptile{ ...@@ -17,7 +17,7 @@ public class Crocodile extends Reptile{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Length: %f\nAmphibious: %s\n", this.length, this.amphibious); System.out.printf("Length: %f\nAmphibious: %s\n", this.length, this.amphibious);
System.out.printf("Number of Teeth: %s", this.numberOfTeeth); System.out.printf("Number of Teeth: %s\nSpecies: %s", this.numberOfTeeth, this.getClass().getSimpleName());
} }
} }
...@@ -18,7 +18,7 @@ public class Duck extends Bird{ ...@@ -18,7 +18,7 @@ public class Duck extends Bird{
public void getDetails(){ public void getDetails(){
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Wing Span: %f\nPlumage Colour: %s\n", this.wingSpan, this.featherColour); System.out.printf("Wing Span: %f\nPlumage Colour: %s\nSpecies: %s", this.wingSpan, this.featherColour, this.getClass().getSimpleName());
System.out.printf("Loves: Bread"); System.out.printf("Loves: Bread");
} }
......
...@@ -21,6 +21,6 @@ public class Emu extends Bird{ ...@@ -21,6 +21,6 @@ public class Emu extends Bird{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Wing Span: %f\nPlumage Colour: %s\n", this.wingSpan, this.featherColour); System.out.printf("Wing Span: %f\nPlumage Colour: %s\n", this.wingSpan, this.featherColour);
System.out.printf("Running Speed: %d", this.runningSpeed); System.out.printf("Running Speed: %d\nSpecies: %s", this.runningSpeed, this.getClass().getSimpleName());
} }
} }
...@@ -17,6 +17,6 @@ public class Lion extends Mammal{ ...@@ -17,6 +17,6 @@ public class Lion extends Mammal{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Height: %f\nLocomotion: %s\n", this.height, this.locomotion); System.out.printf("Height: %f\nLocomotion: %s\n", this.height, this.locomotion);
System.out.printf("Time Spent Sleeping: %d", this.timeSpentAsleep); System.out.printf("Time Spent Sleeping: %d\nSpecies: %s", this.timeSpentAsleep, this.getClass().getSimpleName());
} }
} }
...@@ -21,7 +21,7 @@ public class Parrot extends Bird{ ...@@ -21,7 +21,7 @@ public class Parrot extends Bird{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Wing Span: %f\nPlumage Colour: %s\n", this.wingSpan, this.featherColour); System.out.printf("Wing Span: %f\nPlumage Colour: %s\n", this.wingSpan, this.featherColour);
System.out.printf("Volume: %sdb", this.volumeDecibels); System.out.printf("Volume: %sdb\nSpecies: %s", this.volumeDecibels, this.getClass().getSimpleName());
} }
} }
...@@ -17,6 +17,6 @@ public class PufferFish extends Fish{ ...@@ -17,6 +17,6 @@ public class PufferFish extends Fish{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Length: %d\nColourings: %s\n", this.length, this.Colourings); System.out.printf("Length: %d\nColourings: %s\n", this.length, this.Colourings);
System.out.printf("Expanded Radius: %s", this.radiusExpanded); System.out.printf("Expanded Radius: %s\nSpecies: %s", this.radiusExpanded, this.getClass().getSimpleName());
} }
} }
...@@ -24,6 +24,6 @@ public class RedPanda extends Mammal{ ...@@ -24,6 +24,6 @@ public class RedPanda extends Mammal{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Height: %f\nLocomotion: %s\n", this.height, this.locomotion); System.out.printf("Height: %f\nLocomotion: %s\n", this.height, this.locomotion);
System.out.printf("Social Distance: %f", this.homeRange); System.out.printf("Social Distance: %f\nSpecies: %s", this.homeRange, this.getClass().getSimpleName());
} }
} }
...@@ -12,6 +12,6 @@ public class Shark extends Fish{ ...@@ -12,6 +12,6 @@ public class Shark extends Fish{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Length: %d\nColourings: %s\n", this.length, this.Colourings); System.out.printf("Length: %d\nColourings: %s\n", this.length, this.Colourings);
System.out.printf("Number of Teeth: %d", this.teeth); System.out.printf("Number of Teeth: %d\nSpecies: %s", this.teeth, this.getClass().getSimpleName());
} }
} }
...@@ -17,6 +17,6 @@ public class Turtle extends Reptile{ ...@@ -17,6 +17,6 @@ public class Turtle extends Reptile{
System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n", System.out.printf("Name: %s\nHabitat: %s\n Diet: %s\n Age: %d\n Integument: %s\n Gender: %s\n Number of Legs: %d\n Max Speed: %d\n",
this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed); this.name, this.habitat, this.food, this.age, this.integument, this.gender, this.numOfLegs, this.speed);
System.out.printf("Length: %f\nAmphibious: %s\n", this.length, this.amphibious); System.out.printf("Length: %f\nAmphibious: %s\n", this.length, this.amphibious);
System.out.printf("Shell Pattern: %s", this.shellPattern); System.out.printf("Shell Pattern: %s\nSpecies: %s", this.shellPattern, this.getClass().getSimpleName());
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment