answersLogoWhite

0

Abstract data types (ADTs) are defined by base class designers. An ADT differs from an ordinary base class in that it has a pure-virtual interface. As with all base classes, the protected interface is intended for use by class implementers while the public interface is intended for all programmers (consumers).

All member data should be declared private. Even if there is no invariant associated with the data, declaring it private and providing a public interface ensures that any changes to the class representation will not affect consumers. Member data is an implementation detail that should be of no concern to either the class implementer or the consumer. Protected member data should always be treated with suspicion as this essentially exposes an implementation detail to implementers that could undermine encapsulation. Abstract data types in particular should have few data members, preferably none at all.

Class implementers are only concerned with the protected and public interfaces of their bass classes. Protected interfaces should be fully-documented as the implementer needs to know which methods need to be overridden and for what reason. A common convention is to place the protected interface default implementations in a separate translation unit, typically with a "_impl" suffix. This helps implementers examine the implementation details and thus eliminate redundant/duplicate code from their overrides. Nevertheless, a well-defined interface should be self-documenting and intuitive; the class header file should provide all the documentation necessary for an implementer or consumer to use the class without the need to examine the implementation details.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What is to perform the indicated operations?

It means to Simplify


What are the functions of the ALU?

to perform arthmatic and logical operations


What is the abstact noun for perform?

The abstract noun for the verb to perform is performance.


What is abstract noun for perform?

The abstract noun is performance (to complete a process in a certain manner). It can be a concrete noun when it refers to the performance of a play.


What is the difference between adaptive and perfective maintenance?

Adaptive maintenance is where the programmer modifies existing software to suit new tasks.Perfective maintenance, on the other hand, is where the programmer modifies software to make it perform better.


What is a DML Processor?

dml processor process the dml statements such as select,update,delete etc that are passed by the application programmer into a computer program that perform specified task by programmer such as delete a table etc.


How many floating point operations per second can this processor perform?

The processor can perform approximately 2.5 billion floating point operations per second.


Why do you have to use order of operations for every problem?

Because if you perform the operations in a different order your answer will be wrong.


What are perform operations?

6578+87209+43798+9999


What do surgeons use to perform delicate operations?

robotics


What is the abstract noun for performed?

The word 'performed' is the past participle, past tense of the verb to perform, which also functions as an adjective.The abstract noun forms of the verb to perform are performance and the gerund, performing.The concrete noun form of the verb to perform is performer, a word for a person.


Which are the possibe arithmetic operation with pointers?

Pointers in C are stored as integers. You can perform any mathematical operations on pointers that you can perform on ints.Of course not, the following operations are possible: =, +, +=, ++, -, -=, --, *, [], ->, typecast