IT61J
IT61J
A PROJECT REPORT
Submitted by
DECEMBER - 2024
i
K. RAMAKRISHNAN COLLEGE OF ENGINEERING
(An Autonomous Institution, affiliated to Anna University Chennai and Approved by AICTE, New Delhi)
BONAFIDE CERTIFICATE
Certified that this project report titled “NEWS PORTAL SYSTEM IN JAVA” is
the bonafide work of R NAVIN PRASATH (8115U23IT061), who carried out the
project work under my supervision. Certified further, that to the best of my knowledge
the work reported here in does not form part of any other project report or dissertation
onthe basis of which a degree or awardwas conferred on an earlier occasion on this
or any other candidate.
SIGNATURE SIGNATURE
Dr.S.Manikandan M.E., Ph.D., Mrs. S. SathyaPriya, M.E,
ii
DECLARATION
I declare that the project report on “NEWS PORTAL SYSTEM IN JAVA” is the
result of original work done by me and to the best of my knowledge, similar work has
not been submitted to “ANNA UNIVERSITY CHENNAI” for the requirement of
Degree of BACHELOR OF TECHNOLOGY. This project report is submitted on the
partial fulfillment of the requirement of the award of the degree of BACHELOR OF
TECHNOLOGY.
Signature
R NAVIN
PRASATH
Place: Samayapuram
Date:
iii
ACKNOWLEDGEMENT
iv
VISION OF THE INSTITUTION
VISION
MISSION
v
PROGRAMME EDUCATIONAL OBJECTIVES (PEOs)
PEO2: To promote collaborative learning, think logically and develop the spirit of
teamwork to understandand solve technical issues and to build optimal solutions.
PEO3: To equip students with better knowledge on hardware and software systems
by applying theirtechnical skills to solve real world problems.
engineeringfundamentals,andanengineeringspecializationtothesolutionofcomplex
engineeringproblems.
2. Problem analysis: Identify, formulate, review research literature, and analyze
problems and design system components or processes that meet the specified needs
with appropriate consideration for the public health and safety, and the cultural,
societal, and environmental considerations.
4. Conduct investigations of complex problems: Use research-based knowledge
andresearchmethodsincludingdesignofexperiments,analysisandinterpretationofdat
a,andsynthesisofthe information to provide valid conclusions.
vi
5. Modern tool usage: Create, select, and apply appropriate techniques, resources,
andmodernengineeringandITtoolsincludingpredictionandmodelingtocomplexengi
neeringactivitieswith an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual
knowledgetoassesssocietal,health,safety,legalandculturalissuesandtheconsequentr
esponsibilitiesrelevanttothe professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional
engineeringsolutionsinsocietalandenvironmentalcontexts,anddemonstratetheknow
ledgeof,andneedfor sustainable development.
8. Ethics:Applyethicalprinciplesandcommittoprofessionalethicsandresponsibilitiesa
with the engineering community and with society at large, such as, being able to
comprehend and write effective reports and design documentation, make effective
presentations, and give and receive clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding
of the engineering and management principles and apply these to one’s own work, as
a member and leader in a team, to manage projects and in multidisciplinary
environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability
to engage in independent and life-long learning in the broadest context of
technological change.
vii
PROGRAM SPECIFIC OUTCOMES (PSOs)
viii
ABSTRACT
ix
ABSTRACT WITH Pos AND PSOMAPG
ABSTRACT POs PSOs
MAPPED MAPPED
The News Portal System is a Java-
PO 6 -2 PSO 1-3
based application designed to provide a PO 8 -3 PSO 2-3
PO 9 -3
dynamic platform for users to access
PO 10 -2
and manage news articles. It facilitates PO 11- 3
two main roles: admin and regular
users. The system allows users to
register, log in, and view articles, while
admins can post, view, and delete
articles, as well as manage article
categories. The user interface is created
using Java Swing, providing an
interactive environment for users to
navigate. The application supports
features such as user authentication,
article management, dynamic category
selection (with custom category input
for admins), and a user-friendly article
display system. The system ensures
data security and user accessibility
through efficient password
management and role-based access.
The backend utilizes basic data
structures such as HashMaps and
ArrayLists to store user data, admin
status, and articles.
Note: 1- Low, 2-Medium, 3- High
x
TABLE OF CONTENTS
ABSTRACT X
1 INTRODUCTION 1
1.1 Objective 1
1.2 Overview 3
2 PROJECT METHODOLOGY 5
3 MODULE DESCRIPTION 7
4.1 Conclusion 8
REFERENCES 10
APPENDIX B (SCREENSHOTS) 25
xi
CHAPTER 1
INTRODUCTION
1.1 Objective
The objective of the News Portal System project is to develop a robust and user-
friendly platform that enables efficient management and distribution of articles and
news content. This project aims to cater to both administrators and users, providing
a seamless experience for creating, editing, and viewing articles. Designed with
scalability and functionality in mind, the system serves as a practical application
of core programming and design concepts in Java. By working on this project,
developers can enhance their understanding of object-oriented programming, GUI
development, and event-driven design while building a real-world application.
1
5. Category Integration:
To implement an article categorization system, including a custom category
option, ensuring effective content organization and searchability.
6. Responsive Event Handling:
utilize Java's event handling capabilities for dynamic interaction and smooth
operation across all user actions.
7. User Interface Design:
To design a clean and intuitive interface using Java Swing, ensuring easy
navigation and an engaging user experience.
8. Scalability and Flexibility:
To ensure the system can accommodate additional features like advanced
search, filters, or multi-language support in the future.
9. Code Quality and Documentation:
To write well-structured, optimized, and documented code that adheres to
programming best practices, making it easy to maintain and expand.
10. Testing and Debugging:
To thoroughly test the system for functionality, usability, and security,
ensuring a bug-free and seamless user experience.
11. User Feedback and Improvement:
To incorporate feedback from users to refine the system and introduce
enhancements based on real-world use cases.
1
1.2 Overview
1
1.3 Java Programming Concepts
The News Portal System employs Swing, a robust library for building graphical
user interfaces in Java, to create an intuitive and responsive user experience. JButton
and ActionListener, Dynamic Components, Interactive Feedback.
3. Collection(ArrayList):
The News Portal System utilizes JAVA collection to manage and organize data
efficiently. ArrayList for article Storage ,HashMap for category management and
Efficient search through the ArrayList of articles.
4
1
CHAPTER 2
PROJECT METHODOLOGY
System architecture refers to the foundational blueprint that defines the structure,
behavior, and interconnections of various components within a system. In the context
of the News Portal System, the architecture ensures seamless integration of content
management, user interaction, and data handling, enabling a robust platform for
delivering news and updates.
2.1.1 High-LevelSystemArchitecture
The high-level system architecture of the News Portal System
consists of the following primary components:
(i) UserInterface(UI)
(ii) Application Logic
a. UserInterface (UI)
The User Interface serves as the interaction point between users (admins and
viewers) and the system. Tools to create and manage articles, categorize news, and
update content. dynamic section to add or customize article categories, including
support for custom category creation.
b. ApplicationLogic
The Application Logic handles the core operations of the system, ensuring that all
functionalities work seamlessly Processing and storing articles added by
administrators. Dynamic addition and customization of categories, ensuring flexible
content organization. Role-based access, allowing administrators to manage content
and viewers to browse articles.
1
5
2.2 Block Diagram
Include a diagram that visually represents the system architecture. The diagram
should depict how each component interactswith the others. For example, it can show
the User Interface sending requests to the Application Logic, which in turn interacts
with the DataManagement Layer and the Storage Layer.
16
CHAPTER 3
MODULE DESCRIPTION
17
CHAPTER 4
CONCLUSION & FUTURE SCOPE
4.1 CONCLUSION
8
1
4.2 FUTURE SCOPE
The future scope of the News Portal System focuses on leveraging emerging
technologies to improve functionality, scalability, and user engagement.
Incorporating Artificial Intelligence (AI) can facilitate personalized article
recommendations based on user preferences and reading habits, while Machine
Learning algorithms can analyze user behavior to optimize content delivery.
Transitioning to a cloud-based platform would ensure seamless data
synchronization and accessibility for both users and administrators across
different devices and locations.Mobile application development is another area of
growth, enabling users to access articles, manage categories, and perform searches
effortlessly on their smartphones. Integration with external APIs, such as those
from social media platforms and live news feeds, can broaden the platform's
content base and improve real-time updates. The implementation of advanced
analytics tools would provide insights into user engagement, article popularity,
and emerging trends, helping administrators make data-driven decisions..
9
1
REFERENCES:
10 1
APPENDIX A(SOURCE CODE)
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.util.HashMap;
11
try {
NewsPortalSystem window = new NewsPortalSystem();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
});
}
public NewsPortalSystem() {
userDatabase = new HashMap<>();
adminDatabase = new HashMap<>();
articles = new ArrayList<>();
initialize();
}
13
gbc.gridx = 0;
gbc.gridy = 0;
gbc.gridwidth = 2;
loginPanel.add(titleLabel, gbc);
gbc.gridwidth = 1;
gbc.gridy = 1;
loginPanel.add(usernameLabel, gbc);
gbc.gridx = 1;
loginPanel.add(usernameField, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
loginPanel.add(passwordLabel, gbc);
gbc.gridx = 1;
loginPanel.add(passwordField, gbc);
gbc.gridx = 0;
gbc.gridy = 3;
loginPanel.add(loginButton, gbc);
gbc.gridx = 1;
gbc.gridy = 3;
loginPanel.add(registerRedirectButton, gbc);
frame.getContentPane().removeAll();
frame.getContentPane().add(loginPanel);
frame.revalidate();
frame.repaint();
14
}
gbc.gridx = 0;
gbc.gridy = 0;
gbc.gridwidth = 2;
registerPanel.add(titleLabel, gbc);
gbc.gridwidth = 1;
gbc.gridy = 1;
registerPanel.add(usernameLabel, gbc);
gbc.gridx = 1;
registerPanel.add(registerUsernameField, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
registerPanel.add(passwordLabel, gbc);
gbc.gridx = 1;
registerPanel.add(registerPasswordField, gbc);
gbc.gridx = 0;
16 gbc.gridy = 3;
registerPanel.add(isAdminCheckBox, gbc);
gbc.gridx = 1;
registerPanel.add(registerButton, gbc);
gbc.gridx = 1;
gbc.gridy = 4;
registerPanel.add(loginRedirectButton, gbc);
frame.getContentPane().removeAll();
frame.getContentPane().add(registerPanel);
frame.revalidate();
frame.repaint();
}
17
categoryComboBox = new JComboBox<>(new String[]{"Politics",
"Sports", "Technology", "Other"});
customCategoryField = new JTextField(15);
customCategoryField.setVisible(false);
categoryComboBox.addActionListener(e -> {
if (categoryComboBox.getSelectedItem().equals("Other")) {
customCategoryField.setVisible(true);
} else {
customCategoryField.setVisible(false);
}
});
18 19
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(10, 10, 10, 10);
gbc.gridx = 0;
gbc.gridy = 0;
gbc.gridwidth = 2;
adminPanel.add(titleLabel, gbc);
gbc.gridwidth = 1;
gbc.gridy = 1;
adminPanel.add(articleTitleLabel, gbc);
gbc.gridx = 1;
adminPanel.add(articleTitleField, gbc);
gbc.gridx = 0;
gbc.gridy = 2;
adminPanel.add(categoryLabel, gbc);
gbc.gridx = 1;
adminPanel.add(categoryComboBox, gbc);
gbc.gridx = 1;
gbc.gridy = 3;
adminPanel.add(customCategoryField, gbc);
gbc.gridx = 0;
gbc.gridy = 4;
gbc.gridx = 1;
adminPanel.add(viewArticlesButton, gbc);
gbc.gridx = 0;
gbc.gridy = 6;
adminPanel.add(deleteArticleButton, gbc);
gbc.gridx = 1;
gbc.gridy = 7;
adminPanel.add(logoutButton, gbc);
frame.getContentPane().removeAll();
frame.getContentPane().add(adminPanel);
frame.revalidate();
frame.repaint();
frame.getContentPane().removeAll();
frame.getContentPane().add(articleViewPanel);
frame.revalidate();
21
}
if (userDatabase.containsKey(loggedInUser ) &&
userDatabase.get(loggedInUser ).equals(password)) {
isAdmin = adminDatabase.getOrDefault(loggedInUser , false);
if (isAdmin) {
initializeAdminPage();
} else {
initializeUserPage();
}
} else {
JOptionPane.showMessageDialog(frame, "Invalid login credentials.");
}
}
} else {
JOptionPane.showMessageDialog(frame, "Please fill in both fields.");
}
}
private void 22
23 handlePostArticle() {
String title = articleTitleField.getText();
String article = articleTextArea.getText();
String category = (String) categoryComboBox.getSelectedItem();
if (category.equals("Other")) {
category = customCategoryField.getText();
}
userPanel.add(logoutButton, BorderLayout.SOUTH);
frame.getContentPane().removeAll();
frame.getContentPane().add(userPanel);
frame.revalidate();
frame.repaint();
}
}
24
APPENDIX B (SCREEN SHOT)
25
26