CPSC 110 Lecture 4: CPSC lecture 4.docx
ferrari12 and 39375 others unlocked
23
CPSC 110 Full Course Notes
Verified Note
23 documents
Document Summary
Atomic non-distinct: -many possible values (could be infinite), e. g. interval. Atomic distinct: a distinct value e. g. a specific string like red is distinct, but a string itself (no other definition) is non-distinct e. g. a single number is distinct but an interval is non-distinct (even if restricted to natural numbers) When defining the data, you say datadefinition is one of: (list your stuff) e. g. ubcdegree is one of :-ba -bsc -bcom. Do not use else for enumeration bc you"re listing all the possibilities anyway. Enum describes data of 2+ subclasses, where all are distinct terms. An itemization describes data comprised of 2 or more subclasses, at least one of which is not a distinct item.