One important difference between languages that provide syntax to encapsulate th
ID: 3765747 • Letter: O
Question
One important difference between languages that provide syntax to encapsulate the definition of user defined data types is whether the syntax requires the specification details to be separated from the implementation details. Ada requires such a separation. In Ada, the specification information must be placed in the package specification and the implementation details in the package body. Where must the representation details be placed?
Compare Ada with both C++ and Java in this regard. Take and defend a position as to whether requiring separation of the specification and representation information for a data type is a good language design decision.
Explanation / Answer
GIVEN
One important difference between languages that provide syntax to encapsulate the definition of user-defined data types is whether the syntax requires the specification details to be separated from the implementation details.
---------------------
with number; use Records;
procedure example_details is
phone_number :Records
begin
changePhoneNumber(phone_number,1234567890)
end;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.