Project Assignment - CAT 1
Project Assignment - CAT 1
CAT 1 - Paractical
Scenario:
TechBook Solutions, a startup building a small-scale online bookstore, hired you as a junior
developer. Your task is to develop the foundation for this web-based application using the
knowledge you've gained in Swing, AWT, Servlets, Session Tracking, and Inter-Servlet
Communication. The application will have both a desktop-based GUI for admin operations
(like managing books) and a web-based component to track user sessions and allow users to
browse and purchase books.
Your project will be developed using NetBeans IDE and deployed on Apache Tomcat for the
web-based components. You will also be using Swing and AWT for the GUI-based desktop
application.
Objectives:
1. Develop a Swing & AWT-based GUI for managing books in the bookstore.
3. Implement Session Tracking to manage users’ sessions when they log in and browse
the bookstore.
4. Enable communication between servlets to ensure smooth data flow across multiple
components of the web application.
Week 1-2: Develop the Admin Panel Using Swing & AWT
You will first create a desktop application using Swing and AWT for the admin (bookstore
manager) to:
Key Components:
Deliverable 1:
• A fully functional Admin Panel developed in Swing and AWT, where the admin can
manage books. You should be able to perform basic CRUD (Create, Read, Update,
Delete) operations on the books using the GUI.
Now, shift your focus to the web-based part of the application. Using Servlets, create a
basic web interface for users to:
Key Components:
• A shopping cart that tracks user selections across multiple requests using HTTP
sessions.
Deliverable 2:
This phase requires implementing session tracking and communication between servlets to
manage user sessions and data flow in the application. Here’s what you need to do:
• Keep track of the user’s login status, shopping cart, and order history using sessions.
• Create a login servlet where users can log in and start a session.
• Allow communication between servlets (for example, the login servlet should pass
the session to the book viewing and cart servlets).
Key Components:
• CartServlet: Allow users to add/remove items from the cart and view their cart.
Deliverable 3:
• A fully functional login system that tracks user sessions and allows them to log in,
browse books, add items to the cart, and view their cart across multiple requests.
Additional Requirements
• Ensure proper exception handling for errors like invalid input or session expiration.
• Follow best practices in Java development, including proper folder structure and
separation of concerns (e.g., separating logic between GUI and web-based
components).
Final Deliverable:
1. Admin Panel (Swing & AWT): The desktop GUI for managing books.
2. Web Application (Servlets): The web-based components for users to browse and
manage their shopping carts.
Submit your project as a NetBeans project file along with the war file for the web
application.
Grading Criteria:
• Functionality (40%): Does your project meet all the specified requirements? Does it
run without errors?
• Session Tracking & Communication (20%): Have you correctly implemented session
tracking and servlet communication?
• Creativity (10%): Have you added any additional features or demonstrated creativity
in your solution?
Project Timeline:
Final Notes:
• Make sure to test each component as you develop it to avoid issues later.
• Seek help if you encounter difficulties, but make sure to work through problems and
try to find solutions on your own.