Remember to follow the Expectations on Homework when preparing your solutions.
You do not have to write test cases for individual functions in this assignment. The last problem deals with testing.
create-person
that consumes a person's name and returns a new person with the given name (and no friends).
The new person should also be added to the network. You may assume the named person does not already exist in the network. (Make sure your function creates only one person.)
list-names
that consumes nothing and
produces a list of the names of all people in the network. Solve this problem
using accumulator-style programming.
connect-friends
that consumes two persons, and makes them each a friend of the other.
(A person A is a friend of person B if person A's friend list contains B and vice versa.) You may assume that the
given persons are not already friends. Your function should return void.
most-social
that consumes nothing and returns the person with the most friends
(resolve ties arbitrarily). Return "empty network" if network doesn't contain any persons.
You may use the DrRacket built-in function length that determines the length of a list.
remove-person
that consumes the name of a
person and removes the named person from the network. Of course, all occurrences of the named person should be removed from all friends lists.
;; show the initial contents of network "The network is initially empty" network ;; populate the network with one person... (define Glynis (create-person "Glynis")) "Here's the network with Glynis in it" network ;; (...etc.)
Here is the grade sheet that the TAs will use when they grade Homework 11.
Using web-based turnin, turn in a single file containing all code and documentation for this assignment. Follow the naming conventions for file names. Please make sure both partners' names and wpi login names are listed in a comment at the top of the file.