home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!warwick!nott-cs!lut.ac.uk!enaha
- From: A.H.Al_ashaab@lut.ac.uk (AH Al_ashaab)
- Newsgroups: comp.object
- Subject: Questions about clesses and it relationship
- Message-ID: <1992Jul22.130009.25231@lut.ac.uk>
- Date: 22 Jul 92 13:00:09 GMT
- Reply-To: A.H.Al_ashaab@lut.ac.uk (AH Al_ashaab)
- Organization: Loughborough University, UK.
- Lines: 38
-
- ( I hope this the correct group for my question, if not please do
- advise me where to go!)
-
- I am new in the area of Object Oriented programming . here I want to ask
- questions of how defining a class and the relation between a class
- a sub-class. I am using LOOPS at the moment.
-
- Can I define a class that have just a conceptual meaning? so I
- define it as "ABSTRACT CLASS". That is to help me in orgnizing
- the classes in different category .
-
- For example.. I want to define classes that related to the manufacturing
- area of Injection moulding which have three main classes
- (Injection_Machine, Mould & Mouldability_Features), so is it correct
- (OR good practise) to define a super class for them say "ManufModel"
- that is an "ABSTRACT" class but has nothing common among the three
- sub-classes????
-
-
- The other thing I want to ask is the relation between a class and its
- sub_classes. Can the relation be either "has-a" or "is-a" or
- it has to be only "is-a" relationship? while the "has-a" relationship
- is achieved by defining the attribute (I mean the class variable or
- instance variable in case of LOOPS or slots in case of CLOS) of a class
- as a classes. For example the Injection Machine consist of both the
- "Clamping Unit" and the "Injection Unit". That mean its a "has-a"
- relationship. so is it correct (OR a good practise) to define
- "Injection Machine" as super class of both the "Clamping Unit"
- and the "Injection Unit" or I have to define each of them as different
- class then I assign the classes of "Clamping Unit" and "Injection Unit"
- to the instance variable of the class of "Injection Machine".
-
-
- Ahmed AL-ASHAAB
- Manuf. Eng Dept., Loughborough Univ of Tech
- Loughborough, Leics LE11 3TU, England.
- EMail : A.H.Al_ashaab@lut.ac.uk OR ahmed@mansun.lut.ac.uk
- Tel. 0509-263171 Ext. 2427. FAX 0509-267725
-