POLYMORPHISM

 

import bank;


class Person{
String name;
int age;

public void printInfo(String name){
System.out.println("Only name method was called");
System.out.println(name);

}
public void printInfo(int age){
System.out.println("Only age method was called");
System.out.println(age);
}
public void printInfo(String name, int age){
System.out.println("Both name and age method was called");
System.out.println(name+""+age);
}
}

public class TestPolymorphism{
public static void main(String args[]){
Person p1 = new Person();
p1.name = "Sud";
p1.age = 24;

p1.printInfo(p1.age);
p1.printInfo(p1.name);
p1.printInfo(p1.name, p1.age);

bank.Account account1 = new bank.Account(); //encapsulation
account1.name = "customer1";
}
}

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...