FACTOID # 182: China loses 2 million people per year.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Subclass (computer science)

In object-oriented programming, a subclass is a class that inherits some properties from its superclass. In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. ... In, object-oriented programming, a class consists of a description of a collection of encapsulated instance variables and methods, possibly with implementation of those types together with a constructor function that can be used to create objects of the class. ... In object-oriented programming, inheritance is a way to form new classes (instances of which are called objects) using classes that have already been defined. ... In computer science, a superclass is a class from which other classes are derived. ...


You can usually think of the subclass as being "a kind of" its superclass, as in a "a Manx is a kind of cat", or "a square is a kind of rectangle":

  • A cat has fur, four legs, and a tail
    • A Manx cat does not have a tail, but has all of the other characteristics listed above
  • A rectangle has four sides with lengths w and h
    • A square has all of the characteristics of a rectangle; in addition, w = h

In this way, a subclass is a more specific version of its superclass; that is, the facts about the cat state what is generally true for all cats, even if some kinds of cats happen to have no tail. And while all rectangles have four sides, the square has the more restricted feature that all of its sides have the same length.


Don't confuse the subclass-superclass relationship with that of classes and instances. An "instance of cat" refers to one particular cat. The manx cat in the table is still a class — there are many instances of manx cats. And if a particular cat (an instance of the cat class) happen to have its tail bitten off by a fox, that does not change the cat class. It's just that particular cat that has changed. An object is fundamental concept in object-oriented programming. ...


Some software manuals refer to subclasses as derived classes.


See also

For a more in-depth explanation of the concept of classes in object-oriented programming, see class (computer science), in particular the section about subclasses and superclasses on that page. In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. ... In, object-oriented programming, a class consists of a description of a collection of encapsulated instance variables and methods, possibly with implementation of those types together with a constructor function that can be used to create objects of the class. ... In, object-oriented programming, a class consists of a description of a collection of encapsulated instance variables and methods, possibly with implementation of those types together with a constructor function that can be used to create objects of the class. ...


  Results from FactBites:
 
Subclass (computer science) Summary (535 words)
In object-oriented programming, a subclass is a class that inherits some properties from its superclass.
In this way, a subclass is a more specific version of its superclass; that is, the facts about the cat state what is generally true for all cats, even if some kinds of cats happen to have no tail.
Subclasses and superclasses are often referred to as derived and base classes, respectively, terms coined by [[C++]] creator Bjarne Stroustrup, who found these terms more intuitive than the traditional nomenclature.
Class Definition for Class 702 - DATA PROCESSING: MEASURING, CALIBRATING, OR TESTING (2983 words)
Subject matter wherein the measurement system or process is applicable in the science concerning motion or action of force on body, or the design, construction, operation, and care of mechanical process or structure, or for a solution of a problem in these areas.
Subject matter wherein the data processing system or calculating computer is designed for or utilized in the study of an object to measure the impairment of the object due to use, or to estimate life expectancy of the object.
Subject matter wherein the data processing system or calculating computer is designed for or utilized in the study of an object to identify the existence or amount of a fault (e.g., crack or break) of the object.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.