Java Social Network Project
Java Social Network Project
(Java Social Network Project)
java programming.
there are two project!
write it in java! This is my final project,If u need any help,just let me know.if you dont know how to do it,pls let me know asap!thx
The popular social network Facebook TM was founded by Mark Zuckerberg and his classmates at Harvard University in 2004. At the time, he was a sophomore studying computer science.
1.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 person’s name, optional image, 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, search for other profiles, and add friends.
2.Repeat Project above to create a simple social network. Use a graph to track the friend relationships among members of the network. Add a feature to enable people to see a list of their friends friends.
Project 1: Simple Social Network (Basic Profile Management)
In this project, the goal is to design and implement a social network that maintains user profiles. The features include joining and leaving the network, creating and modifying profiles, searching for profiles, and adding friends. Below is the conceptual breakdown:
Class Design:
- Person Class: Each person will have attributes like name, optional image, current status, and a list of friends.
- Fields:
name
,image
,status
,friendsList
(List of Person objects) - Methods:
createProfile()
: Creates a new user profile.modifyProfile()
: Modifies a user’s status or image.addFriend()
: Adds another person to the user’s friend list.removeFriend()
: Removes a person from the friend list.searchProfile()
: Search for another person’s profile by name.joinNetwork()
: Adds a person to the social network.leaveNetwork()
: Removes a person from the social network.
- Fields:
- SocialNetwork Class: This class will maintain a collection of all the people in the network.
- Fields:
networkMembers
(List of Person objects) - Methods:
addPerson()
: Adds a new person to the network.removePerson()
: Removes a person from the network.
- Fields:
This structure allows for creating and managing profiles, modifying them, and managing friends. A user can join the network, create a profile, and add friends.
Project 2: Enhanced Social Network Using Graph Structure (Friendship Network)
This project builds upon the first one, with the addition of using a graph structure to track friendships. It also includes a feature to show the “friends of friends.”
Class Design:
- Graph Class: This will store the social network in a graph format where each node is a person, and edges represent friendships.
- Fields:
adjacencyList
(Map of Person to List of Friends) - Methods:
addFriendship(Person person1, Person person2)
: Adds a friendship edge between two people.getFriendsOfFriends(Person person)
: Finds the friends of a person’s friends.
- Fields:
- SocialNetworkGraph Class: This extends the previous network but uses a graph data structure for tracking relationships.
- Fields:
graph
(Graph object) - Methods:
getFriendsList(Person person)
: Returns a list of friends for a person.getFriendsOfFriendsList(Person person)
: Returns the list of friends of the friends of a person.
- Fields:
- Add Friendship: The application will store friendships as undirected edges between two nodes (people) in the graph.
- Friends of Friends: This feature will return a list of people who are friends of a user’s friends.
Conclusion and Link to the Project:
This project can be expanded further by adding features like profile pictures, status updates, and a user interface (GUI) to make the network more interactive. If you are integrating a UI, you might want to use JavaFX or Swing for graphical interfaces.
For the detailed report and documentation of the project, including any necessary citations in APA format, it’s essential to provide a technical explanation of how each feature was implemented, why certain data structures (like graphs and lists) were chosen, and how the program can be extended or optimized. You can structure the document like this:
- Introduction: Explain the purpose and importance of the social network.
- System Design: Discuss the classes and methods used.
- Implementation: Include code snippets and explain the logic behind key methods.
- Testing & Features: Describe the functionalities tested and how the features work in the application.
- Conclusion: Summarize the accomplishments of the project and its future potential.
References (APA format):
- Oracle. (n.d.). Java Documentation. Retrieved from https://docs.oracle.com/en/java/
- Albahari, J., & Albahari, B. (2018). C# 7.0 in a Nutshell: The Definitive Reference. O’Reilly Media, Inc.