Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Take a description of a situation with a software solution,refine the descriptio

ID: 3616243 • Letter: T

Question

Take a description of a situation with a software solution,refine the description to a detailed specification (pseudocode/program logic), and write aprogram that performs in the specified way.

Problemdescription:

           Design operations of a check book, and acheckregister. A check book is used to write checks (assumingthat there are enough funds in the checking account). A checkregister keeps track of issued checks, records deposits, andcalculates remaining balance.

           Checks have the following information:

1-      Check number.

2-      Date of check.

3-      The person to whom the check isissued.

4-      Amount of check.

After a check is issued, an entry inthe check register records the information about the writtencheck.

-          A deposit,initiates an entry in the check register as follows:

1 – Date of Deposit.

2 – The fund’s source(where the money comes from).

3 – Amount of deposit.

                       The check register automatically computes theremaining balance (whether the transaction is writing a check or afund deposit).

           It is possible to ask for the account balance without issuing acheck or making a deposit.

           A user menu should prompt the user to:

                       1 – Write a check.

                       2 – Make a deposit.

                       3 – Obtain balance.

   Selecting fromthe menu options, should prompt the user to enter thenecessary data.

           The menu, and theoperations on the menu MUST be written asfunctions.  

The user could make indefinitenumber of transactions. Each transaction should re-prompt the menu.Entering “q” should quit the program with anappropriate end of program message.

           Error checking:

You have to ensurethat there are enough funds in the account when issuing a check.Otherwise, you need to display “non-sufficient fund”message and cancel the transaction.

The program should have thepseudocode as a commenting block in the Program.

Pseudocode MUST contain thebulletized items below:

·        List of variables tohold the necessary values.

·        Operations of how thefunctions will carry out their computations.

Place the pseudocode aspart of your program in a header commentblock.

(The implementation MUST beconsistent with your pseudocode.)

Explanation / Answer

class checkbook { private long chnumber; private String chdate; private String name; private long bal; private String dpdate;
public checkbook() { chnumber=0; chdate="01/01/2000"; name="Null"; bal=0; }
public void fillcheck(long cn, Stringcd, String p,long bal) { baldraw(bal); this.chnumber=cn; this.chdate=cd; this.name=p; }
public void baldraw(longam) { if(am<this.bal) this.bal=this.bal-am; else System.out.println("Sufficient Balanceis not available in the account"); }
public void depbal(String dt,longam) { this.dpdate=dt; this.bal=this.bal+am; }
public long showbal() { return this.bal; } } first compile this code and then thecode given below....
importjavax.swing.*; importjava.util.*;
classcheckregister{
public static voidmain(String args[]) { checkbook pr=newcheckbook();
intflag=0; do{ Stringinput=JOptionPane.showInputDialog("Enter 1 for writing acheck"+" Enter 2 make a deposit"+" Enter 3 to obtainbalance"+" Enter 4 for exit"); intopt=Integer.parseInt(input);
switch(opt) { case1: { Stringip=JOptionPane.showInputDialog("Enter CheckNumber"); longchn=Long.parseLong(ip); Stringdt=JOptionPane.showInputDialog("Enter Date"); Stringnm=JOptionPane.showInputDialog("Enter PayeeName"); Stringb=JOptionPane.showInputDialog("Enter CheckAmount"); longchb=Long.parseLong(b); pr.fillcheck(chn,dt,nm,chb); break; } case2: { Stringab=JOptionPane.showInputDialog("Enter amount todeposit"); longas=Long.parseLong(ab); Stringd=JOptionPane.showInputDialog("Enter Date"); pr.depbal(d,as); break; }
case3: { longam=pr.showbal(); JOptionPane.showMessageDialog(null,"AccountBalance:$"+am); break; } case4: { flag=1; System.exit(0); } }//end of switch }while(flag==0); } } Any problem then send private Message tome....
importjavax.swing.*; importjava.util.*;
classcheckregister{
public static voidmain(String args[]) { checkbook pr=newcheckbook();
intflag=0; do{ Stringinput=JOptionPane.showInputDialog("Enter 1 for writing acheck"+" Enter 2 make a deposit"+" Enter 3 to obtainbalance"+" Enter 4 for exit"); intopt=Integer.parseInt(input);
switch(opt) { case1: { Stringip=JOptionPane.showInputDialog("Enter CheckNumber"); longchn=Long.parseLong(ip); Stringdt=JOptionPane.showInputDialog("Enter Date"); Stringnm=JOptionPane.showInputDialog("Enter PayeeName"); Stringb=JOptionPane.showInputDialog("Enter CheckAmount"); longchb=Long.parseLong(b); pr.fillcheck(chn,dt,nm,chb); break; } case2: { Stringab=JOptionPane.showInputDialog("Enter amount todeposit"); longas=Long.parseLong(ab); Stringd=JOptionPane.showInputDialog("Enter Date"); pr.depbal(d,as); break; }
case3: { longam=pr.showbal(); JOptionPane.showMessageDialog(null,"AccountBalance:$"+am); break; } case4: { flag=1; System.exit(0); } }//end of switch }while(flag==0); } } Any problem then send private Message tome....

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote