Abstraction

 

abstract class Animal {
Animal() {
System.out.println("You are creating an animal");
}

public abstract void walk() {}

public void eat() {
System.out.println("animals eat");
}
}

class Horse extends Animal {

Horse() {
System.out.println("You have created a Horse");
}

public void walk() {
System.out.println("Walks on 4 legs");
}
}

class Chicken extends Animal {

public void walk() {
System.out.println("walk on 2 legs");
}
}

public class TestAbstraction {

public static void main(String args[]) {
Horse h1 = new Horse();
h1.walk();
h1.eat();
// Animal animal = new Animal();
// animal.walk();
}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...