Page 275 - CA_Blue( J )_Class10
P. 275
21 tax=10/100.0*(tax_income-100000);
22 else if(tax_income<=250000)
23 tax=5000+20/100.0*(tax_income-150000);
24 else
25 tax=25000+30/100.0*(tax_income-250000);
26 }
27 void display()
28 {
29 System.out.println("Pan Number"+"\t"+"Name"+"\t"+"Tax-income"+"\t"+"Tax");
30 System.out.println(pan+"\t"+name+"\t"+tax_income+"\t"+ tax);
31 }
32 public static void main()
33 {
34 Employee ob=new Employee();
35 ob.input();
36 ob.calc();
37 ob.display();
38 }
39 }
Design a class called Banking_system with the following descriptions:
Program 4 Data members
cus_name : to store the name of the depositor
acno : to store the account number
type_acc : to store type of the account(s/c)
bal : to store the balance amount in the account
Member functions
void input( ) : to input data to all the data member.(Minimum balance Rs.1000)
void deposit(int d) : the amount d is deposited and the balance is updated.
void withdraw(int w) : the amount a is the amount to be withdrawn and the balance is
updated.
void print( ) : to print all the details.
Write the main method to create the object of the class and call the above method.
1 import java.util.*;
2 class Banking_system
3 {
4 String cus_name;
273
Class as the Basis of all Computation 273

