Struct A
Warmup
- Create a structure called
pqrwith fieldsx,y,z, andw.
Struct A
Given that:
xandyare numberszis a colorw?is a boolean
-
Make a variable
ex1that holds apqrwithx=10,y=20,z="blue", andw?isfalse. -
Make a variable
ex2that has a posn representing (110, 80). -
Give the values of:
(posn? ex1)(pqr? ex1)
-
Make
ex3apqrwith different fields fromex1. -
Write the inventory for
ex1showing 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