CPSC 110 Midterm 1 QUESTIONS WITH COMPLETE SOLUTIONS
What type of Data definition would you use for names of cities? correct answer: Atomic non-distinct What is the type comment for an atomic non-distinct data definition for StreetName? correct answer: ;;StreetName is String What is the template for an atomic non-distinct data definition for StreetName? correct answer: (define (fn-for-street-name sn) (... sn)) What comes after the type comment in a Data Definition? correct answer: Interpretation What comes after the Interpretation in a Data Definition? correct answer: Examples What are the template rules for an atomic non-distinct Data Definition? correct answer: ;;Template rules used: ;; -atomic non-distinct What type of Data definition would you use for a certain amount of seat numbers? correct answer: Interval What is the type comment for an Interval data definition for Number that goes from 1 to 100? correct answer: ;;Number is Natural[1,100] What are the template rules for an Interval Data Definition that includes numbers 1-100? correct answer: ;;Template rules used: ;; - atomic non-distinct: Natural[1,100]
Written for
- Institution
-
Liberty University
- Course
-
CPSC 110
Document information
- Uploaded on
- March 13, 2023
- Number of pages
- 3
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cpsc 110 midterm 1 questions with complete solutions
Also available in package deal