Assignment 1
Assignment 1
In a social network, there are a set of nodes. Each node can be of type: individual, group, business,
or organisation. All nodes have a unique id (int), a set of links to other nodes, a name (String), a
creation date, and a set of uploaded or posted content. A content can be implemented as a string
object, which can be reposted multiple times without duplication. Individuals can optionally have
birthdays in addition to all the node attributes. Businesses and organisations have location (2D
coordinates) in addition to all node attributes. Groups and organisations can have linked
individuals as members. Businesses can have individuals as owners or customers. Businesses can
also be members of groups. No other forms of links are allowed, e.g. a business cannot be owner
of another business, or a group cannot be a member of an organisation.
Submit a design and implementation of the above program in C. You are allowed to use
structures, but not classes.
All structure defintions should be first in a header file named social.h followed by
prototypes of related functions. The function definitions and global variables if any should be
defined in a c file called social.c. A comment in the beginning of the header file should
clearly explain the role of each structure and function in program. 20 marks should be given
based on this comment.
10 marks will be given based on readability (indentation etc.) of the code and appropriate
naming of variables / structures.