CS 1101 - Cterm 10

Homework 5 - Lists of Structs, Structs with Lists

Due: Friday, February 5 at 5pm

Read the expectations on homework.

Assignment Goals


The Assignment

The recent disaster in Haiti has brought attention to the idea of "mobile giving", i.e. philanthropy through the use of the cell phone. Companies like mGive enlist non-profit agencies to register with them. Each agency is given a keyword and a short code. Donors can then text the keyword to the short code thus making a mobile donation through their cell phone (for example, texting HAITI to 90999 donates $10 to the American Red Cross). The donation is then charged to the donor's cell phone bill, collected from the cell phone carrier, and distributed to the non-profit.

In this assignment you will model information that is stored in the database of a mobile giving organization.

  1. Each donor is identified by the donor's cell phone number and the carrier (for example, "AT&T", or "Verizon"). Provide a data definition for a donor. Provide a data definition for a list-of-donor. Provide an example of a list-of-donor that contains at least 3 donors.

  2. Each agency is represented by the following information: the name of the agency (for example, "Red Cross"), the text message that donors will enter (for example "HAITI"), the number that donors will enter (for example, 90999), the amount of each donation that will be collected for this message/number, and a list of donors who have contributed to this message/number.

    Provide a data definition for an agency. Provide a data definiton for a list-of-agency. Provide an example of a list-of-agency that contains at least 3 agencies.

  3. Write the templates for all data definitions made in Problems 1 and 2.


What to Turn In

Save a copy of your work - you will use it for Homework 6. Using web-based turnin, turn in a single file containing all code and documentation for this assignment. Follow the naming conventions for naming your file.