|
IT SOLUTIONS
Your full service technology partner!
|
|
![]() ![]() |
|
More object oriented (OO) stuff.
A. In Dephi, class helpers allow you to extend a class without using inheritance. With a class helper, you do not have to create and use a new class descending from a class but instead you enhance the class directly and continue using it as you always have (even just with the DCU). B. In general terms, developers sometimes use the term to refer to any class that helps out another class.
A.k.a. Class Contract and Design by Contracts. A contract with a method that must be true upon calling (pre) or exiting (post). A pre-condition contract must be true when the method is called. A post-condition contract must be true when exiting. If either are not true, an error is raised. For example, you can use code contracts to check for the validity of input parameters, and results An invariant is also a code contract which validates the state of the object required by the method.
General Info: Class ConstructorConstructors are called when you instantiate an object from a class. This is where you can initialize variables and put code you wish executed each time the class is created. When you initially set the member fields and properties of an object, you are initializing the state of the object. The state of an object is the values of all it's member fields and properties at a given time. Languages FocusWhat is the syntax? Can you overload constructors? Is a special method name reserved for constructors?
General Info: Class DestructorA special class method called when an object instance of a class is destroyed. With some languages they are called when the object instance goes out of scope, with some languages you specifically have to call the destructor in code to destroy the object, and others use a garbage collector to dispose of object instances at specific times. Desctructors are commonly used to free the object instance but with languages that have a garbage collector object instances are disposed of when appropriate. Either way, destructors or their equivalent are commonly used to free up resources allocated in the class constructor. Languages FocusAre object instances freed with a garbage collector? Or, do you have to destroy object instances.
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.
A partial class, or partial type, is a class that can be split into two or more source code files and/or two or more locations within the same source file. Each partial class is known as a class part or just a part. Logically, partial classes do not make any difference to the compiler. The compiler puts the class together at compile time and treats the final class or type as a single entity exactly the same as if all the source code was in a single location. Languages FocusFor languages that have implemented partial classes, you need to know usage details and restrictions. Can you split a class into two or more files? Can you split a class within a source code file into two or more locations? What are the details of inheritance? Does it apply to interfaces as well?
Languages FocusHow do you prevent another class from inheriting and/or prevent a class from overriding a member.
General Info: Static Class / Static MemberA static member is a member you can have access to without instantiating the class into an object. For example, you can read and write static properties and call static methods without ever creating the class. Static members are also called class members (class methods, class properties, etc.) since they belong to the class and not to a specific object. A static class is a class that contains only static members. In the UML, these classes are described as utility classes. Languages FocusLanguages that support static members usually at least support static member fields (the data). Some languages also support static methods, properties, etc. in which case the class member is held in memory at one location and shared with all objects. Finally, some languages support static classes which usually means the compiler will make sure a static class contains only static members.
|
Go ahead! Use Us! | Call: 916-726-5675 | Or visit our new sales site: www.prestwood.com |
ACCOUNT OVERVIEW:
|
CONTACT US:
Office Hours: 8am-5pm | Mon thru Fri
916-726-5675 (office)
916-726-5676 (fax)
916-595-5675 (text msg)
8421 Auburn Blvd, STE 256
Citrus Heights, CA 95610
|
|
©1995-2025 Prestwood IT Solutions.
[Security & Privacy]
|