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
-
Just chill and fuck at home
10 min ago
-
Performer 8 Male Enhancement
14 min ago
-
¡¡Anderson cada día es más puta!! Sexo anal al aire libre
36 min ago
-
No Deposit Bonus
56 min ago
-
https://www.facebook.com/SuperiorCBDGummiesInCa/
57 min ago
-
Adult Telegram Channels
59 min ago
-
FGS TYFDGF
1 hour ago
-
"Makers CBD Gummies: A Maker's Path to Tranquility"
1 hour ago
-
FilthyMassage - Busty Blonde Milf Gets Her Huge Tits Oiled And Gets Fucked
1 hour ago
-
Untitled
1 hour ago