Question: Design and implement an application that maintains the data for a simple social network. Each person in the network should have a profile that contains

Design and implement an application that maintains the data for a simple social network. Each
person in the network should have a profile that contains the persons name, current status, and a
list of friends. Your application should allow a user to join the network, leave the network, create
a profile, modify the profile, and add friends.
Following are the specifications:
Design a class for representing a persons name (e.g. Name) with instance variables for firstname
and lastname, one or more constructors, and related getter and setter methods.
Design a class for representing a persons profile (e.g. Profile) with instance variables for
persons name (e.g. private Name profileName;), status (a String), and a list of friends profiles
(e.g. private AList friends;). You may use a list implementation of your choice (e.g. an
array-based list or a linked list. See Chapters 10,11, and 12).
Have one or more constructors and related getter and setter methods.
Have a method for adding a friend (e.g. addFriend) to the profile list. This method should
receive the new friends profile as an argument.
Have a method for removing a friend (e.g. removeFriend) from the profile list. This
method should receive the friends profile that has to be removed as an argument.
Have a display method that prints the profile (name, status, and friends).
Design a class for managing the profiles on the social network (e.g. ProfileManager). Have an
instance variable that refers to a list of all profiles (e.g. private AList allProfiles;).
Have a constructor that initializes the profile list to an empty list.
Have a method for adding a profile to the profile list. The profile to be added should be
passed as an argument to this method.
Have a method for removing a profile from the profile list. The profile to be removed
should be passed as an argument to this method.
Have a method for creating a friendship between two profiles. This method should
receive two profiles as arguments. The first profile (argument) should be added as a
friend to the second profile and viceversa (e.g. b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!