[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Prasanna Raman wrote:OK, thank you! Can I start thinking about my classes now and write them down?
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Prasanna Raman wrote:Thanks, Jeanne
![]()
I am thinking of having an accountID field to uniquely identify an account and an SSN field for uniquely identifying a customer, but I am confused as to why I have to think about these at this point. Could you please help me understand?
Social Security Numbers do not make good primary keys for a table of people for many reasons. First, most people consider their SSN private and don’t want it used in databases in the first place. Second, some people don’t have SSNs – especially those who have never set foot in the United States! Third, SSNs may be reused after an individual’s death. Finally, an individual may have more than one SSN over a lifetime – the Social Security Administration will issue a new number in cases of fraud or identity theft.
Sorry, Jeanne. I think I didn't think this through properly when I said in my earlier post that I'd just have an editCustomer() method in the Bank class.Jeanne Boyarsky wrote:What about updating the customer? For example, what if a customer gets married and changes her name?
Prasanna Raman wrote:Sorry, Jeanne. I think I didn't think this through properly when I said in my earlier post that I'd just have an editCustomer() method in the Bank class.
I think I've missed out the getter and setter methods for firstName, lastName, phoneNumber and DOB in my Customer class.
Prasanna Raman wrote:I am a bit confused as to how the customer would make the request to get his name or phone number changed.
Thank you again Junilu! Sorry, I am not trying to ignore your advice and continue in my own way but I'm seriously confused at this point. If my understanding is right, some of the other advice that I previously got in this forum have been to design it the way I started here. So, I think this is all going over my head a little nowJunilu Lacar wrote:Sigh.
Ok, I'm going to make one more attempt to pull you guys out of the depths of implementation thinking and up to a more appropriate (and IMO, realistic) level of thinking -- the place I would start if I were to go through a design exercise with my team.
An actual customerJunilu Lacar wrote:1. Who would be the primary user of this program? A bank teller? An actual customer?
Via a terminalJunilu Lacar wrote:2. How would this primary user access the system? Via a terminal connected to the bank's intranet? Over the web, via the bank's public website?
Opening an accountJunilu Lacar wrote:3. What's a common task that this primary user would perform with this program?
Withdraw/deposit moneyJunilu Lacar wrote:4. What's another common task that this primary user would perform with this program?
To be fair to myself, I think I did think through these things before I started. I think I documented at least some of these in the requirements I wrote down initially. But where I went away from what you're suggesting is that I didn't start coding these first. I am only a beginner to OOP, so I thought I'd be better off trying to think through the design first and then code.Junilu Lacar wrote:If you haven't thought about these things yet, how can you start thinking about classes, attributes, and methods?
Scenario: Creating a new account
A customer comes into the bank branch office, goes up to a terminal where this program is running. The customer selects the option to create a new account. The program prompts the customer to enter information that is needed to create a new account, the program creates a new account and displays a message to that effect to the user.
Scenario: Creating a new account
A customer comes into the bank branch office, goes up to a teller, and requests to open a new account. The teller leads the customer to a banking officer who takes over from there (the teller goes back to the bank counter). The banking officer exchanges pleasantries with the customer and establishes that the customer wants to open a personal checking account. The bank officer logs in to his/her terminal and fires up the retail banking application. The application has a menu of things that can be done with retail accounts. The bank officer selects the "Create new checking account" option from a menu. The bank officer goes through the new account entry process, gathering information from the customer and entering it into the program. The bank officer also verifies and records the customer's personal identification information (Name, address, telephone numbers, SSN, driver's license #, etc.). The bank officer then asks the customer to sign a signature card that will be kept on file to verify signatures on checks that will be made against the account. The bank officer asks the customer for the amount of the initial deposit, informing the customer of the minimum amount required to open a new account. After confirming all the information that was entered to create the new account, the banker takes the initial deposit amount from the customer and completes the "Create new checking account" process. The banker then gives the customer a newly-printed confirmation sheet with information about the new account that was just created.
Prasanna Raman wrote:Thank you, Junilu. I agree with your version of the banking process, but what was hoping to build here was just a simulation of it. I may add a GUI or develop a Web page for this later on but right now, I just want to simulate one or two functionalities that happen in a real bank on my computer terminal.
The main functionalities that I wanted to implement are opening an account, closing an account, make a deposit and withdraw money. Finally, the customer should also be able to change his details like his last name or phone number. Even for this small subset of functionalities, is trying to think of the whole design wrong? If so, how and where would I start here?
Thank youJunilu Lacar wrote:But bear with me; this will be good, I promise.
Prasanna Raman wrote:
Thank youJunilu Lacar wrote:But bear with me; this will be good, I promise.
Sure, I am really excited. I know I'm going to struggle through this and might be asking a lot of dumb questions so please bear with me!
User interface - displays prompts, menus, and input fields.
Collecting user details - collects all the details the user has entered through the interface.
Processing - does some action based on what the user needs. For example, creating the account and assigning it to the customer.
Saving - saving the customer details.
ibrahim yener wrote:I have already done such program in Java.
If i find it in my backup files i post it.
Thank you for offering to help, Ibrahim but as Tim and Junilu have already said, I think I'll get a lot more out of this discussion than any code can help.ibrahim yener wrote:If i find it in my backup files i post it.
It's he :)Junili Lacar wrote:@Prasanna: sorry but I'm unsure of your gender
I think I got confused a little bit here. I think I started thinking "methods". One method to prompt questions to the user, followed by one that processes the information and then a method that saves the information.Junilu Lacar wrote:1st time: Why do you need something that collects the user's details?
Prassana wrote:It's he
Prassana wrote:I think I started thinking "methods". One method to prompt questions to the user, followed by one that processes the information and then a method that saves the information.
Sorry, I'm trying hard not to but have still ended up falling for itJunilu Lacar wrote:Ah... but again you get ahead of yourself.
Sorry, I am really racking my brain but don't seem to come up with anythingJunilu Lacar wrote:Between the UI and this "repository of data", what other part(s) of the application might we need to get the job of creating a new account done? Hint: we are starting to think about application layers.
Prasanna Raman wrote:Sorry, I am really racking my brain but don't seem to come up with anything
In layman's terms, between the UI and the "repository of data" I'd think there needs to be some processing done to do the actual work of verifying the information and creating the account but I'm not sure if this is what you wanted
Get me the mayor's office! I need to tell her about this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
|