Hi
I want to build some objects that have a little difference between them. But i wonder how would i do it - 1. build a class with some variables and build objects out of him, or - 2.build class for each object, with the functions dedicated to this 'only one' object.
Is there any difference between the two methods? It is clear that its much more simple to build a class for each object, and define the functions for this object in the class. What is the profit of make one class, and inherit many objects out of it, make it complicated to implement different functions for each object.
Someone?
liran ritkop
0
Newbie Poster
Recommended Answers
Jump to PostI think that depends on your definition of "a little difference between them". Are there data differences, functional differences, or both? Do they have the same basic functionalities and just implement the functions differently?
This sounds like a generalization/specialization relationship, which would tend to imply an inheritance structure, but …
All 4 Replies
Fbody
682
Posting Maven
Featured Poster
liran ritkop
0
Newbie Poster
Fbody
682
Posting Maven
Featured Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.