Highlights
Scenario
You have been contracted as a software developer for a local community bank, to develop an application that imports a comma-delimited (.csv) file for bank transactions, and generates the balance of each account.
The application has the following specifications and requirements:
- The comma-delimited file contains data for two types of accounts:
o Savings Accounts
o Loan Accounts
- The method for calculating the balance is different for each type of account
- Once the balance amounts have been calculated the account number, account type, total credit, total debit, and the current balance must be written to:
o a comma-delimited file (.csv) prepended with a timestamp
Example: 20190518151700-export.csv
o the console window
- The IT section of the community bank prides itself of providing high-quality software to customers and requires that unit tests be created for testing:
o Importing the data from the comma-delimited values file and loading the data into a list of objects
o The correctness of the values for the account type and account balance for each type of account
Calculating Balance
When calculating balance, there are two important pieces of information to understand. Specifically:
Task 1: Development
Part A
For Part A you are required to:
1. Create a new PyCharm project using the naming convention
- Project Name: MyBankProject
2. Add a folder named “Import” to the root directory of the project and copy the
provided file “transactions.csv” into it.
3. Add the BankAccount, SavingsAccount and LoanAccount classes to a module called BankAccount. Remember that each account calculates balance differently. Further to this, the get_details method must return the account number, balance, and type in a single str. The loan account must also append to this str in the interest rate, in its implementation of the get_details method.
4. Add a module to the project named “CsvImporter”, containing the
“import_transactions” function.
Implement the logic for the import_transactions function so it opens the specified file by name, iterates through each line (row) in the file and determines when all of the rows for an account have been read and then instantiates a new account by using the create_account function. The account type column in the csv determines the type of account.
5. After the import function has been completed, invoke the function from the Program module, insert a breakpoint and inspect the state of the local variables.
6. Double-check and confirm the results with your assessor.
Part B
1. Add a new module to the project named BankAccountWriter along with a function named write. The write function is responsible for accepting a list of BankAccount objects and writing the account number, account type, total credit, total debit, and current balance to a comma delimited values (.csv) file using the naming convention “{timestamp}-records.csv”. The write function has an optional Boolean parameter named writeToConsole which has the default value false. If a true argument is passed in, the write function is required to also write the values to console.
2. After completing the write function update the logic in the Main module (Program) to invoke the function, passing in the list of bank account objects to ensure it works as expected.
Part C
After the development process has been completed you are required to review all classes, methods and functions, along with adding both docstrings and inline comments to ensure the project is cohesive and complies with organisational requirements.
When all classes, methods, and functions have docstrings and comments, you must show your work to your assessor to ensure it is correct.
Task 2: Testing
The final task requires unit tests to be developed for ensuring the functionality of your program works correctly.
Part A
Before creating test modules, you are required to create test data to calculate the correct calculated expected values for each bank account. It should show the following:
• The test data you will import into the program, specifically:
o Account number
o Account type
o Transaction type
o Amount
• The test data you expect to have output by the program, specifically:
o Account number
o Account type
o Total credits
o Total debits
o Current balance
All of this should be contained in a .csv or Excel file, named test-data.csv or test-data.xls. Ensure you include this file with your submission. Below is an example.
Part B
1. Add a folder named “test” to the project
2. Add a folder named “import” to the “test” folder, and copy in the provided transactions.csv file
3. Add a folder named “export” to the “test” folder.
4. Add a test module for the CsvImporter, BankAccount, and BankAccountWriter modules. Prepend the name with “test”. E.g. Test_BankAccount or Test_BankAccountWriter
5. Each module must contain a unit test class, derived from the unittest.TestCase class, for each class in the respective module. E.g. If the module was Test_BankAccount, you would have a test case class for BankAccount, SavingsAccount, LoanAccount
6. If the module contains only stand-alone functions, create a test case class for the module as a whole
7. Add test methods to test:
a. The import function returns a list of BankAccount objects. Specifically, it should contain the correct number of BankAccount objects in the list. E.g. if there are 5 accounts in the csv being imported, the list has a length of 5.
b. The total credits calculated for a bank account is correct
c. The total debits calculated for a bank account is correct
d. The balance for a savings account is correct
e. The balance for a loan account is correct
f. The writer successfully writes a file to the export folder by checking if the file exists.
8. You should ensure that each test method is written in the appropriate test class. For example, if you are testing the import_transactions function of the CsvImporter module, the test method is written in the Test_CsvImporter module.
Run all of the tests to verify they pass. If any of the tests fail, debug the application and correct any errors until all of the tests pass
This IT Assessment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.