Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1674868292000</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
11 changes: 11 additions & 0 deletions src/.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1674868291991</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
11 changes: 8 additions & 3 deletions src/AnimalNoises.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import model.Cow;
import model.Pig;
import model.Fox;
import model.Rat;

public class AnimalNoises {

Expand Down Expand Up @@ -86,13 +87,17 @@ public static void main(String[] args) {
Pig Pinky = new Pig();
System.out.println(Pinky.makeNoise());

Rat Shedder= new Rat();
System.out.println(Shredder.speak());





// use non-default constructor Cow(String name, String type, int age, boolean breedStock)
// to create an instance/object of Cow class
Cow betsy = new Cow("Betsy", "dairy", 3, true);
// call speak() method from Cow class to output sound it makes
//call speak() method from Cow class to output sound it makes
System.out.println(betsy.speak());


Expand All @@ -105,7 +110,7 @@ public static void main(String[] args) {
Fox fantasticMr = new Fox();
System.out.println("Fastastic Mr Fox says: " + fantasticMr.makeNoise());

}
//}

//Rosie the Elephant
Elephant rosie = new Elephant();
Expand All @@ -116,4 +121,4 @@ public static void main(String[] args) {

}

}
//}
Binary file added src/model/Bird.class
Binary file not shown.
Binary file added src/model/Cow.class
Binary file not shown.
Binary file added src/model/Elephant.class
Binary file not shown.
Binary file added src/model/Fox.class
Binary file not shown.
Binary file added src/model/Lion.class
Binary file not shown.
Binary file added src/model/Monkey.class
Binary file not shown.
Binary file added src/model/Pig.class
Binary file not shown.
Binary file added src/model/PolarBear.class
Binary file not shown.
Binary file added src/model/Rat.class
Binary file not shown.
39 changes: 39 additions & 0 deletions src/model/Rat.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//Max Chance
//1/27/2023
//Created class rat

package model;

public class Rat {


private String name;
private int age;

public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}

public Rat() {
setName("Master Splinter");
setAge(50);
}

public Rat(String name, int age) {
setName(name);
setAge(age);
}

public String speak(){
return "Squeek Squeek";
}
}
Binary file added src/model/Siamang.class
Binary file not shown.
Binary file added src/model/Squirrel.class
Binary file not shown.
Binary file added src/model/Tiger.class
Binary file not shown.
Binary file added src/model/Wolf.class
Binary file not shown.
Binary file added src/module-info.class
Binary file not shown.