A simulation of Facebook’s core functionality using Object-Oriented Programming principles in Java.
This project mimics Facebook's backend logic for managing users, posts, friendships, and private messaging — all built from scratch using core OOP concepts. It also supports persistent file storage and user interaction through the console.
- User registration and login with credentials validation
- Post creation with privacy settings (Public/Friends-only)
- Commenting and replying to posts/comments
- Friend requests, mutual friends/posts detection
- Operators
+and&overloaded for mutual content - Messaging system between users
- Restricted vs. regular friend access
- Role-based friend visibility and trust scores
- File-based storage and retrieval of data
- Full exception handling
- Java
- OOP (Inheritance, Polymorphism, Encapsulation, Abstraction)
- UML Class Diagrams
- File I/O
- Exception Handling
UserFriendShipPost,Comment,ReplyMessage,ConversationFriendRequest,Notification
📁 src ├── User.java ├── FriendShip.java ├── FriendRequest.java ├── Post.java ├── Comment.java ├── Reply.java ├── Messages.java ├── Conversation.java ├── Main.java
- Clone the repository
- Open project in any Java IDE (e.g. IntelliJ or Eclipse)
- Run
Main.java - Follow the console instructions
This project was built to practice:
- Class design and interaction
- Real-life system simulation
- Deep use of file I/O and validation
- Robust exception handling and test-driven input