CH16 Flashcards
(12 cards)
describe the purpose of a user-defined data type (2)
it allows programmers to create new data types from existing data types and helps to extend the flexibility of the programming language
explain the reason why binary numbers are stored in normalized form (3)
- to store the maximum range of numbers in the minimum number of bytes
2.enables very large numbers to stored with accuracy
3.avoids the possibility of many numbers having multiple representations
explain what is meant by a user-defined composite data type. Include an example (3)
its a data type that is constructed by a programmer and references at least one other data type, the data types can be primitive or user defined. E.g: A class
explain why certain properties are set to private in programs (2)
- to ensure they’re hidden
- to ensure that attributes can only be accessed by the Class’s own methods
what is meant by an enumerated data type
a user-defined non composite data type with an ordered list of possible values
what is meant by the term pointer data type
a user-defined non composite data type that’s used to reference a memory location
state when underflow occurs in a binary floating-point system (2)
when following a logical operation and the result is too small to be precisely represented in the available system
explain why a binary representation is sometimes only an approximation to the real number it represents (3)
1- real numbers can have a fractional part such as 1/2
2-the fixed length of storage means that you can’t store very large numbers
3- binary numbers represent numbers based on the powers of 2 with limited fractional representations such as 1/2, 1/4, 1/8
describe what is meant by a composite data type (2)
a user-defined data type that is a collection of data that can consist of multiple elements of different data types
describe what is meant by non-composite data type (2)
I can be defined without referencing another data type, it can be a user defined data type
outline what is meant by the term collision (2)
a collision is when 2 values pass through a hashing algorithm and result in the same hash value, this is an issues because 2 records cannot occupy the same address
explain how a collision can be dealt with when writing records to a random file (3)
1- a process of collision resolution is used
2- start at the original hashed storage space
3- go through the following spaces in a linear fashion