Account.java
Never
package com; import java.util.Scanner; public class Account { private String accno; private String name; private String balance; private double bal; Scanner sc = new Scanner(System.in); void openAccount() { for (int i = 1; i > 0; i++) { System.out.print("Enter Account No: "); accno = sc.next(); int l = accno.length(); if (l == 10 && isNumeric(accno)) { System.out.print("Enter Name: "); name = sc.next(); System.out.print("Enter Balance: "); for(int j=1;j>0;j++) { balance = sc.next(); if(Account.isDigit(balance)) { bal = Long.parseLong(balance); break; } else continue; } break; } else { System.out.println("Enter Valid account number"); continue; } } } public static boolean isDigit(String n) { try { double i = Double.parseDouble(n); } catch(NumberFormatException e) { System.out.println("Enter a valid input: "); return false; } return true; } public static boolean isNumeric(String strNum) { try { double d = Double.parseDouble(strNum); } catch (NumberFormatException | NullPointerException nfe) { return false; } return true; } void showAccount() { System.out.println("Account no:" + accno + "\n" + "Customer Name:" + name + "\n" + "Account Balance:" + bal); } void deposit() { double amount=0; String amt; System.out.println("Enter Amount U Want to Deposit : "); for(int j=1;j>0;j++) { amt = sc.next(); if(isDigit(amt)) { amount = Double.parseDouble(amt); break; } else continue; } bal = bal + amount; System.out.println("Total Balance: "+bal); showAccount(); } void withdrawal() { double amount=0; String amt; System.out.println("Enter Amount U Want to withdraw : "); for(int j=1;j>0;j++) { amt = sc.next(); if(isDigit(amt)) { amount = Double.parseDouble(amt); break; } else continue; } if (bal >= amount) { bal = bal - amount; showAccount(); } else { System.out.println("Less Balance..Transaction Failed.."); } } boolean search(String acn) { if (accno.equals(acn)) { showAccount(); return (true); } return (false); } }
Raw Text
-
Watch latest hd onle T
15 sec ago
-
Pickup of a medical college student! Fucked in the toilet!
6 min ago
-
etukteuketk
33 min ago
-
I lost my pussy at cards so that he would rip my tights and insert his dick
36 min ago
-
sdfgndasdfbn adsdfg
57 min ago
-
Untitled
59 min ago
-
UNDER AGE 11YR T
1 hour ago
-
REAL PEDQFILI4 T
1 hour ago
-
d2play best stream T
1 hour ago
-
Look like now and T
1 hour ago