ch13 Flashcards
User-defined data type
a data type based on an existing data type or other data types that have been defined by a programmer
Describe the purpose of a user-defined data type
To create a new data type (from existing data types). and to allow data types not available in a programming language to be
constructed
Non-composite data type
a data type that does not reference any other data types.
Enumerated data type
a non-composite data type defined by a given list of all possible values that has an implied order //// A (user-defined non-composite) data type with an ordered list of possible values
Pointer data type
a non-composite datatype that uses the memory address of where the data is stored //// A user-defined non-composite data type used to reference a memory location
Set
a given list of unordered elements that can use set theory
operations such as intersection and union
Explain why the properties have been set to PRIVATE
To ensure that attributes can only be accessed by the class’s own methods
To enforce encapsulation// ensure theyre hidden
Compare sequential and serial methods of file organisation
- In both serial and sequential files records are stored one after the other
- and need to be accessed one after the other
- Serial files are stored in chronological order
- Sequential files are stored with ordered records
- and stored in the order of the key field
State the most suitable method of file access when a record is referenced by a unique address on a disk-type storage medium.
Direct (access)
State the most suitable method of file access when a bank stores its data records in ascending order of account number.
Sequential (access)
Describe how records are organised and accessed in a sequential file
records are stored in a particular order
MP2 the order is determined based on the value in a key field
MP3 records are accessed one after the other
MP4 records can be found by searching from the beginning of the file, record by record,
MP5 … until the required record is found or key field value is exceeded.
Serial file organisation
a method of file organisation in which records of data are physically stored in a file, one after another, in the order they were added to the file
Sequential file organisation
a method of file organisation in which records of data are physically stored in a file, one after another, in a given order
Random file organisation
a method of file organisation in which records of data are physically stored in a file in any available position; the location
of any record in the file is found by using a hashing algorithm on the key field of a record.
Hashing algorithm (file access)
a mathematical formula used to perform a calculation on the key field of the record; the result of the calculation gives the address where the record should be found.