Page 224 - computer science (868) class 11
P. 224
6 int bal;
7 void input() {
8 Scanner sc= new Scanner(System.in);
9 System.out.print("Enter Name of Customer : ");
10 cus_name=sc.nextLine();
11 System.out.print("Enter account number of Customer : ");
12 acno=sc.nextInt();
13 System.out.print("Enter type of account of Customer : ");
14 type_acc=sc.next().charAt(0);
15 do {
16 System.out.print("Enter the balance amount in the account (minimum
amount 1000/-) : ");
17 bal=sc.nextInt();
18 }while(bal<1000);
19 }
20 void deposit(int d) {
21 bal+=d;
22 }
23 void withdraw(int w) {
24 int temp=bal-w;
25 if(temp<1000)
26 System.out.println("Minimum balance should be 1000 rupees");
27 else
28 bal=temp;
29 }
30 void print() {
31 System.out.println("Customer Name:"+cus_name);
32 System.out.println("Account No.:"+acno);
33 System.out.println("Balance:"+bal);
34 System.out.println("Type of Account:"+type_acc);
35 }
36 public static void main(String args[]) {
37 Scanner sc=new Scanner(System.in);
38 Banking_system ob=new Banking_system();
222222 Touchpad Computer Science-XI

