473,508 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

set and class

I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
Thanks.

Apr 15 '07 #1
9 1554
DBC User skrev:
I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
Thanks.
http://en.wikipedia.org/wiki/Class_%...ter_science%29
http://en.wikipedia.org/wiki/Set

--
OU
Apr 15 '07 #2
On 2007-04-15 20:13, DBC User wrote:
I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
A set is a collection of something and usually it is required that each
member of the set is unique in the set (no doublets). A class (as we
talk about here) is a construct in a programming language. Members are
not instances of classes, objects are. When using inheritance the
derived class is not a subset but rather a superset since it will be at
least what the base class was and probably more.

Since you don't seem to have a good understanding of object oriented
programming, (in fact you seem to have misunderstood the basics) I'd
recommend that you find yourself a good book on the subject, since it
can be quite trick in the beginning. There are some that deal purely
with object oriented design and others that combine object oriented
design together with programming, which one you need depends on you goals.

--
Erik Wikström
Apr 15 '07 #3
DBC User wrote:
I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
Thanks.
A C++ class is something that you custom design. You can design many
things (members) into it and they can be of many types. You can also
put your own methods into it. It is a fundamental element of the C++
language.

A set is merely a predesigned container for objects, and all of the
objects in a particular set must be of the same type. It is a utility
class provided with the standard library.

--
Scott McPhillips [VC++ MVP]

Apr 15 '07 #4
"DBC User" wrties:
>I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
I don't think class is a very good term to describe that thing as used in
the computing field - so it's natural to have problems with it. But I don't
know of a much better word, template is about the best I can do. Skeleton?
Apparently the people who coined the term didn't like it too much either.
Note that their native language was Norwegian, but I don't mean to imply
that that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.
<class etymology . class OR classes simulaThere are several hits but I
didn't see any that seemed likely to really impress me so I only looked at
the first hit. Here is a link to it. If you want to pursue it that search
target should be useful. Note that Hoare is mentioned, that would be, I
think C A R Hoare who is famous for his contributions to the field of
computing.
Apr 15 '07 #5
On Apr 15, 8:56 pm, "osmium" <r124c4u...@comcast.netwrote:
"DBC User" wrties:
I am trying to find the difference between set and class. Could some
one help me? I can understand that a class is like a set. Each subset
could be a inherited class and members are instances. What is the
difference between class and set and if there is any?
I don't think class is a very good term to describe that thing as used in
the computing field - so it's natural to have problems with it.
As a general rule, no everyday English word will really fit when
describing something as abstract or as precise as the elements
we use in computing. So we make do.
But I don't
know of a much better word, template is about the best I can do.
A C++ class certainly has nothing to do with what I would
understand under the everyday English word template.
Skeleton?
Neither.
Apparently the people who coined the term didn't like it too much either.
What makes you say that?
Note that their native language was Norwegian, but I don't mean to imply
that that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.
It's also the term used in Smalltalk (whose author invented the
name "object oriented"). It seems to have met with a great deal
of acceptance, very quickly.

(I also wouldn't waste my time with the Wikipedia for this.
It's not the most accurate of references.)

--
James Kanze (Gabi Software) email: ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Apr 15 '07 #6
"James Kanze" wrote:
Apparently the people who coined the term didn't like it too much either.
What makes you say that?

I see I forgot to include the link. There was, however, a definitive
description of that link. It is

http://www.the-interweb.com/serendip...erm-class.html

It includes this:

"Our good intentions have not quite worked out, however"

I used the simple minded technique of reading what they said on the subject.
Note that their native language was Norwegian, but I don't mean to imply
that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.
It's also the term used in Smalltalk (whose author invented the
name "object oriented"). It seems to have met with a great deal
of acceptance, very quickly.

Mantissa, WRT floating point was accreted quickly too.
What's your point??? Simula 67 was before Smalltalk.

(I also wouldn't waste my time with the Wikipedia for this.
It's not the most accurate of references.)

If you prefer tea leaves, be my guest. Or we could wander aimlessly in the
desert.
Apr 15 '07 #7
"osmium" weites:
"James Kanze" wrote:
>Apparently the people who coined the term didn't like it too much either.

What makes you say that?

I see I forgot to include the link. There was, however, a definitive
description of that link. It is

http://www.the-interweb.com/serendip...erm-class.html

It includes this:

"Our good intentions have not quite worked out, however"

I used the simple minded technique of reading what they said on the
subject.
>Note that their native language was Norwegian, but I don't mean to imply
that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.

It's also the term used in Smalltalk (whose author invented the
name "object oriented"). It seems to have met with a great deal
of acceptance, very quickly.

Mantissa, WRT floating point was accreted quickly too.
What's your point??? Simula 67 was before Smalltalk.

(I also wouldn't waste my time with the Wikipedia for this.
It's not the most accurate of references.)

If you prefer tea leaves, be my guest. Or we could wander aimlessly in
the desert.
It turns out I was just defending Wikipedia on general principles. Actually
I used, and meant, Google. Unfortunately, I seem to use those two
interchgeably. :-(
Apr 16 '07 #8
On Apr 16, 1:11 am, "osmium" <r124c4u...@comcast.netwrote:
"James Kanze" wrote:
Apparently the people who coined the term didn't like it too much either.
What makes you say that?
I see I forgot to include the link. There was, however, a definitive
description of that link. It is
http://www.the-interweb.com/serendip...ives/70-The-or...
It includes this:
"Our good intentions have not quite worked out, however"
I used the simple minded technique of reading what they said
on the subject.
Remove the context, and you can make anyone say anything. The
following sentence makes it clear that it wasn't the word
"class" they were unhappy with, but the fact that "Many users
tend to use the term "class", or perhaps "class instance", to
denote an object, [...]".
Note that their native language was Norwegian, but I don't mean to imply
that was a factor. I knew the first usage goes back to at least Simula
67 so I used this search target on Wikipedia.
It's also the term used in Smalltalk (whose author invented the
name "object oriented"). It seems to have met with a great deal
of acceptance, very quickly.
Mantissa, WRT floating point was accreted quickly too.
And works well.

Don't forget, this is a highly specialized, technical
vocabulary.
What's your point??? Simula 67 was before Smalltalk.
It proves acceptance. Alan Kay was apparently happy with the
word.
(I also wouldn't waste my time with the Wikipedia for this.
It's not the most accurate of references.)
If you prefer tea leaves, be my guest. Or we could wander
aimlessly in the desert.
Or we could use original and reliable sources. The Wikipedia is
often useful as a starting point (although it depends -- if
there's the slightest disagreement concerning the subject, it
generally only points to the opinions of whoever got there
last), but it's certainly not a source worth quoting.

BTW: you really should get another newsreader. Your citations
were completely wrong.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Apr 16 '07 #9
On Apr 16, 3:41 am, "osmium" <r124c4u...@comcast.netwrote:
"osmium" weites:
"James Kanze" wrote:
[...]
It turns out I was just defending Wikipedia on general principles. Actually
I used, and meant, Google. Unfortunately, I seem to use those two
interchgeably. :-(
There's a big difference. Wikipedia gives you one persons
opinion. Google gives you everyone's opinion, and sometimes
some facts as well. Both have their uses, especially Google,
but you have to be careful with both.

If I want reliable information on this sort of thing, I'd go to
the ACM site, and look up the original articles (most of which
would have been published in the CACM).

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Apr 16 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9577
by: Fernando Rodriguez | last post by:
Hi, I need to traverse the methods defined in a class and its superclasses. This is the code I'm using: # An instance of class B should be able to check all the methods defined in B #and A,...
18
6934
by: John M. Gabriele | last post by:
I've done some C++ and Java in the past, and have recently learned a fair amount of Python. One thing I still really don't get though is the difference between class methods and instance methods. I...
1
3320
by: Oplec | last post by:
Hi, I'm learning C++ as a hobby using The C++ Programming Language : Special Edition by Bjarne Stroustrup. I'm working on chpater 13 exercises that deal with templates. Exercise 13.9 asks for me...
13
2352
by: Bryan Parkoff | last post by:
I have created three classes according to my own design. First class is called CMain. It is the Top Class. Second class and third class are called CMemory and CMPU. They are the sub-classes....
9
4967
by: Banaticus Bart | last post by:
I wrote an abstract base class from which I've derived a few other classes. I'd like to create a base class array where each element is an instance of a derived object. I can create a base class...
8
2843
by: Bryan Parkoff | last post by:
I find an interesting issue that one base class has only one copy for each derived class. It looks like that one base class will be copied into three base classes while derived class from base...
21
4031
by: Jon Slaughter | last post by:
I have a class that is basicaly duplicated throughout several files with only members names changing according to the class name yet with virtually the exact same coding going on. e.g. class...
5
3140
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
3
3739
by: Hamilton Woods | last post by:
Diehards, I developed a template matrix class back around 1992 using Borland C++ 4.5 (ancestor of C++ Builder) and haven't touched it until a few days ago. I pulled it from the freezer and...
0
2812
by: emin.shopper | last post by:
I had a need recently to check if my subclasses properly implemented the desired interface and wished that I could use something like an abstract base class in python. After reading up on metaclass...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.