Struct A
Warmup
- Create a structure called
pqr
with fieldsx
,y
,z
, andw
.
Struct A
Given that:
x
andy
are numbersz
is a colorw?
is a boolean
-
Make a variable
ex1
that holds apqr
withx=10
,y=20
,z="blue"
, andw?
isfalse
. -
Make a variable
ex2
that has a posn representing (110, 80). -
Give the values of:
(posn? ex1)
(pqr? ex1)
-
Make
ex3
apqr
with different fields fromex1
. -
Write the inventory for
ex1
showing where every value comes from.- 10
- 20
- z
- false
-
Write a function that puts a “z” color circle at (x,y). Bonus: make the circle solid when
w?
is true and otherwise outline.- Example code using the information from
ex1
. - Work backwards to use a variable.
- Example code using the information from