Printing Bank Account transactions using Class and Object

 

class Bank {
    int accountNo;
String name;
float amount;

void assign(int a, String b, float c) {
accountNo = a;
name = b;
amount = c;
}

void deposit(float amt) {
amount += amt;
System.out.println("rupees deposited :" + amt);
}

void withdraw(float amt) {
if (amount < amt) {
System.out.println("INSUFFICIENT FUND!");
} else {
amount -= amt;
System.out.println("rupees withdrawn : " + amt);
}
}

void checkBalance() {
System.out.println("Available balance is : " + amount);
}

void showDetails() {
System.out.println("Name of Account Holder : " + name);
System.out.println("Account Number : " + accountNo);
System.out.println("Available balance : " + amount);
}
}

public class TestBank {
public static void main(String args[]) {
Bank b1 = new Bank();
Bank b2 = new Bank();

b1.assign(123456, "Suresh", 5000);
b1.showDetails();
b1.deposit(15000);
b1.checkBalance();
b1.withdraw(8000);
b1.checkBalance();

b2.assign(123654, "Naresh", 15732);
b2.showDetails();
b2.deposit(11276);
b2.checkBalance();
b2.withdraw(6591);
b2.checkBalance();
}
}

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