-
Notifications
You must be signed in to change notification settings - Fork 344
Expand file tree
/
Copy pathAccount1.java
More file actions
29 lines (27 loc) · 826 Bytes
/
Account1.java
File metadata and controls
29 lines (27 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class account{
String Name_Of_Depositer;
String Account_Number;
String Type_Of_Account;
int Balance;
account(){
Name_Of_Depositer="XYZ";
Account_Number= "A1002";
Type_Of_Account="Savings Account";
Balance= 15000;
}
void deposit(int depo_amount){
Balance=Balance+depo_amount;
System.out.println(depo_amount+" Has Been Successfully Deposited in Your Account");
System.out.println("Your Total Balance Is Rs "+Balance);
}
void display(){
System.out.println(Name_Of_Depositer+" your account balance is Rs"+Balance);
}
}
public class Account1 {
public static void main(String args[]){
account obj = new account();
obj.deposit(30000);
obj.display();
}
}