import java.io.*; class BankAccount{ String ownerName; int accountNumber; float balance; String getOwnerName(){ return ownerName; } void setOwnerName(String ownerName){ this.ownerName=ownerName; } int getAccountNumber(){ return accountNumber; } void setAccountNumber(int accountNumber){ this.accountNumber=accountNumber; } float getBalance(){ return balance; } void setBalance(float balance){ this.balance=balance; } BankAccount(String ownername,int accountnumber){ this.ownerName=ownername; this.accountNumber=accountnumber; } BankAccount(String ownername,int accountnumber,float balance){ this.ownerName=ownername; this.accountNumber=accountnumber; this.balance=balance; } public void deposit(float parseFloat) { // TODO Auto-generated method stub } } public class BufferedReaderTest { public static void main(String args[]) { try{ BufferedReader in=new BufferedReader(new FileReader("myAccount2.dat")); BankAccount aBankAccount=new BankAccount(null, 0); aBankAccount.setOwnerName(in.readLine()); aBankAccount.setAccountNumber(Integer.parseInt(in.readLine())); in.read(); aBankAccount.deposit(Float.parseFloat(in.readLine())); in.close(); System.out.println(aBankAccount); System.out.println(aBankAccount.ownerName +aBankAccount.accountNumber +aBankAccount.balance); }catch(FileNotFoundException e){ System.out.println("Error:Cannot open file for reading."); }catch(EOFException e){ System.out.println("Error:EOF encountered,file may be corrupted."); }catch(IOException e){ System.out.println("Error:Cannot read from file."); } } }