{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Design3Solution - CSE 335 Design Assignment 3 Problems 1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 335 Design Assignment 3 Problems 1. You are designing a personal finance system. You have accounts. Each account has a name, bank name, bank addras, bank roulirig number (same for all accounts at one bank), interest rate, and account number. You need to be able to record transactions. A deposit has a date, account, who lrom, memo, and amount A withdrawal has a date, account, payee, memo , and amount A transter has a date, a from account, a to account, a memo, and an amount. An interest deposit has a date, account, average daily balance, and an amount. Create a cla$ diagram tor this wstem in Bouml Transaction date : Date amount : double user transactions name : string interestDeposits address : string routingNurrber: string whoFrom : string deposits ‘ tran ersTo tra ersFrom name : string interestRate : double account 1 ac- cunt accountNumber : skiing toAccount 1 fromAccoum 1 Notes You had to have a Bank class Gthermse you would repeat bank data in each account That would be redundant. You needed some sort of user class to keep track of all of the banlcs, transactions, and accounts. lwould accept it you did not do an association between bank and account You definately need an association between transaction and user, though Note the use of a class to keep the memo onty for derived classes that needed it. 2. Assume you have two bank accounts. One is called Checking and is at the MSU Federal Credit Union, East Lansing, MI. It pays 0% interest and the account number ot22891185 The other is called Savings and is at the MSU Federal Credit Union, East Lansing, MI. It pays 0 58% Interest and the account number is 22991102. You have made the lollowmg transactions: A deposit ol$100 to checking on 9120:2010 lrom Kroger that is salary A withdrawal of $50 lrom checking on 91212010 tor cash spending money A transfer of $50 from checking to savings on 9l2212010 saving for Cancun. Create an object diagram in Bouml that dficllbfi this scenario. user user accounts accounts :Account :Account account accoumNumber = 22891185 accoUllfacmumNumher = 22891102 interestRate = 0 interestRate = 0.58 name = Checking name = Savings user toAccount address = East Lansing, MI name = MSU Federal Credit Union bank routingNurrber = 272479663 Withdrawals :Withdrawal amount = 50 amount = 100 date = 9/21/2010 date = 912012010 date = 9122/2010 deposits memo = spending money memo = salary memo = Saving for Cancun payee = Cash whoFrom = Kroger ldid put the rolfi on the links. I didn't require that for this assignment, but may do so in the future. CSE 335 ...
View Full Document

{[ snackBarMessage ]}