Us006, Us007, Us008, Us009, Us010 Java
Us006, Us007, Us008, Us009, Us010 Java
Code:-
import java.util.*;
switch (option) {
case 1:
createAcc();
break;
case 2:
depositAmount(bal);
break;
case 3:
withdrawAmount();
break;
case 4:
balanceCheck();
break;
default:
System.out.println("Invalid option");
}
}
public static void createAcc()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter SSN ID:");
System.out.println("Enter name:");
System.out.println("Enter email:");
System.out.println("Enter address:");
System.out.println("Enter Contact Number:");
System.out.println("Enter Aadhar Number:");
System.out.println("Enter Pan Number:");
double ssn = sc.nextDouble();sc.nextLine();
String name = sc.nextLine();
String email = sc.nextLine();
String add = sc.nextLine();
String num = sc.nextLine();
String aadharNum = sc.nextLine();
String panNum = sc.next();
System.out.println("Hurray! We've successfully created account");
}
public static void depositAmount(double bal)
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter amount to deposit");
double amount = sc.nextDouble(); sc.nextLine();
bal += amount;
System.out.println("Amount successfully deposited: "+bal);
Create Account:-
Deposit Amount:-
Withdraw Amount:-
Balance Checking:-