IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
KB
   ► KB ► > Abstraction Posts  Print This     

Abstraction Posts

"Abstraction" Knowledge Base Posts

More...
  KB Article    

Mike Prestwood
1. Delphi Abstraction (abstract, override)

Delphi for Win32 supports abstract class members using the abstract keyword. You can even instantiate instances of a class that contains abstract members. Then you override each abstract member in a descendant class with Override. Delphi does not support setting an entire class as abstract. You can create an abstract class (a class with one or more abstract methods), but there is no way to tell the compiler to not allow the instantiation of the abstract class. Delphi does not support abstract member properties directly. To implement an abstract properity, make use of abstract methods. That is, you can read a GetPropertyX abstract function and write to a SetPropertyX abstract procedure. In effect, creating  an abstract property.

Posted to KB Topic: OOP
13 years ago, and updated 10 years ago
(5 Comments , last by sophie.e )

Code

Article
Nothing New Since Your Last Visit
26732
Hits

Pascal and Delphi Coding

Mike Prestwood
2. Interface

An element of coding where you define a common set of properties and methods for use with the design of two or more classes.

Both interfaces and abstract classes are types of abstraction. With interfaces, like abstract classes, you cannot provide any implementation. However, unlike abstract classes, interfaces are not based on inheritance. You can apply an Interface to any class in your class tree. In a real sense, interfaces are a technique for designing horizontally in a class hierarchy (as opposed to inheritance where you design vertically). Using interfaces in your class design allows your system to evolve without breaking existing code.

Posted to KB Topic: Object Orientation (OO)
13 years ago, and updated 12 years ago

Definition
Nothing New Since Your Last Visit
24994
Hits

Coding & OO

Mike Prestwood
3. 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.

Posted to KB Topic: Object Orientation (OO)
13 years ago, and updated 12 years ago
(5 Comments , last by AkaRasty.B )

Definition
Nothing New Since Your Last Visit
23065
Hits

Coding & OO

Mike Prestwood
4. C# Interfaces (interface)

Classes and structs can inherit from interfaces in a manner similar to how classes can inherit a base class or struct, but a class or struct can inherit more than one interface and it inherits only the method names and signatures, because the interface itself contains no implementations.

class MyClass: IMyInterface
{
  public object Clone()
{
return null;
}

// IMyInterface implemented here...
}
Posted to KB Topic: OOP
13 years ago, and updated 12 years ago

Code

Article
Nothing New Since Your Last Visit
16230
Hits

C# (Visual C# & VS.Net)

Mike Prestwood
5. VB.Net Interfaces (Interface, Implements)

With VB.Net you define an interface with the Interface keyword and use it in a class with the Implements keyword. In the resulting class, you implement each property and method and add Implements Interface.Object to each as in:

Sub Speak(ByVal pSentence As String) Implements IHuman.Speak
MessageBox.Show(pSentence)
End Sub
Posted to KB Topic: OOP
13 years ago, and updated 12 years ago

Code

Article
Nothing New Since Your Last Visit
15882
Hits

VB.Net Language
More...

"Abstraction" Message Board Posts


Thread 1 of 1

Mike Prestwood
9/1 Brown Bag - Action Lists, Inheritance, Friendl
{Too Long!}
Posted to MB Topic: Coding Division « Staff Board
14 years ago
2 replies. Last post:

mprestwood
Wes,, , Excellent. Let chat about this at our next brown bag. I've never used it but I remember you told me a bit a about it. I'd like you to tell us what it's used for and essentially how it works., , I'm very curious about that topic., , Mike Mike Prestwood
14 years ago
Nothing New Since Your Last Visit
12
Hits


Icon Legend:
Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


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