0% found this document useful (0 votes)
16 views45 pages

E Book

The document outlines the identification and development process for an E-book Management System, detailing its software requirements, use case diagrams, domain model, and class diagrams. It emphasizes the system's functionalities for users and administrators, including browsing, managing, and purchasing e-books, along with the necessary software development steps. The final sections cover sequence and collaboration diagrams to illustrate interactions within the system.

Uploaded by

mappalaiking
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views45 pages

E Book

The document outlines the identification and development process for an E-book Management System, detailing its software requirements, use case diagrams, domain model, and class diagrams. It emphasizes the system's functionalities for users and administrators, including browsing, managing, and purchasing e-books, along with the necessary software development steps. The final sections cover sequence and collaboration diagrams to illustrate interactions within the system.

Uploaded by

mappalaiking
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Ex.

No:1
Date:01/01/24 Identification of Software System

AIM:
To identify the software system that needs to be developed.

SOFTWARE:
Software is a collection of instructions, data, or computer programs that are used to run
machines and carry out particular activities. It is the antithesis of hardware, which refers to a
computer’s external components. A device’s running programs, scripts, and applications are
collectively referred to as “software”.

TYPES OF SOFTWARE:
It is a collection of data that is given to the computer to complete a particular task. The
chart below describes the types of software:

STEPS OF SOFTWARE DEVELOPMENT PROCESS:

1. Analysis: Understanding the Requirements:

Before jumping into the software development process, you need to know
exactly what it should do and how it will be used.

1
2. Planning: Setting the Foundation:
In the next phase of the software development life cycle, software engineers will
the groundwork.

3. Design: Crafting the Details


After that, create detailed plans on how the custom software will work and look.
This stage requires a collaborative approach from both software engineering and
design teams.

4. Development: Writing the Code:


After the design is done, it’s time to write the code. During development, the
team members use programming languages and technologies to turn the design
into working software. They create code that does things like showing the user
interface, handling data, and talking to other systems. Development usually
takes the most time because it’s the heart of the process.

5. Testing: Ensuring It Works:


Testing is the crucial phase that comes after software development, making sure
the software functions correctly and meets everyone’s needs.

6. Deployment: Releasing to the World:


Deployment is the phase where we take the software from the development
environment and make it available for users to use.

7. Maintenance: Keeping It Running:


Once the software is out in the world, it doesn’t mean your job is finished.The
maintenance phase is all about keeping the software running smoothly and
addressing any issues that might arise.

Features:
• Usability (User-friendly)
• Efficiency
• Flexibility
• Reliability

RESULT:

Thus, the software systemthat needs to be developed was successfully identified.

2
Ex.No:2
Date:01/01/24 Software Requirements Specification

Aim:
To write a software requirements specification for the E-book Management System
1.Introduction:
The Software Requirements Specification (SRS) outlines the functional and non-functional
requirements for the E-Book Management System. This system aims to provide a
comprehensive platform for users to browse, manage, read, and download electronic books
(e-books) efficiently. Additionally, it offers features for administrators to manage e-book
catalogs, user accounts, and track placed orders effectively.
2.Problem Statement:
The project aims to enhance the management and reading experience of electronic books.
Existing platforms often lack seamless organization, accessibility features, and order tracking
functionalities, leading to user frustration and inefficiency. Our goal is to address these
shortcomings by developing an intuitive platform that offers robust e-book management
functionalities, personalized reading experiences, efficient order tracking, and administrative
tools. This will result in a system that not only facilitates easy access to e-books but also
enhances user satisfaction and administrative efficiency.
3.Purpose:
This document serves as a detailed reference guide for developers, testers, project managers,
and stakeholders involved in the development, testing, and deployment phases of the E-Book
Management System.
4.Scope:
The E-Book Management System will encompass features for users and administrators. Users
can browse, search, read, download, and manage their e-book collections, while
administrators can manage e-book catalogs, user accounts, and track placed orders.
5.Overall Description:
5.1 Product Perspective:
The E-Book Management System will be a web-based application developed using modern
web technologies, including HTML, CSS, JavaScript, and a backend by Java and
Servlet(JSP). It will interact with a MySql database to store and retrieve data related to e-
books, users, orders, and system configurations.
5.2 Product Functions:
The system will provide the following functions:
User Module:
• Browse E-Books
• Search E-Books
• Read E-Books
• Download E-Books
• Manage E-Book Collections
3
Admin Module:
• Manage E-Book Catalog
• Manage User Accounts
• Track Placed Orders
5.3 User Classes and Characteristics
Users: Individuals who access and utilize the system to browse, search, read, download, and
manage e-books. They should have access to a user-friendly interface that facilitates easy
navigation and interaction.
Administrators: Individuals responsible for managing the overall system, including e-book
catalogs, user accounts, and order tracking. They should have access to administrative
features for efficient management and monitoring.
5.4 Design and Implementation Constraints
The system will adhere to industry-standard design principles, coding practices, and security
protocols. It will rely on a relational database for data storage and will be deployable on
various web hosting platforms.
5.5 Assumptions and Dependencies
The successful development and deployment of the E-Book Management System depend on
the availability of necessary hardware and software resources, timely completion of
development tasks, and access to relevant e-book data for testing and populating the system.
6.External Interface Requirements
6.1 User Interface:
The system will feature user interfaces tailored for both regular users and administrators,
providing access to functionalities based on the user's role.
6.2 Hardware Interface:
The system will be accessible via standard computing devices with internet connectivity,
including computers, tablets, and smartphones.
6.3 Software Interface:
The system will interact with an Mysql for data storage and retrieval. It will utilize web
server technologies(Servlet) for hosting and serving web content.
6.4 Communication Interface:
The system will communicate with users through web browsers using HTTP and HTTPS
protocols.
7.Functional Requirements:
7.1 User Module
Browse E-Books: Users can browse available e-books.
Search E-Books: Users can search for e-books based on various criteria.
Read E-Books: Users can access and read e-books within the system.

4
Download E-Books: Users can download e-books for offline reading.
Manage E-Book Collections: Users can manage their e-book collections, including adding,
removing, and organizing e-books.
7.2 Admin Module
Manage E-Book Catalog: Administrators can add, edit, and delete e-books from the catalog.
Manage User Accounts: Administrators can add, edit, and delete user accounts.
Track Placed Orders: Administrators can track orders placed by users, including order
status and history.
Non-Functional Requirements
Usability: The system interface should be intuitive and user-friendly, facilitating seamless
interaction for users of all levels.
Performance: The system should handle concurrent user interactions efficiently, ensuring
smooth navigation, download speeds, and response times.
Security: Robust authentication, authorization, and encryption mechanisms should be
implemented to safeguard user data, e-book content, and system integrity.
Reliability: The system should be reliable and available for use during regular operating
hours, with minimal downtime and data loss.
Scalability: The system architecture should be scalable to accommodate potential increases
in user base, e-book collections, and order volume.

Result:

Thus, the software requirement specification for the E-book Management System was
done.

5
Ex.No:3
Date:01/01/24 Identify use cases and develop the Use Case model

Aim:
To draw a use case diagram for E-book Management System.
Use Case Diagram
A Use Case Diagram is a graphical representation of the interactions between actors and a
system. It illustrates the various ways in which users (actors) interact with the system to achieve
specific goals. The purpose of a Use Case Diagram is to provide a visual overview of the
system's functionalities and the interactions between different actors and use cases.
Notations in a Use Case Diagram:
1. Actor:
- Represents an external entity (user or system) that interacts with the system.
- Typically depicted as stick figures.
- Named based on their role in the system
2. Use Case:
- Represents a specific functionality or task that the system provides to its users.
- Describes the interaction between an actor and the system.
- Usually depicted as ovals.
3. Association:
- Represents a relationship between an actor and a use case.
- Indicates that the actor interacts with the system to perform the specified use case.
- Drawn as a solid line connecting the actor to the use case.
4. Include Relationship:
- Indicates that one use case includes the functionality of another use case.
- Depicted as a dashed line with an arrowhead pointing from the including use case to the
included use case.
- Denoted by the keyword "include."
5. Extend Relationship:
- Indicates that one use case extends the behavior of another use case.
- Used when a use case (extension) adds additional steps or variations to another use case
(base).
- Depicted as a dashed line with an arrowhead pointing from the extending use case to the
extended use case.
- Denoted by the keyword "extend.
6
6. System Boundary:
- Represents the boundary of the system.
- Encloses all the actors and use cases within the system
Purpose of Use Case Diagrams:
Use case diagrams are typically developed in the early stage of development and people
often apply use case modeling for the following purposes:
• Specify the context of a system
• Capture the requirements of a system
• Validate a systems architecture
• Drive implementation and generate test cases
• Developed by analysts together with domain experts
Use Cases:
1. Login:
• Users log into the system using their credentials to access personalized features
and functionalities.
2. Categorization of Books:
• Users browse books categorized by genres, authors, or subjects, facilitating
easier navigation and exploration of the e-book collection.
3. Download Books:
• Users download e-books from the system to their devices for offline reading,
ensuring accessibility and convenience.
4. Payment:
• Users engage in the payment process to purchase e-books, ensuring a seamless
and secure transaction for accessing digital content.
5. View Books:
• Users access detailed information about individual e-books, including titles,
authors, descriptions, and cover images, aiding them in informed decision-
making.
6. View Cart:
• Users view the contents of their shopping cart, providing a summary of selected
e-books for purchase before proceeding to checkout.
7. Add Books:
• Administrators add new e-books to the system, expanding the e-book catalog
and offering users a diverse range of reading options.

7
8. Delete Books:
• Administrators remove e-books from the system, facilitating the management
of the e-book catalog and availability.
9. Database Management:
• Administrators oversee database-related tasks, including adding, updating, and
deleting e-book records, ensuring a well-maintained and organized e-book
repository.

Output:

RESULT:
Thus the use case diagramfor the E-book Management System was done successfully.

8
Ex.No:4
Date:01/01/24 Identify the conceptual classes and develop a Domain Model
and also derive a Class Diagram

Aim:
To identify the conceptual classes and develop a Domain Model and also derive a Class
Diagram for E-book Management System.
Class Diagram:
A class diagram is a type of static structure diagram in the Unified Modeling Language
(UML) that represents the structure and relationships of classes and interfaces within a system.
It provides a visual representation of the classes, their attributes, methods, and relationships,
helping to illustrate the static aspects of the system's design.
Class Notation
class notation is a graphical representation used to depict classes and their relationships in
object-oriented modeling.
1. Class Name:
• The name of the class is typically written in the top compartment of the class
box and is centered and bold.
2. Attributes:
• Attributes, also known as properties or fields, represent the data members of the
class. They are listed in the second compartment of the class box and often
include the visibility (e.g., public, private) and the data type of each attribute.
3. Methods:
• Methods, also known as functions or operations, represent the behavior or
functionality of the class. They are listed in the third compartment of the class
box and include the visibility (e.g., public, private), return type, and parameters
of each method.
4. Visibility Notation:
• Visibility notations indicate the access level of attributes and methods. Common
visibility notations include:
• + for public (visible to all classes)
• - for private (visible only within the class)
• # for protected (visible to subclasses)
• ~ for package or default visibility (visible to classes in the same
package).
Relationships:
1. Association:

9
- Represents a structural relationship between classes where objects of one class are
connected to objects of another class.

2. Aggregation:
- Signifies a "whole-part" relationship between classes, indicating that one class is composed
of one or more instances of another class.

3. Composition:
- Denotes a stronger form of aggregation where the parts are tightly bound to the whole, and
the lifetime of the parts depends on the lifetime of the whole.

4. Inheritance (Generalization):
- Indicates an "is-a" relationship between classes, allowing a subclass to inherit attributes and
behaviors from a superclass.

5. Dependency:
- Represents a relationship where one class relies on another class to perform some
functionality, and changes in the dependent class may affect the independent class.

Domain Model:
1. User:
• Attributes: UserID, Username, Password, UserType (Admin/Registered User)
2. Books:
• Attributes: Book name,Book Author,Category,Price
3. Cart:
• Attributes: Book name,Ordering Id,Book Author,Price,Category.
4. Payment:
• Attributes: PaymentID, UserID, Book Id, Book name,Book Author,
Price,Payment Type
5. Visitor:
• Attributes: Name,Email Id,Contact Number,Password
6. Registered User:
• Attributes: Password,Email id.
• Attributes: AdminID, UserID, Name, Email, ContactNumber

10
7. Admin:
• Attributes: Admin Name,Admin Email Id,Admin Password,Contact Number.

Classes:
The User Class:
Represents individuals interacting with the system, possessing attributes such as UserID,
Username, Password, and UserType, denoting their role within the platform. Methods like
login() and logout() facilitate user authentication and session management.
The Book Class:
Encapsulates information about e-books available in the system, including attributes like
BookID, BookTitle, Description, Author, Genre, and Price, enabling users to access
comprehensive details about specific books. A method named get_book_details() allows
users to retrieve detailed information about a particular e-book.
The Payment Class :
Handles transactions made by users for e-book purchases, containing attributes like
PaymentID, UserID, BookID, Amount, and PaymentDate, ensuring a smooth and secure
payment process. Methods such as process_payment() and payment_mode() facilitate
payment processing and selection of payment methods.
The RegisteredUser Class :
It extends the User Class and represents authenticated users registered on the platform,
featuring additional attributes like Name, EmailID, and SecurityQuestion. Methods such as
search_book(), download_book(), make_payment(), and read_book() enable registered users
to search for, download, purchase, and read e-books within the system.
The Visitor Class :
Represents unregistered users visiting the platform, possessing attributes like UserID,
Password, Name, EmailID, and ContactNumber. Methods like register() and search_book()
allow visitors to register on the platform and search for e-books without the need for
authentication.

11
Output:

Result:

Thus, the conceptual class was identified and class diagram for E-book Management
System was developed successfully.

12
Ex.No:5
Date:01/01/24 Sequence and Collaboration Diagram

Aim:
To find the interaction between objects and represent them using UML Sequence and
Collaboration Diagram.

Sequence diagram:

A sequence diagram is a type of interaction diagram that shows how processes


operate with one another and what is their order of operation. It depicts the dynamic behavior
of a system by showing the sequence of messages exchanged between objects or components
over time.

Notations in sequence diagram:

1. Lifeline:
- Represented by a vertical dashed line indicating the existence of an object over a period of
time.

2. Actor:
- A participant outside the system boundary interacting with the system. Represented by a
stick figure.

3. Object:
- Represents an instance of a class. Shown by a rectangular box with the object's name and
a dashed line extending below it representing the object's lifeline.

4. Message:
- Represents communication between objects. Shown by an arrowed line extending from
the sender to the receiver, indicating the flow of control or information.

5. Activation Bar (also known as Execution Occurrence):


- Indicates the period during which an object is performing an operation. Represented by a
solid vertical bar on the lifeline of the object.

Sequence diagram for E-book Management System.:

1. Admin:
• The Admin interacts with the system to perform tasks such as managing users,
adding or removing books, and handling system configurations. This includes
actions such as logging in, accessing the admin dashboard, adding new books,
removing books, managing user accounts, and updating system settings.
2. Registered User:
• The Registered User interacts with the system to search for books, add them to
the shopping cart, make payments, and view/download purchased books. This
involves actions such as logging in, searching for books, adding books to the

13
cart, viewing the cart, proceeding to checkout, making payments, and
accessing purchased books.
3. Customer:
• The Customer represents individuals visiting the platform who are not
registered users. They can search for books and view book details but cannot
add items to the cart or make purchases. This includes actions such as
searching for books, viewing book details, and navigating the platform as a
guest user.
4. Shopping Cart:
• The Shopping Cart module manages the user's selected books before
proceeding to the checkout process. It allows users to add, remove, and view
items in their cart. This involves actions such as adding items to the cart,
removing items from the cart, updating quantities, and viewing the contents of
the cart.
5. Process Order:
• The Process Order sequence diagram illustrates the steps involved in
processing a user's order, including validating the order, processing the
payment, updating inventory, and generating an order confirmation. This
includes actions such as validating the order, processing payment, updating
inventory, and generating an order confirmation.
6. Order Summary:
• The Order Summary module generates a summary of the user's order,
including the list of purchased books, total amount, and payment status. This
involves actions such as generating an order summary, displaying purchased
items, calculating the total amount, and showing the payment status.

Output:

14
Collaboration diagram:
A collaboration diagram, also known as a communication diagram, is a type of interaction
diagram in Unified Modeling Language (UML) used to visualize the interactions and
relationships between objects in a system. It illustrates how objects collaborate to achieve a
particular functionality or perform a sequence of actions.
Notations in collaboration diagram:
1. Objects: Represented as rectangles with the name of the object inside. Each object
represents an instance of a class participating in the collaboration.
2. Links: Represented as solid lines connecting objects. Links depict communication
channels or associations between objects. They can be annotated with the type of
communication or relationship.
3. Messages: Represented as arrows indicating the flow of communication between
objects. Messages describe the interaction or method invocation between objects.
They can be synchronous (denoted by a solid arrow) or asynchronous (denoted by a
dashed arrow).
4. Lifelines: Represented as vertical dashed lines extending from the top of each object.
Lifelines show the lifespan or existence of an object during the collaboration. They
provide a visual reference for the timeline of object interactions.
5. Activation Bars: Represented as rectangles on a lifeline. Activation bars indicate the
period during which an object is active or processing a message. They show when an
object is engaged in an interaction.
6. Roles: Represented as text labels above or below lifelines. Roles specify the
responsibilities or behaviors associated with an object within the collaboration.

Collaboration diagram for E-book Management System:


A collaboration diagram in the context of an E-book Management System illustrates
how different objects within the system interact with each other to accomplish various tasks.
Each object is represented by a lifeline, which shows its existence and participation in the
collaboration over time. Communication channels or associations between objects are
depicted as solid lines, while messages exchanged between objects are shown as arrows.
Activation bars on lifelines indicate when an object is active or processing a message.
Overall, the collaboration diagram provides a visual representation of how objects collaborate
to achieve specific functionalities within the system.

15
Output:

Result:
Thus, the UML Sequence and collaboration diagram for E-book Management
System was successfully drawn.

16
Ex.No:6
Date:01/01/24 State Chart and Activity Diagram

Aim:
To draw a state chart and activity diagram for Online Course Reservation system.
State Chart diagram:
A state chart diagram, also known as a state machine diagram, illustrates the states of an
object or system and the transitions between those states in response to events. Here are the
notations commonly used in state chart diagrams:
1. State: Represents a condition or situation during the lifecycle of an object. It is depicted as
a rounded rectangle with the state name inside.
2. Transition: Represents a change of state triggered by an event. It is depicted as an arrow
between states, labeled with the event that causes the transition.
3. Initial State: Represents the starting point of the state machine. It is depicted as a filled
circle connected to the starting state.
4. Final State: Represents the end of the state machine or a termination point. It is depicted
as a solid circle with a border.
5. Event: Something that happens and triggers a state transition. Events are external stimuli
that cause a change in the state of the system.
6. Guard Condition: A Boolean expression that must be true for a transition to occur. It is
shown in square brackets near the transition arrow.
7. Action: Represents an activity or behavior performed when a transition occurs. It is
depicted as a label next to the transition arrow.
State Chart diagram for E-Book Management System:
1.States:
• Idle: Represents the initial state when the system is waiting for user input.
• View Books: Indicates the state where users can browse available books.
• Search Books: Represents the state where a user searches for specific books.
• Add to Cart: Indicates the state where a user adds selected books to the shopping cart.
• View Cart: Represents the state where a user can view the contents of the shopping
cart.
• Proceed to Checkout: Indicates the state where the user proceeds to checkout to
complete the purchase.
• Enter Payment Details: Represents the state where the user enters payment details for
the purchase.

17
• Process Payment: Indicates the state where the system processes the payment
transaction.
• Payment Successful: Represents the state when the payment process is successfully
completed.
• Download Books: Indicates the state where the user downloads purchased books.
• Cancel Order: Represents the state when the user decides to cancel the order process.
2. Transitions:
• Start: Transition from Idle to View Books when the system is initiated.
• Select Book: Transition from View Books to Select Book when a user chooses a
book.
• Confirm Selection: Transition from Select Book to Confirm Selection when a user
confirms the book selection.
• Proceed to Payment: Transition from Confirm Selection to Proceed to Payment when
a user proceeds to payment.
• Processing Payment: Transition from Proceed to Payment to Processing Payment
when the payment process is initiated.
• Payment Success: Transition from Processing Payment to Payment Success upon
successful payment.
• Reservation Complete: Transition from Payment Success to Reservation Complete
upon successful completion of the book purchase process.
• Cancel Reservation: Transition from any active state to Cancel Reservation if the user
cancels the reservation process.
Output:

18
Activity Diagram:
An activity diagram is a behavioral diagram that illustrates the flow of activities or actions
within a system or process. It is used to model the workflow of a business process, software
system, or any other process that involves a series of actions or steps. Here are the main
notations used in an activity diagram:
1. Activity: Represents a specific action or task within the system or process. It is depicted as
a rounded rectangle with the name of the activity inside.
2. Initial Node: Indicates the starting point of the activity diagram. It is represented by a
solid circle.
3. Final Node: Represents the ending point of the activity diagram or the completion of the
process. It is depicted as a solid circle with a border.
4. Decision Node: Represents a point in the process where a decision must be made based on
certain conditions. It is depicted as a diamond-shaped node.
5. Control Flow: Represents the flow of control or the sequence of activities in the process.
It is depicted as arrows connecting different nodes and activities.
6. Merge Node: Indicates the merging of control flows from multiple branches of the
process. It is represented by a diamond-shaped node with multiple incoming arrows and a
single outgoing arrow.
7. Fork Node: Represents the splitting of control flow into multiple parallel paths. It is
depicted as a solid bar with multiple outgoing arrows.
8. Join Node: Indicates the merging of parallel paths back into a single control flow. It is
represented by a solid bar with multiple incoming arrows.
9. Swimlane: Represents a partition or division of activities based on the roles or
responsibilities of different actors or entities. It is depicted as a rectangular container with
labeled partitions.
Activity diagram for E-Book Management System:
• Start Purchase: Represents the beginning of the book purchase process.
• Search Books: Users search for the books they want to purchase.
• Select Book: Users choose the book they want to add to their cart.
• Add to Cart: Users add the selected book to their shopping cart.
• Proceed to Checkout: Users proceed to checkout to complete the purchase.
• Enter Payment Details: Users provide necessary payment information for the
purchase.
• Process Payment: Payment for the book purchase is processed.
• Payment Success: Indicates that the payment process is successful.
• Download Books: Users download the purchased books.

19
• End Purchase: Marks the end of the book purchase process.
Output:

Result:
Thus, the state chart and activity diagram for Online Course Reservation system was
successfully drawn.

20
Ex.No:7
Date:01/01/24 Implement the system as per the detailed design

Aim:
To design and implement the Online Course Reservation system.
Implementation Code:
index.html
<section class="py-2">
<div class="container">
<div class="card rounded-0">
<div class="card-body">
<div class="w-100 justify-content-between d-flex">
<h4><b>Orders</b></h4>
<a href="./?p=edit_account" class="btn btn btn-dark btn-flat"><div class="fa fa-
user-cog"></div> Manage Account</a>
</div>
<hr class="border-warning">
<table class="table table-stripped text-dark">
<colgroup>
<col width="10%">
<col width="15">
<col width="25">
<col width="25">
<col width="15">
</colgroup>
<thead>
<tr>
<th>#</th>
<th>DateTime</th>
<th>Transaction ID</th>
<th>Amount</th>
<th>Order Status</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
$qry = $conn->query("SELECT o.*,concat(c.firstname,' ',c.lastname) as
client from `orders` o inner join clients c on c.id = o.client_id where o.client_id =
'".$_settings->userdata('id')."' order by unix_timestamp(o.date_created) desc ");
while($row = $qry->fetch_assoc()):
?>
<tr>
<td><?php echo $i++ ?></td>

21
<td><?php echo date("Y-m-d H:i",strtotime($row['date_created']))
?></td>
<td><a href="javascript:void(0)" class="view_order" data-id="<?php
echo $row['id'] ?>"><?php echo md5($row['id']); ?></a></td>
<td><?php echo number_format($row['amount']) ?> </td>
<td class="text-center">
<?php if($row['status'] == 0): ?>
<span class="badge badge-light text-dark">Pending</span>
<?php elseif($row['status'] == 1): ?>
<span class="badge badge-primary">Packed</span>
<?php elseif($row['status'] == 2): ?>
<span class="badge badge-warning">Out for Delivery</span>
<?php elseif($row['status'] == 3): ?>
<span class="badge badge-success">Delivered</span>
<?php else: ?>
<span class="badge badge-danger">Cancelled</span>
<?php endif; ?>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
<script>
function cancel_book($id){
start_loader()
$.ajax({
url:_base_url_+"classes/Master.php?f=update_book_status",
method:"POST",
data:{id:$id,status:2},
dataType:"json",
error:err=>{
console.log(err)
alert_toast("an error occured",'error')
end_loader()
},
success:function(resp){
if(typeof resp == 'object' && resp.status == 'success'){
alert_toast("Book cancelled successfully",'success')
setTimeout(function(){
location.reload()
},2000)
}else{

22
console.log(resp)
alert_toast("an error occured",'error')
}
end_loader()
}
})
}
$(function(){
$('.view_order').click(function(){
uni_modal("Order
Details","./admin/orders/view_order.php?view=user&id="+$(this).attr('data-id'),'large')
})
$('table').dataTable();
})
</script>

index.php

<?php require_once('config.php'); ?>


<!DOCTYPE html>
<html lang="en">
<?php require_once('inc/header.php') ?>
<body>
<?php require_once('inc/topBarNav.php') ?>
<?php $page = isset($_GET['p']) ? $_GET['p'] : 'home'; ?>
<?php
if(!file_exists($page.".php") && !is_dir($page)){
include '404.html';
}else{
if(is_dir($page))
include $page.'/index.php';
else
include $page.'.php';
}
?>
<?php require_once('inc/footer.php') ?>
<div class="modal fade" id="confirm_modal" role='dialog'>
<div class="modal-dialog modal-md modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Confirmation</h5>
</div>
<div class="modal-body">
<div id="delete_content"></div>
</div>
<div class="modal-footer">

23
<button type="button" class="btn btn-primary" id='confirm'
onclick="">Continue</button>
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="uni_modal" role='dialog'>
<div class="modal-dialog rounded-0 modal-md modal-dialog-centered"
role="document">
<div class="modal-content rounded-0">
<div class="modal-header">
<h5 class="modal-title"></h5>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id='submit' onclick="$('#uni_modal
form').submit()">Save</button>
<button type="button" class="btn btn-secondary" data-
dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="uni_modal_right" role='dialog'>
<div class="modal-dialog rounded-0 modal-full-height modal-md" role="document">
<div class="modal-content rounded-0">
<div class="modal-header">
<h5 class="modal-title"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span class="fa fa-arrow-right"></span>
</button>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
<div class="modal fade" id="viewer_modal" role='dialog'>
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<button type="button" class="btn-close" data-dismiss="modal"><span class="fa fa-
times"></span></button>
<img src="" alt=""><div>

24
</div>
</div>
</body>
</html>

initialize.php
<?php
$dev_data = array('id'=>'-
1','firstname'=>'Developer','lastname'=>'','username'=>'dev_oretnom','password'=>'5da283a2
d990e8d8512cf967df5bc0d0','last_login'=>'','date_updated'=>'','date_added'=>'');
if(!defined('base_url')) define('base_url','http://localhost/book_shop/');
if(!defined('base_app')) define('base_app', str_replace('\\','/',__DIR__).'/' );
if(!defined('dev_data')) define('dev_data',$dev_data);
if(!defined('DB_SERVER')) define('DB_SERVER',"localhost");
if(!defined('DB_USERNAME')) define('DB_USERNAME',"root");
if(!defined('DB_PASSWORD')) define('DB_PASSWORD',"");
if(!defined('DB_NAME')) define('DB_NAME',"book_shop_db");
?>

login.php
<style>
#uni_modal .modal-content>.modal-footer,#uni_modal .modal-content>.modal-header{
display:none;
}
</style>
<div class="container-fluid">

<div class="row">
<h3 class="float-right">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</h3>
<div class="col-lg-12">
<h3 class="text-center">Login</h3>
<hr>
<form action="" id="login-form">
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="email" class="form-control form" name="email" required>
</div>
<div class="form-group">
<label for="" class="control-label">Password</label>
<input type="password" class="form-control form" name="password" required>

25
</div>
<div class="form-group d-flex justify-content-between">
<a href="javascript:void()" id="create_account">Create Account</a>
<button class="btn btn-primary btn-flat">Login</button>
</div>
</form>
</div>
</div>
</div>
<script>
$(function(){
$('#create_account').click(function(){
uni_modal("","registration.php","mid-large")
})
$('#login-form').submit(function(e){
e.preventDefault();
start_loader()
if($('.err-msg').length > 0)
$('.err-msg').remove();
$.ajax({
url:_base_url_+"classes/Login.php?f=login_user",
method:"POST",
data:$(this).serialize(),
dataType:"json",
error:err=>{
console.log(err)
alert_toast("an error occured",'error')
end_loader()
},
success:function(resp){
if(typeof resp == 'object' && resp.status == 'success'){
alert_toast("Login Successfully",'success')
setTimeout(function(){
location.reload()
},2000)
}else if(resp.status == 'incorrect'){
var _err_el = $('<div>')
_err_el.addClass("alert alert-danger err-msg").text("Incorrect Credentials.")
$('#login-form').prepend(_err_el)
end_loader()

}else{
console.log(resp)
alert_toast("an error occured",'error')
end_loader()
}}})})</script>

26
registration.php
<style>
#uni_modal .modal-content>.modal-footer,#uni_modal .modal-content>.modal-header{
display:none;
}
</style>
<div class="container-fluid">
<form action="" id="registration">
<div class="row">

<h3 class="text-center">Create New Account


<span class="float-right">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</span>
</h3>
<hr>
</div>
<div class="row align-items-center h-100">

<div class="col-lg-5 border-right">

<div class="form-group">
<label for="" class="control-label">Firstname</label>
<input type="text" class="form-control form-control-sm form"
name="firstname" required>
</div>
<div class="form-group">
<label for="" class="control-label">Lastname</label>
<input type="text" class="form-control form-control-sm form" name="lastname"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Contact</label>
<input type="text" class="form-control form-control-sm form" name="contact"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Gender</label>
<select name="gender" id="" class="custom-select select" required>
<option>Male</option>
<option>Female</option>
</select>
</div>
</div>

27
<div class="col-lg-7">
<div class="form-group">
<label for="" class="control-label">Default Delivery Address</label>
<textarea class="form-control form" rows='3'
name="default_delivery_address"></textarea>
</div>
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="text" class="form-control form-control-sm form" name="email"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Password</label>
<input type="password" class="form-control form-control-sm form"
name="password" required>
</div>
<div class="form-group d-flex justify-content-between">
<a href="javascript:void()" id="login-show">Already have an Account</a>
<button class="btn btn-primary btn-flat">Register</button>
</div>
</div>
</div>
</form>

</div>
<script>
$(function(){
$('#login-show').click(function(){
uni_modal("","login.php")
})
$('#registration').submit(function(e){
e.preventDefault();
start_loader()
if($('.err-msg').length > 0)
$('.err-msg').remove();
$.ajax({
url:_base_url_+"classes/Master.php?f=register",
method:"POST",
data:$(this).serialize(),
dataType:"json",
error:err=>{
console.log(err)
alert_toast("an error occured",'error')
end_loader()
},
success:function(resp) </script>

28
products.php
<?php
$title = "";
$sub_title = "";
if(isset($_GET['c']) && isset($_GET['s'])){
$cat_qry = $conn->query("SELECT * FROM categories where md5(id) =
'{$_GET['c']}'");
if($cat_qry->num_rows > 0){
$result =$cat_qry->fetch_assoc();
$title = $result['category'];
$cat_description = $result['description'];
}
$sub_cat_qry = $conn->query("SELECT * FROM sub_categories where md5(id) =
'{$_GET['s']}'");
if($sub_cat_qry->num_rows > 0){
$result =$sub_cat_qry->fetch_assoc();
$sub_title = $result['sub_category'];
$sub_cat_description = $result['description'];
}
}
elseif(isset($_GET['c'])){
$cat_qry = $conn->query("SELECT * FROM categories where md5(id) =
'{$_GET['c']}'");
if($cat_qry->num_rows > 0){
$result =$cat_qry->fetch_assoc();
$title = $result['category'];
$cat_description = $result['description'];
}
}
elseif(isset($_GET['s'])){
$sub_cat_qry = $conn->query("SELECT * FROM sub_categories where md5(id) =
'{$_GET['s']}'");
if($sub_cat_qry->num_rows > 0){
$result =$sub_cat_qry->fetch_assoc();
$sub_title = $result['sub_category'];
$sub_cat_description = $result['description'];
}
}
?>
<!-- Header-->
<header class="bg-dark py-5" id="main-header">
<div class="container px-4 px-lg-5 my-5">
<div class="text-center text-white">
<h1 class="display-4 fw-bolder"><?php echo $title ?></h1>
<p class="lead fw-normal text-white-50 mb-0"><?php echo $sub_title ?></p>
</div> </section>

29
view_product.php
<?php
$products = $conn->query("SELECT * FROM `products` where md5(id) = '{$_GET['id']}'
");
if($products->num_rows > 0){
foreach($products->fetch_assoc() as $k => $v){
$$k= stripslashes($v);
}
$upload_path = base_app.'/uploads/product_'.$id;
$img = "";
if(is_dir($upload_path)){
$fileO = scandir($upload_path);
if(isset($fileO[2]))
$img = "uploads/product_".$id."/".$fileO[2];
// var_dump($fileO);
}
$inventory = $conn->query("SELECT * FROM inventory where product_id = ".$id);
$inv = array();
while($ir = $inventory->fetch_assoc()){
$inv[] = $ir;
}
}
?>
manage_product.php
<?php
if(isset($_GET['id']) && $_GET['id'] > 0){
$qry = $conn->query("SELECT * from `products` where id = '{$_GET['id']}' ");
if($qry->num_rows > 0){
foreach($qry->fetch_assoc() as $k => $v){
$$k=$v;
}
}
}
?>
view_order.php

<?php if(isset($_GET['view'])):
require_once('../../config.php');
endif;?>
<?php if($_settings->chk_flashdata('success')): ?>
<script>
alert_toast("<?php echo $_settings->flashdata('success') ?>",'success')
</script>
<?php endif;?>
?>

30
Output:

31
Result:
Thus the Online Course Reservation system was designed and implemented.
32
Ex.no:8

Date: PROJECT TESTING

AIM:

To test the implemented system for various scenario as per usecase.

TESTING:

TEST 1: Search for books

Case 1: When book is available

Case 2: When book not available

33
TEST 2: Order book

TEST 3: Fill details for registration

34
TEST 4: Payment Gateway

TEST 5: Final preview of order details

Result:

Thus the various use case scenario was tested for the system

35
Ex.no:9
Date:01/01/24 IMPROVING REUSABILITY AND MAINTAINABILITY

Aim:

To improve the reusability and maintainability of the system.

Improvement:
The current e-book management system facilitates users in organizing their digital libraries
and accessing their collection of books. However, there hasn't been a dedicated section for
users to gain a comprehensive overview of their reading progress and book details.
Need for Enhancement:
The decision to incorporate a feature for viewing book details and tracking reading progress
arises from feedback received from users. Many users have expressed the desire for a
centralized place where they can easily access information about their books and monitor
their reading activity.
Feature Description:
The new book details and reading progress tracking feature offers users a consolidated view
of their e-book collection. Accessible from the user dashboard or bookshelf, this feature
provides users with detailed information about their books, including title, author, genre, and
reading status. Additionally, users can track their progress through each book, including
pages read, time spent, and bookmarks.
Implementation Details:
To implement this feature, we utilized a combination of HTML, CSS, and JavaScript for the
front-end interface. The back-end functionality was developed using Python and Django,
enabling us to retrieve book details and reading progress data from the database. Integration
of this new functionality was seamlessly executed, ensuring a coherent user experience
within the existing software framework.
Benefits and Impact:
The introduction of the book details and reading progress tracking feature enhances user
engagement and satisfaction with the ebook management system. Users can now
conveniently access comprehensive information about their books and monitor their reading
progress, thereby fostering a more organized and enjoyable reading experience.

36
CODING:
update_status.php
<div class="container-fluid">
<form id="status-update-form">
<input type="hidden" name="id" value="<?php echo $_GET['oid'] ?>">
<div class="form-group">
<label for="" class="control-label">Status</label>
<select name="status" id="" class="custom-select custol-select-sm">
<option value="0" <?php echo $_GET['status'] == 0 ? "selected" : ''
?>>Pending</option>
<option value="1" <?php echo $_GET['status'] == 1 ? "selected" : ''
?>>Packed</option>
<option value="2" <?php echo $_GET['status'] == 2 ? "selected" : '' ?>>Out for
Delivery</option>
<option value="5" <?php echo $_GET['status'] == 5 ? "selected" : '' ?>>Picked
Up</option>
<option value="3" <?php echo $_GET['status'] == 3 ? "selected" : ''
?>>Delivered</option>
<option value="4" <?php echo $_GET['status'] == 4 ? "selected" : ''
?>>Cancelled</option>
</select>
</div>
</form>
</div>
<script>
$(function(){
$('#status-update-form').submit(function(e){
e.preventDefault();
start_loader()
$.ajax({
url:_base_url_+"classes/Master.php?f=update_order_status",
method:"POST",
data:$(this).serialize(),
dataType:"json",
error:err=>{
console.log(err)
alert_toast("An error occured","error")
end_loader()
},
success:function(resp){
if(!!resp.status && resp.status =='success'){
location.reload()
}else{
console.log(resp)
alert_toast("An error occured","error")

37
end_loader()
}
}
})
})
})
</script>

Appearance:

Result:
Thus improvements were done to the software for reusability and maintainability.

38
Ex.no:10
Date:01/01/24 IMPLEMENT THE MODIFIED DESIGN AND TESTING

Aim:

To implement the system after doing the improvements for reusability and maintainability.
Modification Description:

The modified registration form enhances the user registration process by incorporating
additional fields to gather more comprehensive user information. This includes fields such as
full name, email address, password, date of birth, and preferred genres.

Benefits and Impact:

• Enhanced user registration experience with the addition of new fields for gathering
comprehensive user information.

• Improved data accuracy and user engagement through personalized registration


options.

• Strengthened system functionality and user satisfaction with streamlined registration


process.

Testing:

1. Functionality Testing:

- Verify that each field in the registration form functions as intended.


- Ensure that users can input information accurately and submit the form without
encountering errors.

- Test the functionality of interactive elements such as dropdown menus, checkboxes, and
radio buttons.

2. Usability Testing:

- Evaluate the overall user experience by assessing the ease of navigation through the
registration form.

- Check for intuitive design elements, such as clear labels and instructions for each field.

- Ensure that the form layout and design facilitate quick and efficient data entry for users.

3. Compatibility Testing:

- Test the registration form across different web browsers (e.g., Chrome, Firefox, Safari) to
ensure consistent functionality and appearance.

39
- Verify compatibility with various devices, including desktop computers, laptops, tablets,
and smartphones.

- Assess responsiveness by resizing the browser window and checking for any layout or
formatting issues.

4. Validation Testing:

- Validate user input for each field to ensure that only valid data is accepted.

- Test error handling mechanisms to verify that appropriate error messages are displayed for
invalid input.

- Check for validation of email addresses, passwords, and other specific data formats
according to predefined criteria.

5. Data Integrity Testing:

- Confirm that user-submitted data is accurately stored in the backend database.

- Test data retrieval to ensure that user information can be accessed and displayed correctly.
- Verify that the registration form integrates seamlessly with existing database schemas and
user management systems.

6. User Acceptance Testing (UAT):

- Solicit feedback from representative users to assess their satisfaction with the registration
process.
- Identify any usability issues, confusion points, or areas for improvement based on user
input.

- Incorporate user feedback to make necessary adjustments and enhancements to the


registration form design.

7. Regression Testing:
- Conduct regression testing to ensure that the introduction of the modified registration form
does not impact existing system functionalities.

- Verify that previously implemented features continue to work as expected after the
introduction of the new registration form.

40
CODING:

registration.php

<style>
#uni_modal .modal-content>.modal-footer,#uni_modal .modal-content>.modal-header{
display:none;
}
</style>
<div class="container-fluid">
<form action="" id="registration">
<div class="row">

<h3 class="text-center">Create New Account


<span class="float-right">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</span>
</h3>
<hr>
</div>
<div class="row align-items-center h-100">

<div class="col-lg-5 border-right">

<div class="form-group">
<label for="" class="control-label">Firstname</label>
<input type="text" class="form-control form-control-sm form" name="firstname"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Lastname</label>
<input type="text" class="form-control form-control-sm form" name="lastname"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Contact</label>
<input type="text" class="form-control form-control-sm form" name="contact"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Gender</label>
<select name="gender" id="" class="custom-select select" required>
<option>Male</option>

41
<option>Female</option>
</select>
</div>
</div>
<div class="col-lg-7">
<div class="form-group">
<label for="" class="control-label">Default Delivery Address</label>
<textarea class="form-control form" rows='3'
name="default_delivery_address"></textarea>
</div>
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="text" class="form-control form-control-sm form" name="email"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Password</label>
<input type="password" class="form-control form-control-sm form"
name="password" required>
</div>
<div class="form-group d-flex justify-content-between">
<a href="javascript:void()" id="login-show">Already have an Account</a>
<button class="btn btn-primary btn-flat">Register</button>
</div>
</div>
</div>
</form>

</div>
<script>
$(function(){
$('#login-show').click(function(){
uni_modal("","login.php")
})
$('#registration').submit(function(e){
e.preventDefault();
start_loader()
if($('.err-msg').length > 0)
$('.err-msg').remove();
$.ajax({
url:_base_url_+"classes/Master.php?f=register",
method:"POST",
data:$(this).serialize(),
dataType:"json",

42
error:err=>{
console.log(err)
alert_toast("an error occured",'error')
end_loader()
},
success:function(resp){
if(typeof resp == 'object' && resp.status == 'success'){
alert_toast("Account succesfully registered",'success')
setTimeout(function(){
location.reload()
},2000)
}else if(resp.status == 'failed' && !!resp.msg){
var _err_el = $('<div>')
_err_el.addClass("alert alert-danger err-msg").text(resp.msg)
$('[name="password"]').after(_err_el)
end_loader()

}else{
console.log(resp)
alert_toast("an error occured",'error')
end_loader()
}
}
})
})

})
</script>

FORMS AFTER IMPROVEMENT:

43
Result:

Thus the system was successfully implemented after doing improvements.

44
45

You might also like