Bahria University,
Karachi Campus
COURSE: CSL-210 OBJECT ORIENTED PROGRAMMING
TERM: SPRING 2025, CLASS: BSE- 2 (C)
PROJECT NAME : Mood Swing
Submitted By:
S.NO Student Name Enrollment #
1 Arman Haider 02-131242-
116
2 Abdul Ahad 02-131242-
110
3 Saad 02-131242-
118
4 Malaika 02-131242-
067
Submitted to:
Engr.Muhammad Faisal/ Engr. Saniya Sarim
Signed Remarks: Score:
1-INTRODUCTION:
In today's dynamic and emotionally charged world, ensuring mental and emotional
well-being is crucial. One of the proven strategies to uplift mood is through
engaging with enriching eBooks and informative articles. To enhance this
experience, Mood Swing introduces an intelligent AI-powered recommendation
system that adapts to users' emotional states. The application allows users to express
their current mood and receive tailored content suggestions, all while incorporating
object-oriented programming (OOP) practices for robustness and scalability.
2-OOP CONCEPTS USED IN PROJECT:
The application design strictly adheres to Java OOP principles, as outlined below:
Abstraction:
The application interacts with the OpenAI API and only extracts relevant
content (eBooks and articles), abstracting away other response data.
Inheritance:
A class hierarchy is used where User is the base class and PremiumUser and
LocalUser inherit from it.
Encapsulation:
The token-based access for Premium users is encapsulated within the
PremiumUser class, ensuring secure, controlled usage.
Access Modifiers:
Premium users have a private ID attribute to maintain identity protection and
class-level data restriction.
3-UML CLASS DIAGRAM:
4-FEATURES OF YOUR PROJECT:
1. Mood-based Recommendations:
Users receive AI-curated content based on their emotional input.
2. OOP-Based Architecture:
Fully structured using Java’s OOP principles.
3. Token System for Premium Users:
Premium users operate on a token-based system that restricts excessive use.
4. Premium User Benefits:
o Unique private user ID for secure access.
o More content access via tokens.
5. Clean User Interface (JavaFX):
Intuitive design for mood input and result display.
6. Secure HTTP API Integration:
Uses Java’s HttpClient with proper error handling and security.
5-CODE:
6-INTERFACE:
7-CONCLUSION:
Mood Swing exemplifies how emotional intelligence can be combined with
artificial intelligence to create personalized user experiences. The application is
developed using strong object-oriented design principles ensuring maintainability
and scalability. With features like mood-based recommendations, token systems,
premium discounting, and secure AI integration, Mood Swing not only fills a
technological gap but also contributes to users' mental and emotional well-being in
a meaningful way.