Programming Assignment 10


Due: Week of Nov. 14 in lab


Using inheritance, write a basic social network. Your network will resemble some elements of Facebook. There should be an Account super class. Two types will extend Account, Person and Page. There should be a Relationship super class. Two types will extend Relationship, Friend and Follow. You should also have a client program for the social network that defines the main.

Name the files Account.java, Person.java, Page.java, Relationship.java, Friend.java, Follow.java, and SocialNetwork.java.

Other details:

Example output of SocialNetwork's test:
Person
Account name: Jory Denny
Number of friends: 1
Number of follows: 1
Friends
Friend. Relationship created Mon Nov 14 10:15:13 EST 2016. With Zachary Pollock.
Follows
Follow. Relationship created Mon Nov 14 10:15:13 EST 2016. Following Zen-Do-Kai Karate.

Person
Account name: Zachary Pollock
Number of friends: 1
Number of follows: 1
Friends
Friend. Relationship created Mon Nov 14 10:15:13 EST 2016. With Jory Denny.
Follows
Follow. Relationship created Mon Nov 14 10:15:13 EST 2016. Following Zen-Do-Kai Karate.

Page
Account name: Zen-Do-Kai Karate
Number of followers: 2

Bonus. Provide an example of polymorphism in your product, either with relationships or accounts. Other extensions: provide a feed and post mechanism for accounts using Strings.


Grading

Each assignment is graded out of 100% based on a combination of the criteria listed in the assignment description and programming style (e.g., good comments and naming) -- following instructions is extremely important in computer science, train yourself to think like the computer; programming style is important to be able to communicate your solutions to another programmer; both of which you are graded upon.

Specific instructions. Failure to do these steps will result in a loss of points.

Turn in instructions. Each programming assignment is to be turned in before your lab section. You will turn in a soft copy of the assignment (.java or .zip for multiple java files) through blackboard. You will also turn in a hard copy of the assignment in your lab section with a signed coverpage (each program should start a new page of the hard copy).

If there are any discrepencies in grades please see the instructor during his office hours or by appointment (do not discuss with the lab assistants or graders).