Birthday List

Will is not here this month because he is attending his daughter’s birthday party. In light of this we are going to help another little girl named Lisa to plan out her birthday.

Challenge

For this challenge we will be reading and writing to a file, organizing the information in the file, and presenting it to the user. This will involve creating a user interface which can be done in the console or as an html page or however you decide to build it.

This will also take some planning on your part as the developer in creating an architecture for your application. Each level presents you with what Lisa wants your app to do. As the developer you decide how to design the app to accomplish these tasks.

Creating a Test Case

Like in past challenges we’ll be using our tests to drive our development. No matter the level you choose to work with write a test case before you start your code. Then write just enough code to pass the test. Once you have passing code refactor to pass other test cases.

Level 1

To make sure she gets the toys she wants and cloths that fit Lisa has asked you to create an app that lets her enter and store a birthday wish list. She wants to be able to enter the items she wants, their type (toy, clothes, supplies, etc.) and any relevant information like size or color.

A Step Further

Once the wish list is created she needs to be able to print it out for her friends and family to see what she wants. If you have time Lisa would like for the toys to be listed on top, but don’t tell her mom that.

Level 2

Lisa needs your help to organize who she is inviting to her party. She will need to enter their name, address to send the invitation, relationship (family or friend), and their RSVP.

Once the table is created she’ll need to be able to print it out so that her mom can mail the invitations. Lisa’s mom told her that family comes first but it would be easier to mail if they are organized by city and state.

A Step Further

At the party Lisa needs to be able to track the gifts she has received and information about those gifts such as type of gift (toy, cloths, etc.). She also wants to know who gave her which gifts.

Hint: Adding a unique index to these tables will help track which records are associated.

Level 3

Now that the party is over Lisa doesn’t would rather play with her toys than write the thank you cards. She asked you to help her out by creating an app that will write the thank you card for her and include the name of the person attending along with the gift they gave.

Since her mom said family comes first have the family members thank you cards display first then the friends that gave her toys. Don’t forget about the friends and family that came to the party but didn’t bring a gift.

Sample Thank You Text

1
2
3
4
5
6
7
8
Grandma Ester
123 Main Street
Somewhere, TN 38583
Thank you Grandma Ester for coming to my birthday party and for the pink socks you gave me. I really like them.
Love,
Lisa

Hint: Use the information about the gift such as color to add more personalization to the message. This works with some types but not others.

A Step Further

Lisa really liked the wish list you helped her create but wants to know who gave her items from her list so that she knows who to send the list to next year. Also now that her birthday is over she wants to save the list for next year but remove the items she’s already received.