Q6 : Explain how information hiding is provided in an Ada package.
A : There are two approaches to hiding the representation from clients in the package specification. The first one is to include two sections in the package specification, the second one is in which entities are visible to clients and one that hides its contents.
Q7 : To what is the private part of an Ada package specification visible?
A : The private part of an Ada package specification is visible to the compiler but not to the client programs.
Q8 : What is the difference between private and limited private types in Ada?
A : Private types have built-in operations for assignment and comparison. Limited private types don’t have built-in operations.
Q9 : What is in an Ada package specification? What about a body package?
A : Package specification, is an Ada package which provides the interface of the encapsulation (and perhaps more). Body package, is an Ada package which provides the implementation of most, if not all, of the entities named in the associated package specification.
Q10 : What is the use of the Ada with clause?
A : The use of Ada with clause is to make the names defined in external packages visible.
No comments:
Post a Comment