View Tiger.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 10/10/2016.
*/
public class Tiger extends Feline{
@Override
public void makeNoise() {
System.out.println("The tiger is growling");
View Lion.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 09/10/2016.
*/
public class Lion extends Feline{
//Lion methods
@Override
public void makeNoise() {
View Dog.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 10/10/2016.
*/
public class Dog extends Canine{
@Override
public void makeNoise() {
System.out.println("The dog barks");
View Cat.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 10/10/2016.
*/
public class Cat extends Feline{
@Override
public void makeNoise() {
System.out.println("The cat meows");
}
View java_apps2_Animal.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 09/10/2016.
*/
public abstract class Animal {
private String picture;
private Food food;
private int hunger;
View Vet.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 10/10/2016.
*/
public class Vet {
public void giveShot(Animal a)
{
System.out.println("The vet is giving a shot to " + a.getClass().getSimpleName());
View Wolf.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 10/10/2016.
*/
public class Wolf extends Canine{
@Override
public void makeNoise() {
System.out.println("The wolf howls");
}
View console1.txt
/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/bin/java -Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMa
View Hippo.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 10/10/2016.
*/
public class Hippo extends Animal{
@Override
public void makeNoise() {
System.out.println("The hippo snarls");
View App2.java
package com.skiabox.java_apps2;
/**
* Created by administrator on 10/10/2016.
*/
public class App2 {
public static void main(String[] args) {
//Separator