•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Software Developers' Lounge section within the Software Development category of DaniWeb, a massive community of 456,528 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,803 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Software Developers' Lounge advertiser: Programming Forums
Views: 760 | Replies: 2
![]() |
•
•
Join Date: Aug 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
Lets say I have an object called Customer. It has general info like name,address,phone,email. I use it throughout my application. Now, I have a new piece of code to add that will use a couple of arguements in Customer and will need a new arguement, lets call it "salesytd".
Here's my dilema:
- I'm lazy
- I'm anal retentive.
With that said should I:
1) Add the arguement, getter and setter to Customer and only use what i need.
2) Extend Customer with a new class and only use what i need.
3) Create a new class for only what i need.
4) Do something else
5) Give up and start drinking
Thanks
Here's my dilema:
- I'm lazy
- I'm anal retentive.
With that said should I:
1) Add the arguement, getter and setter to Customer and only use what i need.
2) Extend Customer with a new class and only use what i need.
3) Create a new class for only what i need.
4) Do something else
5) Give up and start drinking
Thanks
It really depends on how that piece of info relates to Customer. Is it specific to each customer and applicable to all customers? Then add it.
Is it only applicable to a certain kind of customer and has no meaning in the context of most customers? Then extend Customer.
Is it unrelated to innate Customer attributes but requires some data from Customer and it's just a convenient place to "stick" that piece of info? It should be in some other class and pull the info as needed from a Customer that is passed in as a parameter.
That's about the only general advice I could give without knowing more specifics of the relationships.
Is it only applicable to a certain kind of customer and has no meaning in the context of most customers? Then extend Customer.
Is it unrelated to innate Customer attributes but requires some data from Customer and it's just a convenient place to "stick" that piece of info? It should be in some other class and pull the info as needed from a Customer that is passed in as a parameter.
That's about the only general advice I could give without knowing more specifics of the relationships.
Last edited by Ezzaral : Oct 3rd, 2007 at 6:45 pm.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Software Developers' Lounge Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
ajax applications asp blog bt business business software developer development devices erp systems experiment india intel internet it japan java malware mcafee media microsoft mmorpg msdn news office online open-source programming project management publishing python rss search security software software selection spyware sql sun super technology evaluation tips vista warez web wiki windows xp
- Help on General Best Practices for Table/Database Design (Database Design)
- Stupid question(using class object) (C++)
- Sharing object instances between applications (VB.NET)
- Object-Oriented Programming (C++)
- How to maintain session for Web Services Object? (VB.NET)
- infected, embedded object. (Viruses, Spyware and other Nasties)
- Print Object hierarchy (C)
Other Threads in the Software Developers' Lounge Forum
- Previous Thread: I need a program, NOT a virus..sorry, I didn't wanna scare anyone:)
- Next Thread: please help me in finding a final year computing project



Linear Mode