You are on page 1of 1

OOP216D Exercises June 9, 2023

Exercise 7: Accounts Processor Application


An institution operating similar to the South African Revenue Services is responsible for processing
accounts. This institution has a list off accounts that they process and credit or debit based on the type
of account. The operations of the institution are specified below:

1. An administrator goes through the list of accounts, on that list, all clothing accounts are credited
with 10% of the amount spent if the amount spent is less than 80% of the initial credit.
Additionally, all savings accounts are credited with 15% of the initial deposit if the deposit
amount has been under savings for more than 90 days (roughly 3 Months).
a. All clothing accounts have an initial credit of R10 000, with a randomly generated spent
amount that is less than the initial credit.
b. All savings accounts have a randomly generated initial deposit, and a randomly
generated number of days representing how many days the account has been active.
c. All accounts have a randomly generated 5-digit unique account number.
d. All accounts have a balance.
2. The administrator is able to see the account information for all accounts of a specific type, based
on which type they would like to see. For example, the administrator is able to view accounts
information for all clothing accounts.
a. The accounts information should be displayed as follows:
ClothingAccount: 12345 has a balance of R200 from an initial balance of
R10 000 with an expenditure of R9 800.
SavingsAccount: 98765 has a balance of R15 000 from a deposit of R10 000
after saving for 110 days.
b. To accomplish this, the toString() method must be overridden.

You are required to create an application that will assist this institution perform the specified tasks.
Include necessary classes, interfaces, and relationships in your application.

Page 7 of 7
Object Oriented Programming
Compiled by: TK Kujwane

You might also like