IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesASP Classic  Print This     

Abstraction (ASP Classic and Delphi Prism Cross Reference Guide)

By Mike Prestwood

ASP Classic versus Delphi Prism: A side by side comparison between ASP Classic and Delphi Prism.

 
OOP Details
 

More object oriented (OO) stuff.

Abstraction

[Other Languages] 

General Info: Abstract Class / Abstract Member

An abstract class member is a member that is specified in a class but not implemented. Classes that inherit from the class will have to implement the abstract member. Abstract members are a technique for ensuring a common interface with descendant classes. An abstract class is a class you cannot instantiate. A pure abstract class is a class with only abstract members.

Languages Focus

Abstraction is supported at various levels with each language. A language could enforce abstraction at the class level (either enforcing a no-instantiation rule or a only abstract members rule), and with class members (member methods and/or properties).

ASP Classic:   Not Supported
Delphi Prism:   abstract, override

Prism supports abstract class members and abstract classes using the abstract keyword.

An abstract class is a class with one or more abstract members and you cannot instantiate an abstract class. However, you can have additional implemented methods and properties.

An abstract member is either a method (method, procedure, or function), a property, or an event in an abstract class. You can add abstract members ONLY to abstract classes using the abstract keyword.

Alternatively, you can use the empty keyword in place of abstract if you wish to instantiate the abstract class. Then you override it in a descendant class with Override.

Syntax Example:
Cyborg = public abstract class(System.Object)
public
//You can put "virtual; abstract;"
  //but it's implied with just "abstract;"
  method Speak(pMessage: String); abstract; 
method Walk; virtual; abstract;
end;
 
Series600 = public class(Cyborg)
public
procedure Speak(pMessage: String); override;
procedure Walk; override;
end;












Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]