On this page, you will develop an Abstract Data Type to store and access name data (first-name, last-name, etc.).
name
ADT and two new selectors: one to report the name they way it appears for the user: first-name last-name; and one to report the name so we can sort it: last-name comma first-name.name
constructor. It should accept a first name and last name as input and report the whole name as a list:join
. Test them with your name
constructor.sorting form of name
block together with their contact
constructor. They were expecting their code to report "Anderson, Jasmine", but it didn't work.contact
constructor expect a list item, as shown here:name
constructor.address
constructorstreet address from address
, city from address
, state from address
, and zip from address
.contact
constructor expect a list.name
and address
constructors, and try selecting specific data (such as the city) from a contact
.name
types, with different constructors and selectors?name
type, but it'll have variants, and we'll include a type tag along with the given and family parts to indicate given-first (as in the US) or family-first (as in China). Omar can add more variants later if he wants.name
block, and click on the orange type variable in its hat block.type from name
. We're going to need the same type selector for other ADTs also, so call it type tag
.
join words
instead ofjoin
? Someone needs to build this project based on the description here (not from their own ideas) to make sure that what we are doing makes sense. I can't do it. I tried. --MF, 7/13/17