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]
École, étude et sujet
- Établissement
- Liberty University
- Cours
- CPSC 110
Infos sur le Document
- Publié le
- 13 mars 2023
- Nombre de pages
- 3
- Écrit en
- 2022/2023
- Type
- Examen
- Contient
- Questions et réponses
Sujets
-
cpsc 110 midterm 1 questions with complete solutions
Document également disponible en groupe