Contact list

Putting it all together

You will make several ADTs.

You will wire up buttons to trigger the app’s features.

You will ask the user for input.

You will create a global variable that holds a list of values created using your ADT.

You will use higher-order blocks to find data in your list.

Abstract Data Types galore

The one new thing in this project is you will create multiple ADTs for representing different kinds of data.

And, by the end of the project, you will store instances of two of the ADTs inside instances of the the main ADT.

Wiring the buttons

Unlike in previous projects, the preexisting sprites are not wired up to do anything except position themselves when the green flag is clicked.

Should each button contain its own code? Or do you want to add a sprite that handles everything and is triggered by the buttons via

broadcast or tell to.

Getting input from the user

Once again we will have to deal with the awkward ask and wait and answer blocks.

This time you will build several reporters whose job is to ask the user for various pieces of input you need to construct an instance of an ADT.

Later in the project you will build reporters that ask several questions (using other reporters you’ve built) and then report an instance of one of your ADTs.

Global variable

Like other projects like Flashcards and Survey, you will need a global variable to hold instances of your ADT.

This time, you are responsible for creating the global variable and initalizing it to an empty list.

Also, one of the features you will build is a button that clears the existing list, after confirming with the user.

Higher-order blocks

In the last two pages of the lab you will use all three of the higher-order blocks you’ve learned about during the Survey project.

keep items from list

map over list

combine list using

There’s a review of all three on page 5 of the lab.

When you’re done

LOL, you’re never done.

Can you spice up the user interface?

Can you enhance your user-input blocks to make sure the data you use is valid?

Is your code as clear and well-organized as you can make it?