100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

CPSC 110 Midterm 1 with Complete Solutions

Rating
-
Sold
-
Pages
2
Grade
A+
Uploaded on
05-03-2025
Written in
2024/2025

CPSC 110 Midterm 1 with Complete Solutions

Institution
CPSC
Course
CPSC

Content preview

CPSC 110 Midterm 1 with Complete Solutions
What are the examples for an Enumeration Data Definition? - ANSWER-;;<examples
are redundant for enumerations>

What are the template rules for an atomic non-distinct Data Definition? -
ANSWER-;;Template rules used:
;; -atomic non-distinct

What are the template rules for an Interval Data Definition that includes numbers 1-100?
- ANSWER-;;Template rules used:
;; - atomic non-distinct: Natural[1,100]

What are the template rules used for an Enumeration Data Definition for Names that
include Amelia, Briana, Alma and Charlotte? - ANSWER-;;Template rules used:
;; -one of: 3 cases
;; -atomic distinct value: "Amelia"
;; -atomic distinct value: "Briana"
;; -atomic distinct value: "Alma"
;; -atomic distinct value: "Chelsea"

What are the template rules used for an itemization Data Definition where TrafficLight is
either false, red, yellow or green? - ANSWER-;;Template rules used:
;; -one of: 4 cases
;; -atomic distinct: false
;; -atomic distinct: "red"
;; -atomic distinct: "yellow"
;; -atomic distinct: "green"

What comes after the Interpretation in a Data Definition? - ANSWER-Examples

What comes after the type comment in a Data Definition? - ANSWER-Interpretation

What is the template for an atomic non-distinct data definition for StreetName? -
ANSWER-(define (fn-for-street-name sn)
(... sn))

What is the template for an Enumeration Data Definition for Names that include Amelia,
Briana, Alma and Charlotte? - ANSWER-(define (fn-for-names n)
[(string=? n "Amelia") (...)]
[(string=? n "Briana") (...)]
[(string=? n "Alma") (...)]
[(string=? n "Charlotte") (...)]

What is the template for an itemization Data Definition where TrafficLight is either false,
red, yellow or green? - ANSWER-(define (fn-for-traffic-light tl)

Written for

Institution
CPSC
Course
CPSC

Document information

Uploaded on
March 5, 2025
Number of pages
2
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CLOUND Exam
View profile
Follow You need to be logged in order to follow users or courses
Sold
620
Member since
2 year
Number of followers
389
Documents
11481
Last sold
7 hours ago
PROF MM

HELLO WELCOME TO THIS PAGE WHERE YOU WILL FIND ALL EXAMS ,STUDY GUIDE ,CASE, TESTBANKS AND ANY OTHER STUDY MATERIALS,

4.0

122 reviews

5
64
4
16
3
29
2
3
1
10

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions