cs201_hw1_2009 - CS 201, Fall 2009 Homework Assignment 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 201, Fall 2009 Homework Assignment 1 Due: 18:00, November 25, 2009 In this homework, you will implement a banking system. The bank has multiple branches and multiple customers. The customers can have multiple accounts in different branches. The banking system will have the following functionalities; the details of these functionalities are given below: 1. Add a branch 2. Delete a branch 3. Add a customer 4. Delete a customer 5. Add an account for a customer in a branch 6. Delete an account 7. Show the list of all accounts 8. Show detailed information about a particular branch 9. Show detailed information about a particular customer Add a branch: The banking system will allow to add a new branch indicating its branch id and branch name. Since the branch ids are unique, the system should check whether or not the specified branch id already exists (i.e., whether or not it is the id of another branch), and if the branch exists, it should not allow the operation and display a warning message. Delete a branch: The banking system will allow to delete an existing branch indicating its branch id. If the branch does not exist (i.e., if there is no branch with the specified id), the system should display a warning message. Note that this operation will also delete all accounts at the branch of interest. Add a customer: The banking system will allow to add a new customer indicating her/his customer id and name. Since the customer ids are unique, the system should check whether or not the specified customer id already exists (i.e., whether or not it is the id of another customer), and if the customer exists, it should not allow the operation and display a warning message. Delete a customer: The banking system will allow to delete an existing customer indicating its customer id. If the customer does not exist (i.e., if there is no customer with the specified id), the system should display a warning message. Note that this operation will also delete all accounts for the customer of interest. Add an account for a customer in a branch: The banking system will allow to add a new account for a particular customer in a particular branch. For that, the branch id, the customer id, and the deposited amount have to be specified. The system should first check whether or not this branch exists; if it does not, it should prevent to add an account and display a warning message. The system should also check whether or not this customer exists; if it does not, it should prevent to add an account and display a warning message. If both the branch and the customer exist, a unique account id is generated and a new account is created with the speficied deposit amount. The system should return this account id to the user. If the branch or the customer do not exist, the returned account id is -1. Note that the account ids are unique within the banking system; thus, by using an account id, the user can access this...
View Full Document

This note was uploaded on 02/01/2010 for the course CS CS-201 taught by Professor Selimaksoy during the Fall '09 term at Bilkent University.

Page1 / 5

cs201_hw1_2009 - CS 201, Fall 2009 Homework Assignment 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online