Skip to content

Instantly share code, notes, and snippets.

Stavros Kefaleas skiabox

Block or report user

Report or block skiabox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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");
}
@skiabox
skiabox / java_apps2_Animal.java
Created Oct 13, 2016
Inheritance_Polymorphism_Project1
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");
}
@skiabox
skiabox / console1.txt
Created Oct 12, 2016
Console1 output
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
You can’t perform that action at this time.