問題文
A team has twelve related subprograms and several shared constants and types. The team is choosing between one package and twelve standalone subprograms with the constants repeated in each of them. Which comparison is correct?
選択肢
- The twelve standalone subprograms are the only workable arrangement, because a package cannot declare a type and every type that several subprograms share has to be created at the level of the schema.
- The two arrangements are equivalent, because the compiler merges the subprograms of one schema into a single unit and the shared constants are therefore stored once regardless of how the source is organized.
- The package holds the shared types and constants once and hides the parts that callers do not need, while twelve standalone subprograms repeat the shared items and expose every one of them as an object of the schema that anyone may reference.
- The twelve standalone subprograms hold the shared types and constants once and hide the parts that callers do not need, while a package exposes every one of its items to the callers because a specification is visible in the whole schema.