Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Progamming. Need ASAP The objectives of this assignment are o Refresh your knowledge and skill in Java 2 Gain experience and skill in file

Java Progamming. Need ASAP
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
The objectives of this assignment are o Refresh your knowledge and skill in Java 2 Gain experience and skill in file 10 Gain experience with a debugger Gain understanding of the need to organized data in memory Refresh your understanding of Javadoe documentation Refresh your practice of good programming techniques. You have been asked to create a program for ABC Home Improvement Co to create statements for their credit card processing system. The program is to process a set of transactions (ie, charges, payments, credits and finance charges against a set of accounts, and produce a statement for cach account. Input to the program will be two files one containing a list of accounts and the other a list of transactions Both are CSV files. Output will be a report to standard out. The format of each file is as follows: Accounta.txt a text file containing a set of records in a csv (no header) format. Each record represents an account The format of a record is Transactions.txt a text file containing a set of records in a csv (no header) format. Each record represents a transaction. The format of a record is: Ruohon Hype Ich IR Your program must pass the file names on the command fine. In the event the files are not passed on the command line, then print to System.erra Usage statement and exit. Using those files, the program will process the transactions then print the statement report. A sample output of the statement report is as follows: A B C Home Improvement Co. Statement for 1/31/2022 Account Name: David Williams Purchases: $ 238.18 Account: 8293100112 Payments: $ 1.000.00 Beginning Balance: $3,422.12 Returns! $ 58.73 Ending Balance: $ 2,639.22 Finance Charge $ 37.65 Date Amount 1/02/2022 $ 53.61 1/04/2022 Type Source Balance Charge #3 Indiana $ 3,475.73 Charge 13 Indiana ABC Home Improvement Co. Statement for 1/31/2022 Account Name: David Williams Purchases: $ 238.18 Account: 8293100112 Payments : $ 1,000.00 Beginning Balance: $ 3, 422.12 Returns: $ 58.73 Ending Balance: $ 2,639.22 Finance Charge: S 37.65 Date Type Source Amount Balance 1/02/2022 Charge #3 Indiana $ 53.61 $ 3,475.73 1/04/2022 Charge #3 Indiana $ 153.23 $ 3,628.96 1/04/2022 Return #3 Indiana $ 53.61 $ 3,575.35 1/04/2022 Payment Check 4301 $ 1,000.00 $ 2,575.35 1/14/2022 Charge #3 Indiana $ 31.34 $ 2,606.69 1/18/2022 Return #3 Indiana $ 5.12 $ 2,601.57 1/31/2022 Interest ABC HI Credit $ 37.65 $ 2,639.22 ABC Home Improvement Co. Statement for 1/31/2022 Account Name: Jill Thompson Purchases: $ 112.50 Account: 8877283919 Payments : $ 0.00 Beginning Balance: S 34.12 Returns: S 0.00 Ending Balance: $ 147.75 Finance Charge: $ 1.13 Date Amount 1/03/2022 $ 112.50 1/31/2022 S 1.13 Type Source Balance Charge #5 Greensburg $ 146.62 Interest ABC HI Credit S 147.75 Additional Specifications: Do not print a statement for account that have zero balance and no activity (no transactions). An interest transaction is to be generated as the last transaction An interest transaction is only generated if the total payments is less than the beginning balance. The interest will be computed as the average of the beginning balance and ending balance times a monthly interest rate. In a main class define a static variable for annual percentage rage (APR). The monthly interest rate used in calculating the interest is one twelfth of the APR. Use a java.time. LocalDate for all date data, In the main class define a static variable of type java, time format. Date Time Formatter and initialize it using the ofPattern method using the specified format. Use this Date TimeFormatter when parsing input date and when printing a date. In the main class define a static method getStatement Date which returns a date of 1/31/2022. Call this method when printing the statement date and on generating an interest transaction. In addition to the fields for a transaction, include a balance field This field is to hold the balance after a transaction has been applied to the account When applying a transaction to the account, increment the account balance for a charge and interest transactions, decrement the account balance for payment and return transactions . Do not do any calculations in the methods to print a statement, all calculations are to be performed prior the printing Use "ABC HI Credit" as the source for the generated interest transaction Requirements Your source code should use proper object-oriented style. That is, the main program should only instantiate the main class and call major methods that perform all of the work Your source code must be documented using Javadoc style according to the course standards. - Follow good programming practices. Naming conventions, separation of io from business objects, indentation, etc. Define all classes in packages or sub-packages of edu.iup.cosc 310.abchi Provide an appropriate set of getter and setter methods (ie, don't provide setters for fields that cannot be changed), Hide the representation of the one-to-many relationships between a the main class and accounts, and between accounts and transactions. Must use the One to Many design pattern given in class. Define io classes according the patter presented in class (OK to use Scanner instead of BufferedReader). That is a helper class where the constructor opens the file has a read/write method to read or write an instance of a business object, and a close method Deliverables: 1 A zip file of your project named fastnamel.zip containing all source files and class files. For example, if your name is John Smith, the file name should be smithl.zip. Upload to Moodle by the due date. 2 Printout of your source files and statement report. 2 1234123400, John Smith,0 3828382810, Mary Jones,387.45 8833992012, Tom Green, 540.45 8430200101, Sue Black, 8293100112, David Williams, 3422.12 8877283919,Jill Thompson, 34.12 10:59 Transactions.txt 1234123400,C,#3 Indiana, 1/01/2022,2.12 3828382810,P, Cash, 1/01/2022,387.45 8833992012,P, Visa **4453,1/02/2022,100.00 8293100112, C, #3 Indiana, 1/02/2022,53.61 1234123400,C,#3 Indiana, 1/03/2022,6.34 8877283919,C,#5 Greensburg, 1/03/2022,112.50 8293100112,C,#3 Indiana, 1/04/2022,153.23 8293100112, R,#3 Indiana, 1/04/2022,53.61 8293100112,P, Check 4301,1/04/2022, 1000.00 1234123400,C,#3 Indiana, 1/10/2022, 43.89 8293100112, C,#3 Indiana, 1/14/2022,31.34 1234123400,C,#3 Indiana, 1/16/2022,9.53 1234123400,C,#3 Indiana, 1/17/2022,32.12 8293100112, R, #3 Indiana, 1/18/2022,5.12 1234123400,C,#3 Indiana, 1/21/2022,98.75 The objectives of this assignment are o Refresh your knowledge and skill in Java 2 Gain experience and skill in file 10 Gain experience with a debugger Gain understanding of the need to organized data in memory Refresh your understanding of Javadoe documentation Refresh your practice of good programming techniques. You have been asked to create a program for ABC Home Improvement Co to create statements for their credit card processing system. The program is to process a set of transactions (ie, charges, payments, credits and finance charges against a set of accounts, and produce a statement for cach account. Input to the program will be two files one containing a list of accounts and the other a list of transactions Both are CSV files. Output will be a report to standard out. The format of each file is as follows: Accounta.txt a text file containing a set of records in a csv (no header) format. Each record represents an account The format of a record is Transactions.txt a text file containing a set of records in a csv (no header) format. Each record represents a transaction. The format of a record is: Ruohon Hype Ich IR Your program must pass the file names on the command fine. In the event the files are not passed on the command line, then print to System.erra Usage statement and exit. Using those files, the program will process the transactions then print the statement report. A sample output of the statement report is as follows: A B C Home Improvement Co. Statement for 1/31/2022 Account Name: David Williams Purchases: $ 238.18 Account: 8293100112 Payments: $ 1.000.00 Beginning Balance: $3,422.12 Returns! $ 58.73 Ending Balance: $ 2,639.22 Finance Charge $ 37.65 Date Amount 1/02/2022 $ 53.61 1/04/2022 Type Source Balance Charge #3 Indiana $ 3,475.73 Charge 13 Indiana ABC Home Improvement Co. Statement for 1/31/2022 Account Name: David Williams Purchases: $ 238.18 Account: 8293100112 Payments : $ 1,000.00 Beginning Balance: $ 3, 422.12 Returns: $ 58.73 Ending Balance: $ 2,639.22 Finance Charge: S 37.65 Date Type Source Amount Balance 1/02/2022 Charge #3 Indiana $ 53.61 $ 3,475.73 1/04/2022 Charge #3 Indiana $ 153.23 $ 3,628.96 1/04/2022 Return #3 Indiana $ 53.61 $ 3,575.35 1/04/2022 Payment Check 4301 $ 1,000.00 $ 2,575.35 1/14/2022 Charge #3 Indiana $ 31.34 $ 2,606.69 1/18/2022 Return #3 Indiana $ 5.12 $ 2,601.57 1/31/2022 Interest ABC HI Credit $ 37.65 $ 2,639.22 ABC Home Improvement Co. Statement for 1/31/2022 Account Name: Jill Thompson Purchases: $ 112.50 Account: 8877283919 Payments : $ 0.00 Beginning Balance: S 34.12 Returns: S 0.00 Ending Balance: $ 147.75 Finance Charge: $ 1.13 Date Amount 1/03/2022 $ 112.50 1/31/2022 S 1.13 Type Source Balance Charge #5 Greensburg $ 146.62 Interest ABC HI Credit S 147.75 Additional Specifications: Do not print a statement for account that have zero balance and no activity (no transactions). An interest transaction is to be generated as the last transaction An interest transaction is only generated if the total payments is less than the beginning balance. The interest will be computed as the average of the beginning balance and ending balance times a monthly interest rate. In a main class define a static variable for annual percentage rage (APR). The monthly interest rate used in calculating the interest is one twelfth of the APR. Use a java.time. LocalDate for all date data, In the main class define a static variable of type java, time format. Date Time Formatter and initialize it using the ofPattern method using the specified format. Use this Date TimeFormatter when parsing input date and when printing a date. In the main class define a static method getStatement Date which returns a date of 1/31/2022. Call this method when printing the statement date and on generating an interest transaction. In addition to the fields for a transaction, include a balance field This field is to hold the balance after a transaction has been applied to the account When applying a transaction to the account, increment the account balance for a charge and interest transactions, decrement the account balance for payment and return transactions . Do not do any calculations in the methods to print a statement, all calculations are to be performed prior the printing Use "ABC HI Credit" as the source for the generated interest transaction Requirements Your source code should use proper object-oriented style. That is, the main program should only instantiate the main class and call major methods that perform all of the work Your source code must be documented using Javadoc style according to the course standards. - Follow good programming practices. Naming conventions, separation of io from business objects, indentation, etc. Define all classes in packages or sub-packages of edu.iup.cosc 310.abchi Provide an appropriate set of getter and setter methods (ie, don't provide setters for fields that cannot be changed), Hide the representation of the one-to-many relationships between a the main class and accounts, and between accounts and transactions. Must use the One to Many design pattern given in class. Define io classes according the patter presented in class (OK to use Scanner instead of BufferedReader). That is a helper class where the constructor opens the file has a read/write method to read or write an instance of a business object, and a close method Deliverables: 1 A zip file of your project named fastnamel.zip containing all source files and class files. For example, if your name is John Smith, the file name should be smithl.zip. Upload to Moodle by the due date. 2 Printout of your source files and statement report. 2 1234123400, John Smith,0 3828382810, Mary Jones,387.45 8833992012, Tom Green, 540.45 8430200101, Sue Black, 8293100112, David Williams, 3422.12 8877283919,Jill Thompson, 34.12 10:59 Transactions.txt 1234123400,C,#3 Indiana, 1/01/2022,2.12 3828382810,P, Cash, 1/01/2022,387.45 8833992012,P, Visa **4453,1/02/2022,100.00 8293100112, C, #3 Indiana, 1/02/2022,53.61 1234123400,C,#3 Indiana, 1/03/2022,6.34 8877283919,C,#5 Greensburg, 1/03/2022,112.50 8293100112,C,#3 Indiana, 1/04/2022,153.23 8293100112, R,#3 Indiana, 1/04/2022,53.61 8293100112,P, Check 4301,1/04/2022, 1000.00 1234123400,C,#3 Indiana, 1/10/2022, 43.89 8293100112, C,#3 Indiana, 1/14/2022,31.34 1234123400,C,#3 Indiana, 1/16/2022,9.53 1234123400,C,#3 Indiana, 1/17/2022,32.12 8293100112, R, #3 Indiana, 1/18/2022,5.12 1234123400,C,#3 Indiana, 1/21/2022,98.75

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions