Devam Ediyor

490137 Programming Techniques

Overview of the problem

You are to develop software for a simple banking situation. In the banking system we have customers who have bank accounts. Customers access those accounts via ATMs, on-line, phone and bank branches. Some of these accesses of those accounts give rise to transactions. We need to model the fact that customers have accounts and that there are transactions on those accounts. Normally a customer might have many accounts but in this assignment we will deal with just a savings account.

OO Modelling

We might model such a scenario using three types of object: one for Customers, one for BankAccounts and another for Transactions. In terms of data required, for Customers assume we need a name, an address and a savings account. An array of Customers should be used. For the savings account assume we require an account number, a balance (amount) and an interest rate. For transactions assume we need an account number the transaction applies to, an amount being transacted and a transaction type (such as Deposit, Withdrawal or Interest ). Details of the transactions are held in a file called “[url removed, login to view]”.

Below is a suggested UML type diagram representing the object types (classes):

SavingsAccount

-accNumber int

-balance float

-interestRate float

+setUpAccount(int, float, float) void

+addDeposit(float) void

+subWithdraw(float) void

+addInterest() void

+getBalance() float

+matchAccount(int) bool

Customer

-name string

-address string

-saveAcnt SavingsAccount

+createCust(string, string, int) void

+searchAccounts(int) bool

+applyTrans(char, float) void

+accessAccount(char) void

Transaction

-accountNumber int

-amount float

-transType char

+readRecord(ifstream) void

-findAccount(Customer [], int) int

+process(Customer []) void

As can be seen above, the Customer class includes (is composed of) a savingsAccount object.

The main objective of this system is to process transactions on accounts. You will be

provided with a file of transactions. You should create suitable Customer records and

associated savingsAccounts such that these transactions can be correctly processed.

File structure

Typical data to be found in the file is as follows:

24689

[url removed, login to view]

C

123456

[url removed, login to view]

D

A transaction record is in three parts, firstly an account number, secondly an amount and thirdly a transaction code (C = credit, D = debit, I = add interest). Assume all transactions are valid i.e. generate no errors.

Responsibilities of objects

The Transaction object is responsible for reading the transaction file records, finding the relevant account in the array of customers and applying the transaction. To find the relevant account a matching function within the Customer class can be used. A transaction can be applied by calling a function within the Customer class which in

turn calls a function in the savingsAccount class. See UML modelling above. You may choose to alter the function specifications if required. As indicated above Customer objects provide the access to the accounts including searching.

The savingsAccount objects provide basic operations such as deposit, withdrawal, adding interest, getting a balance and account number matching.

Operation of your program

Your program should read the transaction file and correctly apply the transactions to the customers and their accounts. You should setup an array of Customers to suit the data in the file. Make the balance for all customers initially 0. Assume an interest rate of 5% for add interest type transactions. Your program should produce a balance for all customers on screen first then apply

the transactions and then produce an updated balance on screen for every customer.

[url removed, login to view]

246890

[url removed, login to view]

C

123456

[url removed, login to view]

C

123456

[url removed, login to view]

I

937568

[url removed, login to view]

C

246890

[url removed, login to view]

D

123456

[url removed, login to view]

D

337761

[url removed, login to view]

C

123456

[url removed, login to view]

C

337761

[url removed, login to view]

C

337761

[url removed, login to view]

D

246890

[url removed, login to view]

I

937568

[url removed, login to view]

D

846579

[url removed, login to view]

C

293567

[url removed, login to view]

C

917355

[url removed, login to view]

C

846579

[url removed, login to view]

D

293567

[url removed, login to view]

D

846579

[url removed, login to view]

D

917355

[url removed, login to view]

D

937568

[url removed, login to view]

I

Beceriler: Her şey Kabul, C Programlama, PHP

Daha fazlasını görün: uml model types, uml data types, types searching data structure, types searching, types programming errors, types programming, types array data structure, types data structure, type searching data structure, three line diagram, three model, string searching, string problem, string matching problem, string data structure, see programming, searching techniques data structure, searching problem, searching programming, searching data structure, searching string, searching number array, programming via php, programming types, programming terms

İşveren Hakkında:
( 2 değerlendirme )

Proje NO: #2236048

Seçilen:

eperfections

Please see PMB

1 gün içinde 30$ USD
(365 Değerlendirme)
7.1