SOLUTION RATED A+
✔✔What are composite types? - ✔✔Types with internal structure defined in terms of
simpler types.
✔✔Give examples of composite types. - ✔✔Arrays, records, sets, lists.
✔✔What is the overview of scalar types? - ✔✔Boolean, character, integer, fixed point,
floating point, complex, rational.
✔✔What are enumeration types? - ✔✔Ordered values allowing comparisons with
predecessor and successor operations.
✔✔What are subrange types? - ✔✔Contiguous subset of values from a discrete base
type.
✔✔What is an example of a subrange type? - ✔✔test_score = 0..100.
✔✔What is the overview of composite types? - ✔✔Record, variant record, array, set,
pointer, lists, files.
✔✔What is type equivalence? - ✔✔Determining if two types are equivalent.
✔✔What is structural equivalence? - ✔✔Types with the same components put together
in the same way.
✔✔What is name equivalence? - ✔✔Types with the same name are equivalent.
✔✔Give an example of structural equivalence. - ✔✔Types with the same components
but different order may be equivalent.
✔✔What is the size of a boolean? - ✔✔1 byte.
✔✔What is the size of a character? - ✔✔1 byte (ASCII), 2 bytes (Unicode).
✔✔What is the size of an integer? - ✔✔Length may vary.
✔✔What is the size of a floating point number? - ✔✔Internally represented as sign,
mantissa, exponent.
✔✔What is name equivalence? - ✔✔Same name ↔ same type
, ✔✔What are the two types of name equivalence for handling type aliases? - ✔✔Strict
name equivalence vs. loose name equivalence
✔✔Give an example of handling type aliases. - ✔✔Celsius and Fahrenheit
temperatures should not be equivalent
✔✔When it comes to language rules, are college and school always equivalent? -
✔✔No, they may or may not be equivalent based on language rules
✔✔What does Ada allow the programmer to decide regarding aliases? - ✔✔Whether an
alias is a derived type or a subtype
✔✔What are the different cases of type conversion? - ✔✔Structurally equivalent types,
same representation, conceptual conversion, different sets of values, different
representations.
✔✔What may be involved in a type conversion? - ✔✔Additional code and checks.
✔✔What do examples in Ada demonstrate? - ✔✔Explicit conversions.
✔✔What is a non-converting type cast? - ✔✔Change of type without altering underlying
bits.
✔✔What are some examples of non-converting type casts? - ✔✔Memory allocation
algorithms, high-performance numeric computations.
✔✔What do most languages require for type compatibility? - ✔✔Type compatibility
rather than equivalence.
✔✔What is coercion in type compatibility? - ✔✔Implicit conversion if types are
compatible.
✔✔What are some examples of type compatibility and coercion? - ✔✔Examples from
Ada and C.
✔✔What can records do? - ✔✔Allow manipulation of data with heterogeneous types.
✔✔What are some examples of records? - ✔✔Field access, memory layout, packed
records in Pascal.
✔✔What can with statements do? - ✔✔Simplify field access within records.
✔✔What are some examples of with statements? - ✔✔Examples in Pascal, discussion
of potential problems and solutions, comparison with C pointer usage.