Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

If i have a table in the database named customer and it has its attributes, should the class named customer have all of those attributes ? and can anyone tell me how to study oop design ?

Thank you.
Posted
Comments
Sergey Alexandrovich Kryukov 30-Jan-12 15:48pm    
For a note: there is nothing object-oriented in this question.
--SA

1 solution

No. You may or may not need it. It all depends on the goals of the application and the requirements.

The question "how to study" is too broad. Perhaps you can find the best answer in this most inspirational reading:
Peter Norvig, Teach Yourself Programming in Ten Years,
http://norvig.com/21-days.html[^].

[EDIT]

This should explain why I say that there is nothing object-oriented in this question (please see my comment to the question): using the notion of "class" or this keyword along does not make programing object-oriented. Real OOP starts when late binding is introduced, not sooner.
Please see http://en.wikipedia.org/wiki/Object-oriented_programming[^] — data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance are just the essential prerequisites.

Eastern proverb say:
Saying 'halva-halva' won't make your mouth sweet.


See also:
http://en.wikipedia.org/wiki/Late_binding[^],
http://en.wikipedia.org/wiki/Dynamic_dispatch[^].

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900