Objectives:

To demonstrate the student's ability to develop:

  • Arrays (This assignment is to test your ability to use arrays, NOT some other type of aggregate so do NOT use arrayList, AbstractSequentialList, Vector, etc.)
  • Decimal format control via the DecimalFormat class

Problem Description:

The Metro Auraria Student Credit Union (MASCU) Monthly Report program was such a success that the owners wish to engage you to make the following modifications to the requirements of Project 1 and to the Java program implementing the solution that you created for Project #3.

1.The per transaction detail output fields; Transaction Number, Transaction Type, Transaction Amount, Running Balance & Overdraft Amount for every output record must be displayed to the screen all at once in a table with neatly aligned columns and appropriate column headings (see below).

2.The summary output must follow after the last transaction detail output and include headings/titles and values for theCustomer Account Number, Beginning Balance, End of Month Date, Per Transaction Overdraft Penalty, Ending Balance, Total Credits, Total Debits, Total Overdraft Amount, Average Credit Amount, Highest Debit Amount PLUS ALL Transaction Numbers having a debit amount matching the Highest Debit Amount must be reported, not just the first such.

The systems analyst for this project has imposed some technical requirements on the implementation. Thus the Java program from Project #3 must be modified as follows:

1.The Java program must have appropriate internal documentation/comments at the beginning of the source code listing:

  • an appropriate title
  • your name as the author

2.The Java program must have, as the first output(s) to the screen:

  • an appropriate title
  • your name as the author

3.Declare five (5) one-dimensional arrays that are named transNum, transType, transAmt, overPenalty & runBal to store values for the transaction detail fields for each record.

  • transNum should be an int or String array
  • transType should be a char or String array
  • transAmt should be a float or double array
  • overPenalty should be a float or double array
  • runBal should be a float or double array

4.You may create additional arrays if you find it useful in solving the problem.

5.The values for any/all of the original Input fields, as defined by the test data, can either be initialized within the Java source code and/or be input from the keyboard to store the Project #1 Test Data. Meaning if all the test data is initialized within the Java source code there is no input to enter.

6.The values for the overPenalty and runBal arrays must be calculated by the program during the execution of the program.

7.You must use at least one for loop to process the arrays.

8.If there is input from the keyboard then no report output should display until "after all input is complete".

9.The per transaction detail portion of the report should display the data stored in:

  • transNum
  • transType
  • transAmt
  • runBal
  • overPenalty

to the screen in a table format with neatly aligned columns and appropriate column headings as seen in the example below. Each array should represent a column in the output.

Note: Use of the tab and/or space characters within the output string helps to make columns.

10.The summary portion of the report should display the data values along with appropriate titles/headings laid out neatly in a horizontal or vertical order.

11.All decimal output must have two decimal places with commas and trailing zeroes displaying when needed.

  • All monetary values must display with a leading dollar sign ($).
  • All monetary values must display with 2 decimal places with commas (when needed) and trailing zeroes.
  • This includes all floating point variables whether or not the variables are stored in an array.
  • Have a minimum of five methods in the second (non-driver) class. The appMain methods does count towards the minimum.

Here is an example of what the program execution could resemble.

******************************************
Solution for Proj #5
MASCU Monthly Customer Statement Report
by Owen Herman
******************************************

Trans #: Trans Type Trans Amt: Running Bal OD Penalty Amt
11 C $123.45 $523.70
22 D $40.00 $483.70
33 D $777.77 -$309.07 $15.00
44 C $800.50 $491.43
55 D $200.00 $291.48
66 D $777.77 -$501.34 $15.00
77 D $40.00 -$556.34 $15.00
88 C $850.00 $293.66


**********************************************************
********* MASCU Monthly Transaction Report Summary *********
Customer Account Number: 9875
Customer Beginning of Month Balance: $400.25
Monthly Transaction Report Ending on: 9/30/2017
Overdraft Penalty Amount: $15.00
**********************************************************
**********************************************************
Customer End Balance: $293.66
Total Credits $ Amount: $1,773.95
Total Debits $ Amount: $1,835.54
Total Overdraft Amount: $45.00
Average Credit Amount: $591.32

Max Debit $ Amount: $777.77
Max Debit Trans Numbers Are:
33 66
**********************************************************
**********************************************************
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.