DOT NET Application Title: Bank Reconciliation Purpose: Student Services wants a
ID: 664270 • Letter: D
Question
DOT NET
Application Title: Bank Reconciliation
Purpose: Student Services wants a Windows application that students can use to balance their
Check books using computers in the library.
Program Procedures:
From a window on the screen, the user is directed to enter his beginning balance and his for the month. Three types of transactions are accepted: Checks, ATM withdrawals and Deposits. Each transaction type is displayed in its own listbox. After all items have been entered, the program displays the ending balance.
Algorithms, Processing, and Conditions:
1. User enters banking information.
2. User selects transaction type from a combo box and clicks Enter Transaction button.
3. Program presents InputBox item entry window for selected item type.
4. User enters item data in InputBox window and clicks OK button on InputBox item entry window to submit item information.
5. Program validates item entry and displays it in the appropriate listbox.
6. Program displays clear error messages for each validation error.
7. Item type entry continues until user clicks Cancel on InputBox after which user may select new item type and restart Item entry by clicking Enter Transaction button.
8. Item entry continues until user clicks Compute Balance button.
9. Program displays totals and count of each transaction type and ending account balance.
10. A File menu contains a Clear Checks List, a Clear ATM List, a Clear Deposits List, a Clear All, and an Exit options. Clear options clear the designated items. The Exit option closes the application.
Notes and Restrictions:
1. The user should not be able to enter transactions until a transaction type has been selected.
2. User should not be able to change any bank info after a transaction type has been selected.
3. The user should not be able to enter transactions after the end transaction entry button (Compute Balance) has been clicked.
4. The user may exit the application without entering any transactions.
5. User should not be able to enter blank transactions.
6. User should not be able end transaction entry until at least one transaction of any type has been entered.
7. Listboxes automatically scroll for additional entries that exceed a 10 item display capacity of each listbox.
8. Validate numeric input with Try-Catch blocks.
Valid -1000 > BeginBalance < 10000
Valid 0 > Check < 5000
Valid 0 > ATM < 500
Valid 0 > Deposit < 3000
Use at least three SUB procedures and at least Three FUNCTION procedures. Pass values to at least four procedures using ByRef parameters.
Comments:
1. A splash screen is shown for 3 seconds before the main window opens.
Explanation / Answer
import java.io.*; class BankWork { final int max_limit=20; final int min_limit=1; final double min_bal=500; private String name[]=new String[20]; privateint accNo[]=newint[20]; private String accType[]=new String[20]; privatedouble balAmt[]=newdouble[20]; staticint totRec=0; //constructor BankWork() { for(int i=0;imax_limit) { System.out.println(" Sorry we cannot admit you in our bank... "); permit=false; } if(permit = true) //Allows to create new entry { totRec++; // Incrementing Total Record System.out.println(" =====RECORDING NEW ENTRY====="); try{ accNo[totRec]=totRec; //Created AutoNumber to accNo so no invalid id occurs System.out.println("Account Number : "+accNo[totRec]); BufferedReader obj = new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter Name : "); System.out.flush(); name[totRec]=obj.readLine(); System.out.print("Enter Account Type : "); System.out.flush(); accType[totRec]=obj.readLine(); do{ System.out.print("Enter Initial Amount to be deposited : "); System.out.flush(); str=obj.readLine(); balAmt[totRec]=Double.parseDouble(str); }while(balAmt[totRec]= min_bal) { balAmt[acno]=checkamt; //Displaying Depsit Details System.out.println(" After Updation..."); System.out.println("Account Number : "+acno); System.out.println("Balance Amount : "+balAmt[acno]+" "); } else { System.out.println(" As per Bank Rule you should maintain minimum balance of Rs 500 "); } } } catch(Exception e) {} } }; class Bank { publicstaticvoid main(String args[]) { String str; int choice; choice=0; BankWork BW_obj = new BankWork(); do { System.out.println("Choose Your Choices ..."); System.out.println("1) New Record Entry "); System.out.println("2) Display Record Details "); System.out.println("3) Deposit..."); System.out.println("4) Withdraw..."); System.out.println("5) Exit"); System.out.print("Enter your choice : "); System.out.flush(); try{ BufferedReader obj = new BufferedReader(new InputStreamReader(System.in)); str=obj.readLine(); choice=Integer.parseInt(str); switch(choice) { case 1 : //New Record Entry BW_obj.newEntry(); break; case 2 : //Displaying Record Details BW_obj.display(); break; case 3 : //Deposit... BW_obj.deposit(); break; case 4 : //Withdraw... BW_obj.withdraw(); break; case 5 : System.out.println(" .....THANKS FOR VISITING....."); break; default : System.out.println(" Invalid Choice "); } } catch(Exception e) {} }while(choice!=5); } }Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.