0% found this document useful (0 votes)
374 views

Lab Manual - LP2 - Sem - II - 2022 - 23

This document provides information about the laboratory practice course for third year computer engineering students at Savitribai Phule Pune University. It includes the course code, name, teaching and examination scheme, credits, objectives, and outcomes. The course involves assignments from artificial intelligence and elective courses involving concepts like search strategies, constraints, security, augmented reality, and software modeling.

Uploaded by

OMKAR. KARALE
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
374 views

Lab Manual - LP2 - Sem - II - 2022 - 23

This document provides information about the laboratory practice course for third year computer engineering students at Savitribai Phule Pune University. It includes the course code, name, teaching and examination scheme, credits, objectives, and outcomes. The course involves assignments from artificial intelligence and elective courses involving concepts like search strategies, constraints, security, augmented reality, and software modeling.

Uploaded by

OMKAR. KARALE
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 91

“Techno – Social Excellence”

Marathwada Mitramandal’s
INSTITUTE OF TECHNOLOGY
Lohgaon, Pune-411047

“Towards Ubiquitous Computing Technology”


DEPARTMENT OF COMPUTER ENGINEERING

Savitribai Phule Pune University


Third Year of Computer Engineering (2019 Course)
310248: Laboratory Practice II

LAB MANUAL
LP-II TE COMP
(2019 Pattern)
(Part 1)
Prepared By:
Prof. Vikas Chavan
Prof. Rohini Mahale
Savitribai Phule Pune University
Third Year of Computer Engineering (2019 Course) Home

(With effect from Academic Year 2021-22)

Semeste
r VI
Teaching
Cou Course Name Scheme Examination Scheme and Marks Credit Scheme
rse (Hours/wee
Co k)
de
$ T
$ P T M E
e
P O T L P T T
r u id- nd r r o e r u o
a r a a a t
t Se - t c t
c m c l c o
o m Se a t a
t w t t r
r m l u l
i o i i i
i r
c r c c a
a e
a k a a l
l
l l l
Data Science and Big
31025 0 - - 3 7 - - - 1 0 - - 03
Data Analytics
1 4 0 0 0 3
0
31025 Web Technology 0 - - 3 7 - - - 1 0 - - 03
2 4 0 0 0 3
0
31025 Artificial Intelligence 0 - - 3 7 - - - 1 0 - - 03
3 4 0 0 0 3
0
31025 Elective II 0 - - 3 7 - - - 1 0 - - 03
4 4 0 0 0 3
0
10 04
31025 Internship** - - - - - 0 - - 1 - - -
**
5 0
* 0
*
Data Science and Big
31025 Data - 0 - - - 5 2 - 7 - 0 - 02
6 Analytics 4 0 5 5 2
Laboratory
Web Technology
31025 - 0 - - - 2 - 2 5 - 0 - 01
Laboratory
7 2 5 5 0 1
31025 Laboratory Practice II - 0 - - - 5 2 - 7 - 0 - 02
8 4 0 5 5 2
Total 1 1 - 12 2 2 5 2 7 1 0 - 21
2 0 0 8 2 0 5 0 2 9
0 5 0
31025 Audit Course 6 Grade
9
Total 1 0 - 21
2 9
310254 Elective II Options: 310259 Audit Course 6 Options:
310254(A) Information Security 310254(B) 310259(A) Digital and Social Media Marketing
Augmented and Virtual Reality 310254(C) 310259(B) Sustainable Energy Systems
Cloud Computing 310259(C) Leadership and Personality Development
310254(D) Software Modeling and Architectures 310259(D) Foreign Language
310259(E) Learn New Skills

Laboratory Practice II:


Assignments from Artificial Intelligence and Elective II.
** Internship:
Internship guidelines are provided in course curriculum sheet.

#6/99
http://collegecirculars.unipune.ac.in/sites/documents/Syllabus2021/Forms/AllItems.aspx
Savitribai Phule Pune University
Third Year of Computer Engineering (2019 Course) Home

310258:Laboratory Practice II
Teaching Scheme Credit: 02 Examination Scheme and
Practical: 04 Marks Term Work: 50 Marks
Hours/Week Practical: 25 Marks
Companion Course: Artificial Intelligence (310253), Elective II (310254)
Course Objectives:
● To learn and apply various search strategies for AI
● To Formalize and implement constraints in search problems
● To understand the concepts of Information Security / Augmented and Virtual
Reality/Cloud Computing/Software Modeling and Architectures

Course Outcomes:
On completion of the course, learner will be able to
● Artificial Intelligence
CO1: Design a system using different informed search / uninformed search or
heuristic approaches
CO2: Apply basic principles of AI in solutions that require problem solving,
inference, perception, knowledge representation, and learning
CO3: Design and develop an interactive AI application
● Information Security
CO4: Use tools and techniques in the area of Information
Security CO5: Use the cryptographic techniques for problem
solving CO6: Design and develop security solution
OR
● Augmented and Virtual Reality
CO4: Use tools and techniques in the area of Augmented and Virtual Reality
CO5: Use the representing and rendering system for problem solving
CO6: Design and develop ARVR applications
OR
● Cloud Computing
CO4: Use tools and techniques in the area of Cloud Computing
CO5: Use cloud computing services for problem solving
CO6: Design and develop applications on cloud
OR

● Software Modeling and Architectures


CO4: Use tools and techniques in the area Software Modeling and Architectures
CO5: Use the knowledge of Software Modeling and Architectures for problem
solving
CO6: Design and develop applications using UML as fundamental tool
Guidelines for Instructor's Manual
The instructor‘s manual is to be developed as a reference and hands-on resource. It should include
prologue (about University/program/ institute/ department/foreword/ preface), curriculum of the
course, conduction and Assessment guidelines, topics under consideration, concept, objectives,
outcomes, set of typical applications/assignments/ guidelines, and references.
Guidelines for Student's Laboratory Journal
The laboratory assignments are to be submitted by student in the form of journal. Journal consists of
Certificate, table of contents, and handwritten write-up of each assignment (Title, Date of
Completion, Objectives, Problem Statement, Software and Hardware requirements, Assessment
grade/marks and assessor's sign, Theory- Concept in brief, algorithm, flowchart, test cases, Test Data
Set(if applicable), mathematical model (if applicable), conclusion/analysis. Program codes with
sample output of all performed assignments are to be submitted as softcopy. As a conscious effort
and little contribution towards Green IT and environment awareness, attaching printed papers as part
of write-ups and

program listing to journal must be avoided. Use of DVD containing students programs maintained
by Laboratory In-charge is highly encouraged. For reference one or two journals may be maintained
with program prints in the Laboratory.
Guidelines for Laboratory /Term Work Assessment
Continuous assessment of laboratory work should be based on overall performance of Laboratory
assignments by a student. Each Laboratory assignment assessment will assign grade/marks based on
parameters, such as timely completion, performance, innovation, efficient codes, punctuality and
Guidelines for Practical Examination
Problem statements must be decided jointly by the internal examiner and external examiner. During
practical assessment, maximum weightage should be given to satisfactory implementation of the
problem statement. Relevant questions may be asked at the time of evaluation to test the student‘s
understanding of the fundamentals, effective and efficient implementation. This will encourage,
transparent evaluation and fair approach, and hence will not create any uncertainty or doubt in the
minds of the students. So, adhering to these principles will consummate our team efforts to the
promising start of student's academics.
Guidelines for Laboratory Conduction
The instructor is expected to frame the assignments by understanding the prerequisites, technological
aspects, utility and recent trends related to the topic. The assignment framing policy need to address
the average students and inclusive of an element to attract and promote the intelligent students. Use
of open source software is encouraged. Based on the concepts learned. Instructor may also set one
assignment or mini-project that is suitable to respective branch beyond the scope of syllabus.
Operating System recommended :- 64-bit Windows OS and
Linux Programming tools recommended: -
Information Security : - C/C++/Java
Augmented and Virtual Reality :- Unity, C#, Blender, VRTK, ARTK, Vuforia
VR Devices: HTC Vive, Google Daydream and Samsung gear
VR. Software Modeling and Architectures:-Front end:HTML5, Bootstarp, JQuery, JS etc.
Backend: MySQL /MongoDB/NodeJS
Virtual Laboratory:
Software Modeling and Architectures : http://vlabs.iitkgp.ernet.in/se
Information Security : http://cse29-iiith.vlabs.ac.in
Part I : Artificial Intelligence
Suggested List of Laboratory Experiments/Assignments
Sr. Group A
No
All assignments are compulsory
.
1. Implement depth first search algorithm and Breadth First Search algorithm, Use an
undirected
graph and develop a recursive algorithm for searching all the vertices of a graph or tree data
structure.
2. Implement A star Algorithm for any game search problem.
3. Implement Greedy search algorithm for any of the following application:
I. Selection Sort
II. Minimum Spanning Tree
III. Single-Source Shortest Path Problem
IV. Job Scheduling Problem
V. Prim's Minimal Spanning Tree Algorithm
VI. Kruskal's Minimal Spanning Tree Algorithm
VII. Dijkstra's Minimal Spanning Tree Algorithm
Group B
4. Implement a solution for a Constraint Satisfaction Problem using Branch and Bound and
Backtracking for n-queens problem or a graph coloring problem.
5. Develop an elementary catboat for any suitable customer interaction application.
Group C

6. Implement any one of the following Expert System


I. Information management
II. Hospitals and medical facilities
III. Help desks management
IV. Employee performance evaluation
V. Stock market trading
VI. Airline scheduling and cargo schedules
Part II : Elective II
Suggested List of Laboratory Experiments/Assignments
Sr. Assignment Name
No
.
Information
Security (Any
five)
1. Write a Java/C/C++/Python program that contains a string (char pointer) with a value \Hello
World’. The program should AND or and XOR each character in this string with 127 and
display the result.
2. Write a Java/C/C++/Python program to perform encryption and decryption using the method
of
Transposition technique.
3. Write a Java/C/C++/Python program to implement DES algorithm.
4. Write a Java/C/C++/Python program to implement AES Algorithm.
5. Write a Java/C/C++/Python program to implement RSA algorithm.
6. Implement the different Hellman Key Exchange mechanism using HTML and JavaScript.
Consider the end user as one of the parties (Alice) and the JavaScript application as other
party
(bob).
7. Calculate the message digest of a text using the MD5 algorithm in JAVA.
Cloud Computing
(All assignments are compulsory)
1. Case study on Microsoft azure to learn about Microsoft Azure is a cloud computing platform
and infrastructure, created by Microsoft, for building, deploying and managing applications
and services through a global network of Microsoft-managed data centers.
OR
Case study on Amazon EC2 and learn about Amazon EC2 web services.
2. Installation and configure Google App Engine.
OR
Installation and Configuration of virtualization using KVM.
3. Creating an Application in SalesForce.com using Apex programming Language.
4. Design and develop custom Application (Mini Project) using Sales force Cloud.
5. Mini-Project
Setup your own cloud for Software as a Service (SaaS) over the existing LAN in your
laboratory. In this assignment you have to write your own code for cloud controller using
open- source technologies to implement with HDFS. Implement the basic operations may be
like to divide the file in segments/blocks and upload/ download file on/from cloud in
encrypted form.
Augmented and Virtual Reality
(Assignments 1,2, 3,7 are mandatory, any 2 from 4, 5
& 6)
1. Installation of Unity and Visual Studio, setting up Unity for VR development, understanding
documentation of the same.
2. Demonstration of the working of HTC Vive, Google Daydream or Samsung gear VR.
3. Develop a scene in Unity that includes:
i. A cube, plane and sphere, apply transformations on the 3 game objects.
ii. Add a video and audio source.
4. Develop a scene in Unity that includes a cube, plane and sphere. Create a new material and
texture separately for three Game objects. Change the color, material and texture of each
Game object separately in the scene. Write a C# program in visual studio to change the color
and material/texture of the game objects dynamically on button click.
5. Develop and deploy a simple marker based AR app in which you have to write a C# program
to play video on tracking a particular marker.
6. Develop and deploy an AR app, implement the following using Vuforia Engine developer
portal:
i. Plane detection
ii. Marker based Tracking(Create a database of objects to be tracked in Vuforia)
iii. Object Tracking
7. Mini-Projects/ Case Study
Create a multiplayer VR game (battlefield game). The game should keep track of score,
no. of chances/lives, levels(created using different scenes), involve interaction, animation
and immersive environment.
OR
Create a treasure hunt AR application which should have the following features:
i. A help button for instruction box to appear.
ii. A series of markers which would give hints on being scanned.
iii. Involve interaction, sound, and good UI.
Software Modeling and Architectures
(Problem statement 1, 2 , 5 are mandatory and any one from 3
and 4)
1. Consider a library, where a member can perform two operations: issue book and return it. A
book is issued to a member only after verifying his credentials. Develop a use case diagram
for the given library system by identifying the actors and use cases and associate the use
cases with the actors by drawing a use case diagram. Use UML tool.
2. Consider online shopping system. Perform the following tasks and draw the class
diagram using UML tool.
Represent the individual classes, and objects Add methods
Represent relationships and other classifiers like interfaces

3. Consider the online shopping system in the assignment 2. Draw the sequence diagram using
UML tool to show message exchanges
4. Consider your neighboring travel agent from whom you can purchase flight tickets. To book
a ticket you need to provide details about your journey i.e., on which date and at what time
you would like to travel. You also need to provide your address. The agency has recently
been modernized. So, you can pay either by cash or by card. You can also cancel a booked
ticket later if you decide to change your plan. In that case you need to book a new ticket again.
Your agent also allows you to book a hotel along with flight ticket. While cancelling a flight
ticket you can also cancel hotel booking. Appropriate refund as per policy is made in case of
cancellation.
Perform the following tasks and draw the use case diagram using UML tool.
a. Identify the use cases from a given non-trivial problem statement.
b. Identify the primary and secondary actors for a system.
c. Use to generalization of use cases and «include» stereotypes to prevent
redundancy in the coding phase
Mini-Projects

5. Select a moderately complex system and narrate concise requirement Specification for the
same. Design the system indicating system elements organizations using applicable
architectural styles and design patterns with the help of a detailed Class diagram depicting
logical architecture. Specify and document the architecture and design pattern with the help
of templates. Implement the system features and judge the benefits of the design patterns
accommodated.
Learning Resources
Text Books:
Artificial Intelligence
1. Stuart Russell and Peter Norvig, “Artificial Intelligence: A Modern Approach”, Third edition,
Pearson, 2003, ISBN :10: 0136042597
2. Deepak Khemani, “A First Course in Artificial Intelligence”, McGraw Hill Education(India),
2013, ISBN : 978-1-25-902998-1
3. Elaine Rich, Kevin Knight and Nair, “Artificial Intelligence”, TMH, ISBN-978-0-07-008770-5
Information Security
1. Atul Kahate, “Cryptography and Network Security”, 3e, McGraw Hill Education
2. Prakash C. Gupta, “Cryptography and Network Security”, PHI
3. V.K. Pachghare, “Cryptography and Information Security”, PHI Learning
Cloud Computing
1. A. Srinivasan, J. Suresh,” Cloud Computing: A Practical Approach for Learning and
Implementation”, Pearson, ISBN: 978-81-317-7651-3
2. Rajkumar Buyya, Christian Vecchiola, S. Thamarai Selvi, “Mastering Cloud Computing”,
McGraw Hill Education, ISBN-13:978-1-25-902995-0
Augmented and Virtual Reality
1. William R Sherman and Alan B Craig, “Understanding Virtual Reality: Interface, Application
and Design”, (The Morgan Kaufmann Series in Computer Graphics)”. Morgan Kaufmann
Publishers, San Francisco, CA, 2002
2. Alan B Craig, “Understanding Augmented Reality, Concepts and Applications”, Morgan
Kaufmann Publishers, ISBN:978-0240824086
Software Modeling and Architectures
1. Jim Arlow, Ila Neustadt, “UML 2 and the unified process –practical object-oriented analysis
and design”, Addison Wesley, Second edition, ISBN 978-0201770605
2. Len Bass, Paul Clements, Rick Kazman, ''Software Architecture in Practice", Second Edition,
Pearson ,ISBN 978-81-775-8996-2
3. Hassan Gomaa, “Software Modeling and Design- UML, Use cases, Patterns and Software
Architectures”, Cambridge University Press, 2011, ISBN 978-0-521-76414-8
4. Erich Gamma, “Design Patterns”, Pearson, ISBN 0-201-63361-2
Reference Books:
1. Nilsson Nils J , “Artificial Intelligence: A new Synthesis”, Morgan Kaufmann Publishers Inc.
San Francisco, CA, ISBN: 978-1-55-860467-4
2. Patrick Henry Winston, “Artificial Intelligence”, Addison-Wesley Publishing Company, ISBN:
0- 201-53377-4
3. Andries P. Engelbrecht, “Computational Intelligence: An Introduction”, 2nd Edition-Wiley
India-
ISBN: 978-0-470-51250-0
Information Security
1. William Stallings, Lawrie Brown, “Computer Security Principles and Practice”, 3rd_Edition,
Pearson
2. William Stallings, “Cryptography and Network Security Principals and Practice”, Fifth edition,
Pearson
3. Nina Godbole, Sunit Belapure, “Cyber Security”, Wiley, ISBN: 978-81-265-2179-1
Augmented and Virtual Reality
1. Steven M. LaValle, “Virtual Reality”, Cambridge University Press, 2016
2. Alan B Craig, William R Sherman and Jeffrey D Will, “Developing Virtual Reality Applications:
Foundations of Effective Design”, Morgan Kaufmann, 2009.
3. Schmalstieg / Hollerer, “Augmented Reality: Principles & Practice”, Pearson Education India; First
edition (12 October 2016),ISBN-10: 9332578494
Cloud Computing
1. James Bond ,“The Enterprise Cloud”, O'Reilly Media, Inc. ISBN: 9781491907627
2. Dr. Kris Jamsa, “Cloud Computing: SaaS, PaaS, IaaS, Virtualization and more”, Wiley Publications,
ISBN: 978-0-470-97389-9
3. Anthony T. Velte Toby J. Velte, Robert Elsenpeter, “Cloud Computing: A Practical Approach”, 2010,
The McGraw-Hill.
Software Modeling and Architectures
1. Gardy Booch, James Rambaugh, Ivar Jacobson, “The unified modeling language user guide” , Pearson
Education, Second edition, 2008, ISBN 0-321-24562-8.
2. Lan Sommerville, “Software Engineering”, 9th edition, ISBN-13: 978-0-13-703515-1 ISBN-10: 0- 13-
703515-2.

@The CO-PO Mapping Matrix


PO PO
CO/P P P P P P P P P P 10 11 PO1
O O1 O O O O O O O O 2
2 3 4 5 6 7 8 9
CO1 2 - 2 - 3 - - 2 2 2 1 2
CO2 1 - 2 2 3 2 - 2 2 2 1 2
CO3 1 - 2 2 3 2 - 2 2 2 2 2
CO4 1 - 2 - 3 - - 2 2 2 2 2
CO5 1 - 2 - 3 - - 2 2 2 2 2
CO6 1 - 2 - 3 - - 2 2 2 2 2
INDEX
Part I : Artificial Intelligence
Group A
Implement depth first search algorithm and Breadth First Search algorithm, Use an undirected
1 graph and develop a recursive algorithm for searching all the vertices of a graph or tree data
structure.

2 Implement A star Algorithm for any game search problem.

Implement Greedy search algorithm for any of the following application:


VIII. Selection Sort
IX. Minimum Spanning Tree
3 X. Single-Source Shortest Path Problem
XI. Job Scheduling Problem
XII. Prim's Minimal Spanning Tree Algorithm
XIII. Kruskal's Minimal Spanning Tree Algorithm
XIV. Dijkstra's Minimal Spanning Tree Algorithm
Part I : Artificial Intelligence
Group B

1 Implement a solution for a Constraint Satisfaction Problem using Branch and Bound and
Backtracking for n-queens problem or a graph coloring problem.
2 Develop an elementary catboat for any suitable customer interaction application.
Part I : Artificial Intelligence
Group C
Implement any one of the following Expert System

VII. Information management


VIII. Hospitals and medical facilities
1 IX. Help desks management
X. Employee performance evaluation
XI. Stock market trading

Airline scheduling and cargo schedules


LP: II Artificial Intelligence
Group A
Assignment 1:

Aim/Title:
Implement depth first search algorithm and Breadth First Search algorithm, Use an undirected
graph and develop a recursive algorithm for searching all the vertices of a graph or tree data
structure.

Objective: To understand the use of searching in artificial intelligence.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij

Theory:
● Searching in AI:
o Search: Searching is a step by step procedure to solve a search-problem in a given search space.
A search problem can have three main factors:
o Search Space: Search space represents a set of possible solutions, which a system may have.
o Start State: It is a state from where agent begins the search.
o Goal test: It is a function which observe the current state and returns whether the goal state is
achieved or not.
● Search tree: A tree representation of search problem is called Search tree. The root of the
search tree is the root node which is corresponding to the initial state.
● Actions: It gives the description of all the available actions to the agent.
● Transition model: A description of what each action do, can be represented as a transition
model.
● Path Cost: It is a function which assigns a numeric cost to each path.
● Solution: It is an action sequence which leads from the start node to the goal node.
● Optimal Solution: If a solution has the lowest cost among all solutions.
● Properties of Search Algorithms:
● Following are the four essential properties of search algorithms to compare the efficiency of
these algorithms:
● Completeness: A search algorithm is said to be complete if it guarantees to return a solution if
at least any solution exists for any random input.
● Optimality: If a solution found for an algorithm is guaranteed to be the best solution (lowest
path cost) among all other solutions, then such a solution for is said to be an optimal solution.
● Time Complexity: Time complexity is a measure of time for an algorithm to complete its task.
● Space Complexity: It is the maximum storage space required at any point during the search,
as the complexity of the problem. Types of search algorithms
● Based on the search problems we can classify the search algorithms into uninformed
(Blind search) search and informed search (Heuristic search) algorithms.

● Uninformed Search:
The uninformed search does not contain any domain knowledge such as closeness, the location
of the goal. It operates in a brute-force way as it only includes information about how to traverse
the tree and how to identify leaf and goal nodes. Uninformed search applies a way in which
search tree is searched without any information about the search space like initial state operators
and test for the goal, so it is also called blind search. It examines each node of the tree until it
achieves the goal node

● Informed Search:
● Informed search algorithms use domain knowledge. In an informed search, problem
information is available which can guide the search. Informed search strategies can find a
solution more efficiently than an uninformed search strategy. Informed search is also called a
Heuristic search.
A heuristic is a way which might not always be guaranteed for best solutions but guaranteed to
find a good solution in reasonable time.

● Heuristic Search
It includes Blind Search, Uninformed Search, and Blind control strategy. These search
techniques are not always possible as they require much memory and time. These techniques
search the complete space for a solution and use the arbitrary ordering of operations.
The examples of Direct Heuristic search techniques include Breadth-First Search (BFS) and
Depth First Search (DFS).
Weak Heuristic Search techniques in AI
It includes Informed Search, Heuristic Search, and Heuristic control strategy. These techniques
are helpful when they are applied properly to the right types of tasks. They usually require
domain-specific information.
The examples of Weak Heuristic search techniques include Best First Search (BFS) and A*.
Before describing certain heuristic techniques, let's see some of the techniques listed below:
● Bidirectional Search
● A* search
● Simulated Annealing
● Hill Climbing
● Best First search
● Beam search

Algorithm:
//Graph ADT
class graph
{
struct node //create structure of node
{
int data;
node *next;
};
public:
node *head[20];
stack<node*> stack;
queue<node*> Q;
int visited[20], no;
void display();
void edge_v1_v2(int, int);
void edge_v2_v1(int, int);
void DFS();
void BFS();
};

//Depth First Search Algorithm


DFS()
{
node *v, *f;
while(!empty())
{
f = pop();
if(visited[f->data] == 0)
{
visited[f->data] = 1;
v = head[f->data];
cout<<" "<<v->data;
v = v->next;
while(v)
{
push(v);
v = v->next;
}
}
}
}

//Breadth First Search


BFS()
{
node *v, *f;
while(!Qempty())
{
f = dequeue();
if(visited[f->data] == 0)
{
visited[f->data] = 1;
v = head[f->data];
cout<<" "<<v->data;
v = v->next;
while(v)
{
queue(v);
v = v->next;
}
}

}
}

//Insert an Edge
edge_v1_v2(int v1, int v2)
{
node *n, *f, *h;

//creating link from v1 to v2


h = new node;
h->data = v1;
h->next = NULL;

n = new node; //allocate memory for new node


n->data = v2; //assign vertex
n->next = NULL; //next link will be NULL

f = head[v1]; //head vertex is v1

if(f == NULL)
{
h->next = n;
head[v1] = h;
}
else
{
while(f->next)
f = f->next;
f->next = n;
}

//Display Adjacency List


display()
{
int i;
node *f;
for(i = 0 ; i < no; i++)
{
cout<<endl;
f = head[i];
while(f)
{
cout<<"\t"<<f->data;
f = f->next;
}
}
}
Output:

Conclusion:In this assignment we have successfully implemented the DFS and BFS.
Assignment 2:

Aim/Title: Implement A star Algorithm for any game search problem.

Objective: To use A-star Algorithm for optimal searching.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij
Theory:
A* Algorithm :
What is an A* Algorithm?
It is a searching algorithm that is used to find the shortest path between an initial and a final point.
It is a handy algorithm that is often used for map traversal to find the shortest path to be taken. A*
was initially designed as a graph traversal problem, to help build a robot that can find its own
course. It still remains a widely popular algorithm for graph traversal. It searches for shorter paths
first, thus making it an optimal and complete algorithm. An optimal algorithm will find the least
cost outcome for a problem, while a complete algorithm finds all the possible outcomes of a
problem. Another aspect that makes A* so powerful is the use of weighted graphs in its
implementation.
A weighted graph uses numbers to represent the cost of taking each
path or course of action. This means that the algorithms can take the path with the least cost, and
find the best route in terms of distance and time.

Figure 1: Weighted Graph


A major drawback of the algorithm is its space and time complexity. It takes a large amount of
space to store all possible paths and a lot of time to find them.
The Basic Concept of A* Algorithm
A heuristic algorithm sacrifices optimality, with precision and accuracy for speed, to solve
problems faster and more efficiently. All graphs have different nodes or points which the
algorithm has to take, to reach the final node. The paths between these nodes all have a numerical
value, which is considered as the weight of the path. The total of all paths transverse gives you the
cost of that route.
Initially, the Algorithm calculates the cost to all its immediate neighboring nodes, n, and chooses
the one incurring the least cost. This process repeats until no new nodes can be chosen and all
paths have been traversed. Then, you should consider the best path among them. If f(n) represents
the final cost, then it can be denoted as :
f(n) = g(n) + h(n), where :
g(n) = cost of traversing from one node to another. This will vary from node to node
h(n) = heuristic approximation of the node's value. This is not a real value but an approximation
cost
How Does the A* Algorithm Work?

Figure 2: Weighted Graph 2


Consider the weighted graph depicted above, which contains nodes and the distance between
them. Let's say you start from A and have to go to D. Now, since the start is at the source A, which
will have some initial heuristic value. Hence, the results are
f(A) = g(A) + h(A)
f(A) = 0 + 6 = 6
Next, take the path to other neighboring vertices :
f(A-B) = 1 + 4
f(A-C) = 5 + 2
Now take the path to the destination from these nodes, and calculate the weights :
f(A-B-D) = (1+ 7) + 0
f(A-C-D) = (5 + 10) + 0
It is clear that node B gives you the best path, so that is the node you need to take to reach the
destination.
Admissibility of A* Algorithm
● A search algorithm is admissible if, for any graph, it always terminates in an optimal
path (if it exists), from initial state to goal state.
● Thus, A search algorithm is said to be admissible, if it is guaranteed to return an optimal
solution.
● A heuristic “h(n)” is admissible, if for every node n,
h(n) ≤ h*(n),
where h*(n) = True cost to reach the goal state from n.
● When A* terminates its search, it has found a path, from start to goal, whose actual cost
is lower than the estimated cost of any path, through any open node.
● An admissible heuristic never overestimates the cost to reach the goal, i.e. it is optimistic.
Algorithm:
//A-Star Algorithm to find the shortest path of graph
class graph
{
struct node //create structure of node
{
int data;
int weight;
node *next;
};
public:
node *head[20];
int Heuristic[20], no, fn, gn;
void display();
void edge_v1_v2(int, int, int);
void Astar(int , int);
};
void graph :: edge_v1_v2(int v1, int v2, int w)
{
node *n, *f, *h;

//creating link from v1 to v2


h = new node;
h->data = v1;
h->next = NULL;

n = new node; //allocate memory for new node


n->data = v2; //assign vertex
n->weight = w;
n->next = NULL; //next link will be NULL

f = head[v1]; //head vertex is v1

if(f == NULL)
{
h->next = n;
head[v1] = h;
}
else
{
while(f->next)
f = f->next;
f->next = n;
}

}
void graph :: display()
{
int i;
node *f;
for(i = 0 ; i < no; i++)
{
cout<<endl;
f = head[i];
while(f)
{
cout<<"\t"<<f->data;
f = f->next;
}
}
}
void graph :: Astar(int src, int goal){
node *f;
gn = 0;
f = head[src];
cout<<"\n Shortest Path is :";
cout<<src<<"\t";
while(src != goal){
f = head[src];
f = f->next;
fn = Max;
while(f){
if(fn > (gn + f->weight + Heuristic[f->data])){
gn = gn + f->weight;
fn = gn + Heuristic[f->data];
src = f->data;
}
f = f->next;
}
cout<<src<<"\t";
}
}

Output:

Conclusion:

In this assignment we have successfully implemented the A-star Algorithm


Assignment 3:

Aim/Title:Implement Greedy search algorithm for any of the following application:

Selection Sort
Minimum Spanning Tree
Single-Source Shortest Path Problem
Job Scheduling Problem
Prim's Minimal Spanning Tree Algorithm
Kruskal's Minimal Spanning Tree Algorithm
Dijkstra's Minimal Spanning Tree Algorithm

Objective: To use Greedy Algorithm for searching a solution of a given problem.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij
Theory:
Greedy Algorithm
The greedy method is one of the strategies like Divide and conquer used to solve the problems.
This method is used for solving optimization problems. An optimization problem is a problem
that demands either maximum or minimum results. Let's understand through some terms. The
Greedy method is the simplest and straightforward approach. It is not an algorithm, but it is a
technique. The main function of this approach is that the decision is taken on the basis of the
currently available information. This technique is basically used to determine the feasible solution
that may or may not be optimal. The feasible solution is a subset that satisfies the given criteria.
The optimal solution is the solution which is the best and the most favorable solution in the subset.
In the case of feasible, if more than one solution satisfies the given criteria then those solutions
will be considered as the feasible, whereas the optimal solution is the best solution among all the
solutions.
Pseudo code of Greedy Algorithm
Algorithm Greedy (a, n)
{
Solution : = 0;
for i = 0 to n do
{
x: = select(a);
if feasible(solution, x)
{
Solution: = union(solution , x)
}
return solution;
}
}
The above is the greedy algorithm. Initially, the solution is assigned with zero value. We pass the
array and number of elements in the greedy algorithm. Inside the for loop, we select the element
one by one and checks whether the solution is feasible or not. If the solution is feasible, then we
perform the union.
Minimal Spanning Tree:
A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges
of a connected, edge-weighted undirected graph that connects all the vertices together, without
any cycles and with the minimum possible total edge weight. That is, it is a spanning tree whose
sum of edge weights is as small as possible. [2] More generally, any edge-weighted undirected
graph (not necessarily connected) has a minimum spanning forest, which is a union of the
minimum spanning trees for its connected components.
Prim’s Algorithm:
It is a greedy algorithm. It starts with an empty spanning tree. The idea is to maintain two sets of
vertices:
o Contain vertices already included in MST.
o Contain vertices not yet included.
At every step, it considers all the edges and picks the minimum weight edge. After picking the
edge, it moves the other endpoint of edge to set containing MST.
Spanning tree - A spanning tree is the subgraph of an undirected connected graph.
Minimum Spanning tree - Minimum spanning tree can be defined as the spanning tree in which
the sum of the weights of the edge is minimum. The weight of the spanning tree is the sum of the
weights given to the edges of the spanning tree.
Prim's Algorithm is a greedy algorithm that is used to find the minimum spanning tree from a
graph. Prim's algorithm finds the subset of edges that includes every vertex of the graph such that
the sum of the weights of the edges can be minimized.
How does the prim's algorithm work?
Prim's algorithm is a greedy algorithm that starts from one vertex and continue to add the edges
with the smallest weight until the goal is reached. The steps to implement the prim's algorithm are
given as follows -
o First, we have to initialize an MST with the randomly chosen vertex.
o Now, we have to find all the edges that connect the tree in the above step with the new
vertices. From the edges found, select the minimum edge and add it to the tree.
o Repeat step 2 until the minimum spanning tree is formed.
The applications of prim's algorithm are -
o Prim's algorithm can be used in network designing.
o It can be used to make network cycles.
o It can also be used to lay down electrical wiring cables.
Example of prim's algorithm
Now, let's see the working of prim's algorithm using an example. It will be easier to understand
the prim's algorithm using an example.
Suppose, a weighted graph is -
Step 1 - First, we have to choose a vertex from the above graph. Let's choose B.

Step 2 - Now, we have to choose and add the shortest edge from vertex B. There are two edges
from vertex B that are B to C with weight 10 and edge B to D with weight 4. Among the edges,
the edge BD has the minimum weight. So, add it to the MST.

Step 3 - Now, again, choose the edge with the minimum weight among all the other edges. In this
case, the edges DE and CD are such edges. Add them to MST and explore the adjacent of C, i.e.,
E and A. So, select the edge DE and add it to the MST.

Step 4 - Now, select the edge CD, and add it to the MST.
Step 5 - Now, choose the edge CA. Here, we cannot select the edge CE as it would create a cycle
to the graph. So, choose the edge CA and add it to the MST.

So, the graph produced in step 5 is the minimum spanning tree of the given graph. The cost of the
MST is given below -
Cost of MST = 4 + 2 + 1 + 3 = 10 units.
Algorithm:
class graph
{
struct node //create structure of node
{
int data;
int weight;
node *next;
};
public:
node *head[20];
int no;
void display();
void edge_v1_v2(int, int, int);
void Prims();
};

void graph :: edge_v1_v2(int v1, int v2, int w)


{
node *n, *f, *h;

//creating link from v1 to v2


h = new node;
h->data = v1;
h->next = NULL;

n = new node; //allocate memory for new node


n->data = v2; //assign vertex
n->weight = w;
n->next = NULL; //next link will be NULL

f = head[v1]; //head vertex is v1

if(f == NULL)
{
h->next = n;
head[v1] = h;
}
else
{
while(f->next)
f = f->next;
f->next = n;
}

}
void graph :: display()
{
int i;
node *f;
for(i = 0 ; i < no; i++)
{
cout<<endl;
f = head[i];
while(f)
{
cout<<"\t"<<f->data;
f = f->next;
}
}
}
Prims()
{
node *p;
int m, min_wt=0;
int v, v1, v2, wt;
int i,j;
int visited[10], vertex[10];

//Initialization
for(i=0; i<no; i++)
{
visited[i]=0; //identify whether vertex visited
vertex[i]=-1; //visited vertex inserted
}
vertex[0] = 0;
visited[0] = 1;
cout<<"\nMinimum Spanning Tree with minimum cost is\n";
cout<<head[0]->data;
for(i = 0; i<no-1; i++) //No. of vertices to visit
{
m = 9999; //set max value to find minimum cost
for(j=0; j<=i;j++) //check all edges of vistited vertex
{
v = vertex[j]; //get element from set of vertex
p = head[v]; //get header node
p = p->next;
while(p) //if p != NULL
{
if(visited[p->data] == 0)//identify whether vertex visited
{
wt = p->weight;
if(m > wt)
{
m = wt;
v1 = v;
v2 = p->data;
}
}
p = p->next;
}
}
cout<<" "<<head[v2]->data;
min_wt += m;
vertex[j] = v2;
visited[v2] = 1;
}
cout<<"\n Minimum cost is "<<min_wt<<endl;
cout<<endl;
}
Output:
Conclusion:
In this assignment we have successfully implemented the Minimum Spanning Tree with Prim’s
Algorithm
Group B
Assignment 4:

Aim/Title: Implement a solution for a Constraint Satisfaction Problem using Branch and Bound
and Backtracking for n-queens problem or a graph coloring problem

Objective: To implement a solution for a constraint satisfaction problem.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij
Theory:
Constraint Satisfaction Problem:
Constraint satisfaction is a technique where a problem is solved when its values satisfy certain
constraints or rules of the problem. Such type of technique leads to a deeper understanding of the
problem structure as well as its complexity. Constraint satisfaction depends on three components,
namely:
● X: It is a set of variables.
● D: It is a set of domains where the variables reside. There is a specific domain for each
variable.
● C: It is a set of constraints which are followed by the set of variables.
Types of Domains in CSP
There are following two types of domains which are used by the variables :
● Discrete Domain: It is an infinite domain which can have one state for multiple
variables. For example, a start state can be allocated infinite times for each variable.
● Finite Domain: It is a finite domain which can have continuous states describing one
domain for one specific variable. It is also called a continuous domain.
N—Queens Problem:
The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two
queens attack each other. For example, following is a solution for 4 Queen problem.
The expected output is a binary matrix which has 1s for the blocks where queens are placed. For
example, following is the output matrix for above 4 queen solution.
{ 0, 1, 0, 0}
{ 0, 0, 0, 1}
{ 1, 0, 0, 0}
{ 0, 0, 1, 0}

Backtracking Algorithm: The idea is to place queens one by one in different columns,
starting from the leftmost column. When we place a queen in a column, we check for clashes with
already placed queens. In the current column, if we find a row for which there is no clash, we
mark this row and column as part of the solution. If we do not find such a row due to clashes then
we backtrack and return false.
Branch and bound is an algorithm:
Branch and bound is an algorithm design paradigm which is generally used for solving
combinatorial optimization problems. These problems are typically exponential in terms of time
complexity and may require exploring all possible permutations in worst case. The N queens
puzzle is the problem of placing N chess queens on an N×N chessboard so that no two queens
threaten each other. Thus, a solution requires that no two queens share the same row, column, or
diagonal. In Branch and Bound solution, after building a partial solution, we figure out that there
is no point going any deeper as we are going to hit a dead end.
Let’s begin by describing backtracking solution. “The idea is to place queens one by one in
different columns, starting from the leftmost column. When we place a queen in a column, we
check for clashes with already placed queens. In the current column, if we find a row for which
there is no clash, we mark this row and column as part of the solution. If we do not find such a
row due to clashes, then we backtrack and return false.”

For the 1st Queen, there are total 8 possibilities as we can place 1st Queen in any row of first
column. Let’s place Queen 1 on row 3. After placing 1st Queen, there are 7 possibilities left for
the 2nd Queen. But wait, we don’t really have 7 possibilities. We cannot place Queen 2 on rows
2, 3 or 4 as those cells are under attack from Queen 1. So, Queen 2 has only 8 – 3 = 5 valid
positions left. After picking a position for Queen 2, Queen 3 has even fewer options as most of
the cells in its column are under attack from the first 2 Queens. We need to figure out an efficient
way of keeping track of which cells are under attack. In previous solution we kept an 8--by--8
Boolean matrix and update it each time we placed a queen, but that required linear time to update
as we need to check for safe cells.
Basically, we have to ensure 4 things:
1. No two queens share a column.
2. No two queens share a row.
3. No two queens share a top-right to left-bottom diagonal.
4. No two queens share a top-left to bottom-right diagonal.
Number 1 is automatic because of the way we store the solution. For number 2, 3 and 4, we can
perform updates in O(1) time. The idea is to keep three Boolean arrays that tell us which rows and
which diagonals are occupied.
Algorithm:
//Placing an Queen in k row and i column

int place(int k, int i)


{
int j;
for(j = 1; j<=k-1; j++)
{
if(x[j] == i || abs(x[j]-i) == abs(j - k))
return 1;
}
return 0;
}

//Backtracking Algorithm for N-Queens


void NQueens(int k, int n)
{
int i, j;
for(i = 1; i<=n; i++)
{
if(place(k, i) == 0)
{
x[k] = i;
if(k == n)
{
for(j = 1; j<=n; j++)
cout<<" "<<x[j];
cout<<"\n";
}
else
NQueens(k+1, n);
}
}
}

Output:

Conclusion:
In this assignment we have successfully implemented the N-Queens problem using backtracking
and branch and bound
Assignment 5:

Aim/Title: Develop an elementary chatbot for any suitable customer interaction


application.

Objective: To implement a solution chatbot for a customer interaction application.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language: C++, Java, Python
Software: Visual Studio Code, IntelliJ

Theory:
What is a Chatbot?
A chatbot is an AI-based software designed to interact with humans in their natural languages.
These chatbots are usually converse via auditory or textual methods, and they can effortlessly
mimic human languages to communicate with human beings in a human-like manner. A chatbot
is arguably one of the best applications of natural language processing. The Rule-based approach
trains a chatbot to answer questions based on a set of pre-determined rules on which it was initially
trained. These set rules can either be very simple or very complex. While rule-based chatbots can
handle simple queries quite well, they usually fail to process more complicated queries/requests.
As the name suggests, self-learning bots are chatbots that can learn on their own. These leverage
advanced technologies like Artificial Intelligence and Machine Learning to train themselves from
instances and behaviors. Naturally, these chatbots are much smarter than rule-based bots. Self-
learning bots can be further divided into two categories – Retrieval Based or Generative.

1. Retrieval-based Chatbots:
A retrieval-based chatbot is one that functions on predefined input patterns and set responses.
Once the question/pattern is entered, the chatbot uses a heuristic approach to deliver the
appropriate response. The retrieval-based model is extensively used to design goal-oriented
chatbots with customized features like the flow and tone of the bot to enhance the customer
experience.
2. Generative Chatbots :
Unlike retrieval-based chatbots, generative chatbots are not based on predefined responses – they
leverage seq2seq neural networks. This is based on the concept of machine translation where the
source code is translated from one language to another language. In seq2seq approach, the input
is transformed into an output. The first chatbot dates back to 1966 when Joseph Weizenbaum
created ELIZA that could imitate the language of a psychotherapist in only 200 lines of code.
However, thanks to the rapid advancement of technology, we’ve come a long way from scripted
chatbots to chatbots in python today.
Chatbot in Today’s Generation:
Today, we have smart AI-powered Chatbots that use natural language processing (NLP) to
understand human commands (text and voice) and learn from experience. Chatbots have become
a staple customer interaction tool for companies and brands that have an active online presence
(website and social network platforms). Chatbots using python are a nifty tool since they facilitate
instant messaging between the brand and the customer. Think about Apple’s Siri, Amazon’s
Alexa, and Microsoft’s Cortana. Aren’t these just wonderful? Aren’t you already curious to learn
how to make a chatbot in Python? ChatterBot is a Python library that is designed to deliver
automated responses to user inputs. It makes use of a combination of ML algorithms to generate
many different types of responses. This feature allows developers to build chatbots using python
that can converse with humans and deliver appropriate and relevant responses. Not just that, the
ML algorithms help the bot to improve its performance with experience. Another excellent feature
of ChatterBot is its language independence. The library is designed in a way that makes it possible
to train your bot in multiple programming languages.
How does ChatterBot function?
When a user enters a specific input in the chatbot (developed on ChatterBot), the bot saves the
input along with the response, for future use. This data (of collected experiences) allows the
chatbot to generate automated responses each time a new input is fed into it.
The program chooses the most-fitting response from the closest statement that matches the input,
and then delivers a response from the already known selection of statements and responses. Over
time, as the chatbot engages in more interactions, the accuracy of response improves.

Algorithm:
#Import Classes
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
# Create and Train the Chatbot
my_bot = ChatBot
(name='PyBot',read_onsly=True,logic_adapter=['chatterbot.logic.MathematicalEvaluation',
'chatterbot.logic.BestMatch'])

small_talk=['hi there',
'hi', 'how do you do',
'how are you',
'I am cool',
'I\'m fine',
'glad to hear that']
math_talk1= ['pythagorean theorem',
'a square plus b square equal c square']
math_talk2 = ['law of cosine', 'c**2=a**2+b**2-2*a*b*cos(gamma)']
list_trainer = ListTrainer(my_bot)
for item in(small_talk, math_talk1, math_talk2):
list_trainer.train(item)
#Communicate with the Python Chatbot
print(my_bot.get_response("hi"))
print(my_bot.get_response("how are you"))
print(my_bot.get_response("pythagorean theorem"))
Output:

Conclusion:

In this assignment we have successfully implemented the chatbot for customer


interaction application.
Group C
Assignment 6:

Aim/Title: Implement any one of the following Expert System I.Information


managements II. Hospitals and medical facilities III. Help desks management IV.
Employee performance evaluation V. Stock market trading VI. Airline scheduling
and cargo schedules

Objective: To understand the use of Expert system for Hospital and Medical
Facilities.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language: C++, Java, Python
Software: Visual Studio Code, IntelliJ

Theory:
What is an Expert System?
In artificial intelligence (AI), an expert system is a computer-based decision-making system. It is
designed to solve complex problems. To do so, it applies knowledge and logical reasoning and
adheres to certain rules. An expert system is one of the first successful forms of artificial
intelligence

Component Of Expert System:


● User interface – It is the most important part of the expert system software. The user
interface transfers the queries of the user and into the inference engine. Then it shows the
results to the user. It acts as a two-way communicator between the expert system and the
user.
Fig: Component Of Expert System
● Inference engine – The inference engine is the central processing unit of the expert
system. An inference engine works on rules and regulations to solve complex problems. It
uses information from the knowledge base. It smartly selects factual data and rules, and
processes and applies them to answer the user’s query. It also gives proper reasoning about
the data in the knowledge base. This helps detect and deduce complex problems and
prevents recurrence. And the last, the inference engine formulates conclusions.
The inference engine has the following strategies:
Forward chaining – Answers the question, “What can happen in the future?”
1. Backward chaining – Answers the question, “Why did this happen?”
● Knowledge base – The knowledge base is the information center. It contains all the
information about problem domains. It is like a large repository of information collected
from various experts.
Knowledge Base Components
Factual and heuristic knowledge is stored in the knowledge base.
● Factual Knowledge − Information pertaining to knowledge engineers.
● Heuristic Knowledge − Ability to evaluate and guess.
Capabilities Of Expert System:
Other Key Terms used in Expert System:
Apart from the expert system components listed above, the following terms are also extensively
used when discussing expert systems.
● Facts and rules – A fact is a small piece of important knowledge. Facts have limited use.
An expert system selects the rules to solve a problem.
● Knowledge acquisition – Knowledge acquisition refers to the method used to extract
domain-specific information by an expert system. The process begins by acquiring
knowledge from a human expert, converting human knowledge into facts and rules, and
finally feeding those rules into the knowledge base.

Algorithm:
from pyknow import *
diseases_list = []
diseases_symptoms = []
symptom_map = {}
d_desc_map = {}
d_treatment_map = {}

def preprocess():
global diseases_list,diseases_symptoms,symptom_map,d_desc_map,d_treatment_map
diseases = open("diseases.txt")
diseases_t = diseases.read()
diseases_list = diseases_t.split("\n")
diseases.close()
for disease in diseases_list:
disease_s_file = open("Disease symptoms/" + disease + ".txt")
disease_s_data = disease_s_file.read()
s_list = disease_s_data.split("\n")
diseases_symptoms.append(s_list)
symptom_map[str(s_list)] = disease
disease_s_file.close()
disease_s_file = open("Disease descriptions/" + disease + ".txt")
disease_s_data = disease_s_file.read()
d_desc_map[disease] = disease_s_data
disease_s_file.close()
disease_s_file = open("Disease treatments/" + disease + ".txt")
disease_s_data = disease_s_file.read()
d_treatment_map[disease] = disease_s_data
disease_s_file.close()

def identify_disease(*arguments):
symptom_list = []
for symptom in arguments:
symptom_list.append(symptom)
# Handle key error
return symptom_map[str(symptom_list)]

def get_details(disease):
return d_desc_map[disease]

def get_treatments(disease):
return d_treatment_map[disease]

def if_not_matched(disease):
print("")
id_disease = disease
disease_details = get_details(id_disease)
treatments = get_treatments(id_disease)
print("")
print("The most probable disease that you have is %s\n" %(id_disease))
print("A short description of the disease is given below :\n")
print(disease_details+"\n")
print("The common medications and procedures suggested by other real doctors
are: \n")
print(treatments+"\n")

# @my_decorator is just a way of saying just_some_function =


my_decorator(just_some_function)
#def identify_disease(headache, back_pain, chest_pain, cough, fainting, sore_throat, fatigue,
restlessness,low_body_temp ,fever,sunken_eyes):
class Greetings(KnowledgeEngine):
@DefFacts()
def _initial_action(self):
print("")
print("Hi! I am Dr.Yar, I am here to help you make your health better.")
print("For that you'll have to answer a few questions about your conditions")
print("Do you feel any of the following symptoms:")
print("")
yield Fact(action="find_disease")

@Rule(Fact(action='find_disease'), NOT(Fact(headache=W())),salience = 1)
def symptom_0(self):
self.declare(Fact(headache=input("headache: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(back_pain=W())),salience = 1)
def symptom_1(self):
self.declare(Fact(back_pain=input("back pain: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(chest_pain=W())),salience = 1)
def symptom_2(self):
self.declare(Fact(chest_pain=input("chest pain: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(cough=W())),salience = 1)
def symptom_3(self):
self.declare(Fact(cough=input("cough: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(fainting=W())),salience = 1)
def symptom_4(self):
self.declare(Fact(fainting=input("fainting: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(fatigue=W())),salience = 1)
def symptom_5(self):
self.declare(Fact(fatigue=input("fatigue: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(sunken_eyes=W())),salience = 1)
def symptom_6(self):
self.declare(Fact(sunken_eyes=input("sunken eyes: ")))
@Rule(Fact(action='find_disease'), NOT(Fact(low_body_temp=W())),salience = 1)
def symptom_7(self):
self.declare(Fact(low_body_temp=input("low body temperature: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(restlessness=W())),salience = 1)
def symptom_8(self):
self.declare(Fact(restlessness=input("restlessness: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(sore_throat=W())),salience = 1)
def symptom_9(self):
self.declare(Fact(sore_throat=input("sore throat: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(fever=W())),salience = 1)
def symptom_10(self):
self.declare(Fact(fever=input("fever: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(nausea=W())),salience = 1)
def symptom_11(self):
self.declare(Fact(nausea=input("Nausea: ")))

@Rule(Fact(action='find_disease'), NOT(Fact(blurred_vision=W())),salience = 1)
def symptom_12(self):
self.declare(Fact(blurred_vision=input("blurred_vision: ")))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="yes"
),Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="yes"),Fact(sunken_eyes="no"
),Fact(nausea="yes"),Fact(blurred_vision="no"))
def disease_0(self):
self.declare(Fact(disease="Jaundice"))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="no"),
Fact(restlessness="yes"),Fact(low_body_temp="no"),Fact(fever="no"),Fact(sunken_eyes="no"),
Fact(nausea="no"),Fact(blurred_vision="no"))
def disease_1(self):
self.declare(Fact(disease="Alzheimers"))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="yes"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="yes"
),Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="no"),Fact(sunken_eyes="no")
,Fact(nausea="no"),Fact(blurred_vision="no"))
def disease_2(self):
self.declare(Fact(disease="Arthritis"))
@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="yes"),Fact(cough="yes"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="no
"),Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="yes"),Fact(sunken_eyes="no
"),Fact(nausea="no"),Fact(blurred_vision="no"))
def disease_3(self):
self.declare(Fact(disease="Tuberculosis"))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="yes"),Fact(cough="yes"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="no
"),Fact(restlessness="yes"),Fact(low_body_temp="no"),Fact(fever="no"),Fact(sunken_eyes="no
"),Fact(nausea="no"),Fact(blurred_vision="no"))
def disease_4(self):
self.declare(Fact(disease="Asthma"))

@Rule(Fact(action='find_disease'),Fact(headache="yes"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="yes"),Fact(fainting="no"),Fact(sore_throat="yes"),Fact(fatigue="no
"),Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="yes"),Fact(sunken_eyes="no
"),Fact(nausea="no"),Fact(blurred_vision="no"))
def disease_5(self):
self.declare(Fact(disease="Sinusitis"))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="yes"
),Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="no"),Fact(sunken_eyes="no")
,Fact(nausea="no"),Fact(blurred_vision="no"))
def disease_6(self):
self.declare(Fact(disease="Epilepsy"))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="yes"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="no"
),Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="no"),Fact(sunken_eyes="no")
,Fact(nausea="yes"),Fact(blurred_vision="no"))
def disease_7(self):
self.declare(Fact(disease="Heart Disease"))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="yes"
),Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="no"),Fact(sunken_eyes="no")
,Fact(nausea="yes"),Fact(blurred_vision="yes"))
def disease_8(self):
self.declare(Fact(disease="Diabetes"))

@Rule(Fact(action='find_disease'),Fact(headache="yes"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="no"),
Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="no"),Fact(sunken_eyes="no"),
Fact(nausea="yes"),Fact(blurred_vision="yes"))
def disease_9(self):
self.declare(Fact(disease="Glaucoma"))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="yes"
),Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="no"),Fact(sunken_eyes="no")
,Fact(nausea="yes"),Fact(blurred_vision="no"))
def disease_10(self):
self.declare(Fact(disease="Hyperthyroidism"))

@Rule(Fact(action='find_disease'),Fact(headache="yes"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="no"),Fact(sore_throat="no"),Fact(fatigue="no"),
Fact(restlessness="no"),Fact(low_body_temp="no"),Fact(fever="yes"),Fact(sunken_eyes="no"),
Fact(nausea="yes"),Fact(blurred_vision="no"))
def disease_11(self):
self.declare(Fact(disease="Heat Stroke"))

@Rule(Fact(action='find_disease'),Fact(headache="no"),Fact(back_pain="no"),Fact(che
st_pain="no"),Fact(cough="no"),Fact(fainting="yes"),Fact(sore_throat="no"),Fact(fatigue="no"
),Fact(restlessness="no"),Fact(low_body_temp="yes"),Fact(fever="no"),Fact(sunken_eyes="no"
),Fact(nausea="no"),Fact(blurred_vision="no"))
def disease_12(self):
self.declare(Fact(disease="Hypothermia"))

@Rule(Fact(action='find_disease'),Fact(disease=MATCH.disease),salience = -998)
def disease(self, disease):
print("")
id_disease = disease
disease_details = get_details(id_disease)
treatments = get_treatments(id_disease)
print("")
print("The most probable disease that you have is %s\n" %(id_disease))
print("A short description of the disease is given below :\n")
print(disease_details+"\n")
print("The common medications and procedures suggested by other real doctors
are: \n")
print(treatments+"\n")

@Rule(Fact(action='find_disease'),
Fact(headache=MATCH.headache),
Fact(back_pain=MATCH.back_pain),
Fact(chest_pain=MATCH.chest_pain),
Fact(cough=MATCH.cough),
Fact(fainting=MATCH.fainting),
Fact(sore_throat=MATCH.sore_throat),
Fact(fatigue=MATCH.fatigue),
Fact(low_body_temp=MATCH.low_body_temp),
Fact(restlessness=MATCH.restlessness),
Fact(fever=MATCH.fever),
Fact(sunken_eyes=MATCH.sunken_eyes),
Fact(nausea=MATCH.nausea),

Fact(blurred_vision=MATCH.blurred_vision),NOT(Fact(disease=MATCH.disease)),sa
lience = -999)

def not_matched(self,headache, back_pain, chest_pain, cough, fainting, sore_throat,


fatigue, restlessness,low_body_temp ,fever ,sunken_eyes ,nausea ,blurred_vision):
print("\nDid not find any disease that matches your exact symptoms")
lis = [headache, back_pain, chest_pain, cough, fainting, sore_throat, fatigue,
restlessness,low_body_temp ,fever ,sunken_eyes ,nausea ,blurred_vision]
max_count = 0
max_disease = ""
for key,val in symptom_map.items():
count = 0
temp_list = eval(key)
for j in range(0,len(lis)):
if(temp_list[j] == lis[j] and lis[j] == "yes"):
count = count + 1
if count > max_count:
max_count = count
max_disease = val
if_not_matched(max_disease)

if __name__ == "__main__":
preprocess()
engine = Greetings()
while(1):
engine.reset() # Prepare the engine for the execution.
engine.run() # Run it!
print("Would you like to diagnose some other symptoms?")
if input() == "no":
exit()
#print(engine.facts)

Output:

Conclusion:

In this assignment we have successfully implemented the Expert System of Hospitals and Medical
facilities.
“Techno – Social Excellence”
Marathwada Mitramandal’s
INSTITUTE OF TECHNOLOGY
Lohgaon, Pune-411047

“Towards Ubiquitous Computing Technology”


DEPARTMENT OF COMPUTER ENGINEERING

Savitribai Phule Pune University


Third Year of Computer Engineering (2019 Course)
310248: Laboratory Practice II

LAB MANUAL
LP-II TE COMP
(2019 Pattern)
(Part 2)
Prepared By:
Dr. Mangesh D. Salunke
Prof. Suhas R. Kothavle
Savitribai Phule Pune University
Third Year of Computer Engineering (2019 Course) Home

(With effect from Academic Year 2021-22)


Semester VI
Teaching
Cour Course Name Scheme Examination Scheme and Marks Credit Scheme
se (Hours/week
Cod )
e
$ T
$ P T Mi En e
P O T L P T T
r u d- d- r r o e r u ot
a r a a a t
t Se Se t c al
c m c l t c o
o m m a
t w t t r
ri l u
i o i i i
a r
c r c c a
l e
a k a a l
l l l
Data Science and Big
310251 0 - - 30 7 - - - 1 0 - - 03
Data Analytics
4 0 0 3
0
310252 Web Technology 0 - - 30 7 - - - 1 0 - - 03
4 0 0 3
0
310253 Artificial Intelligence 0 - - 30 7 - - - 1 0 - - 03
4 0 0 3
0
310254 Elective II 0 - - 30 7 - - - 1 0 - - 03
4 0 0 3
0
10 04
310255 Internship** - - - - - 0 - - 1 - - -
**
0
** 0
Data Science and Big
310256 Data Analytics - 0 - - - 5 2 - 7 - 0 - 02
Laboratory 4 0 5 5 2
Web Technology
310257 - 0 - - - 2 - 2 5 - 0 - 01
Laboratory
2 5 5 0 1
310258 Laboratory Practice II - 0 - - - 5 2 - 7 - 0 - 02
4 0 5 5 2
Total 1 1 - 12 2 2 5 2 7 1 0 - 21
2 0 0 8 2 0 5 0 2 9
0 5 0
310259 Audit Course 6 Grade
Total 1 0 - 21
2 9
310254 Elective II Options: 310259 Audit Course 6 Options:
310254(A) Information Security 310254(B) 310259(A) Digital and Social Media Marketing
Augmented and Virtual Reality 310254(C) Cloud 310259(B) Sustainable Energy Systems
Computing 310259(C) Leadership and Personality Development
310254(D) Software Modeling and Architectures 310259(D) Foreign Language
310259(E) Learn New Skills
Laboratory Practice II:
Assignments from Artificial Intelligence and Elective II.
** Internship:
Internship guidelines are provided in course curriculum sheet.

#6/99
http://collegecirculars.unipune.ac.in/sites/documents/Syllabus2021/Forms/AllItems.aspx
Savitribai Phule Pune University
Third Year of Computer Engineering (2019 Course) Home

310258:Laboratory Practice II
Teaching Scheme Credit: 02 Examination Scheme and
Practical: 04 Marks Term Work: 50 Marks
Hours/Week Practical: 25 Marks
Companion Course: Artificial Intelligence (310253), Elective II (310254)
Course Objectives:
● To learn and apply various search strategies for AI
● To Formalize and implement constraints in search problems
● To understand the concepts of Information Security / Augmented and Virtual
Reality/Cloud Computing/Software Modeling and Architectures

Course Outcomes:
On completion of the course, learner will be able to
● Artificial Intelligence
CO1: Design a system using different informed search / uninformed search or
heuristic approaches
CO2: Apply basic principles of AI in solutions that require problem solving,
inference, perception, knowledge representation, and learning
CO3: Design and develop an interactive AI application
● Information Security
CO4: Use tools and techniques in the area of Information
Security CO5: Use the cryptographic techniques for problem
solving CO6: Design and develop security solution
OR
● Augmented and Virtual Reality
CO4: Use tools and techniques in the area of Augmented and Virtual Reality
CO5: Use the representing and rendering system for problem solving
CO6: Design and develop ARVR applications
OR
● Cloud Computing
CO4: Use tools and techniques in the area of Cloud Computing
CO5: Use cloud computing services for problem solving
CO6: Design and develop applications on cloud
OR

● Software Modeling and Architectures


CO4: Use tools and techniques in the area Software Modeling and Architectures
CO5: Use the knowledge of Software Modeling and Architectures for problem
solving
CO6: Design and develop applications using UML as fundamental tool
Guidelines for Instructor's Manual
The instructor‘s manual is to be developed as a reference and hands-on resource. It should include
prologue (about University/program/ institute/ department/foreword/ preface), curriculum of the
course, conduction and Assessment guidelines, topics under consideration, concept, objectives,
outcomes, set of typical applications/assignments/ guidelines, and references.
Guidelines for Student's Laboratory Journal
The laboratory assignments are to be submitted by student in the form of journal. Journal consists of
Certificate, table of contents, and handwritten write-up of each assignment (Title, Date of
Completion, Objectives, Problem Statement, Software and Hardware requirements, Assessment
grade/marks and assessor's sign, Theory- Concept in brief, algorithm, flowchart, test cases, Test Data
Set(if applicable), mathematical model (if applicable), conclusion/analysis. Program codes with
sample output of all performed assignments are to be submitted as softcopy. As a conscious effort
and little contribution towards Green IT and environment awareness, attaching printed papers as part
of write-ups and

program listing to journal must be avoided. Use of DVD containing students programs maintained by
Laboratory In-charge is highly encouraged. For reference one or two journals may be maintained with
program prints in the Laboratory.
Guidelines for Laboratory /Term Work Assessment
Continuous assessment of laboratory work should be based on overall performance of Laboratory
assignments by a student. Each Laboratory assignment assessment will assign grade/marks based on
parameters, such as timely completion, performance, innovation, efficient codes, punctuality and
Guidelines for Practical Examination
Problem statements must be decided jointly by the internal examiner and external examiner. During
practical assessment, maximum weightage should be given to satisfactory implementation of the
problem statement. Relevant questions may be asked at the time of evaluation to test the student‘s
understanding of the fundamentals, effective and efficient implementation. This will encourage,
transparent evaluation and fair approach, and hence will not create any uncertainty or doubt in the
minds of the students. So, adhering to these principles will consummate our team efforts to the
promising start of student's academics.
Guidelines for Laboratory Conduction
The instructor is expected to frame the assignments by understanding the prerequisites, technological
aspects, utility and recent trends related to the topic. The assignment framing policy need to address
the average students and inclusive of an element to attract and promote the intelligent students. Use
of open source software is encouraged. Based on the concepts learned. Instructor may also set one
assignment or mini-project that is suitable to respective branch beyond the scope of syllabus.
Operating System recommended :- 64-bit Windows OS and
Linux Programming tools recommended: -
Information Security : - C/C++/Java
Augmented and Virtual Reality :- Unity, C#, Blender, VRTK, ARTK, Vuforia
VR Devices: HTC Vive, Google Daydream and Samsung gear
VR. Software Modeling and Architectures:-Front end:HTML5, Bootstarp, JQuery, JS etc.
Backend: MySQL /MongoDB/NodeJS
Virtual Laboratory:
Software Modeling and Architectures : http://vlabs.iitkgp.ernet.in/se
Information Security : http://cse29-iiith.vlabs.ac.in
Part I : Artificial Intelligence
Suggested List of Laboratory Experiments/Assignments
Sr. Group A
No.
All assignments are compulsory
1. Implement depth first search algorithm and Breadth First Search algorithm, Use an
undirected
graph and develop a recursive algorithm for searching all the vertices of a graph or tree data
structure.

2. Implement A star Algorithm for any game search problem.


3. Implement Greedy search algorithm for any of the following application:
XV. Selection Sort
XVI. Minimum Spanning Tree
XVII. Single-Source Shortest Path Problem
XVIII. Job Scheduling Problem
XIX. Prim's Minimal Spanning Tree Algorithm
XX. Kruskal's Minimal Spanning Tree Algorithm
XXI. Dijkstra's Minimal Spanning Tree Algorithm
Group B
4. Implement a solution for a Constraint Satisfaction Problem using Branch and Bound and
Backtracking for n-queens problem or a graph coloring problem.
5. Develop an elementary catboat for any suitable customer interaction application.
Group C

6. Implement any one of the following Expert System


XII. Information management
XIII. Hospitals and medical facilities
XIV. Help desks management
XV. Employee performance evaluation
XVI. Stock market trading
XVII. Airline scheduling and cargo schedules
Part II : Elective II
Suggested List of Laboratory Experiments/Assignments
Sr. Assignment Name
No.
Information
Security (Any
five)
1. Write a Java/C/C++/Python program that contains a string (char pointer) with a value \Hello
World’. The program should AND or and XOR each character in this string with 127 and
display the result.
2. Write a Java/C/C++/Python program to perform encryption and decryption using the method
of
Transposition technique.
3. Write a Java/C/C++/Python program to implement DES algorithm.
4. Write a Java/C/C++/Python program to implement AES Algorithm.
5. Write a Java/C/C++/Python program to implement RSA algorithm.
6. Implement the different Hellman Key Exchange mechanism using HTML and JavaScript.
Consider the end user as one of the parties (Alice) and the JavaScript application as other
party
(bob).
7. Calculate the message digest of a text using the MD5 algorithm in JAVA.
Cloud Computing
(All assignments are compulsory)
1. Case study on Microsoft azure to learn about Microsoft Azure is a cloud computing platform
and infrastructure, created by Microsoft, for building, deploying and managing applications
and services through a global network of Microsoft-managed data centers.
OR
Case study on Amazon EC2 and learn about Amazon EC2 web services.
2. Installation and configure Google App Engine.
OR
Installation and Configuration of virtualization using KVM.
3. Creating an Application in SalesForce.com using Apex programming Language.
4. Design and develop custom Application (Mini Project) using Sales force Cloud.
5. Mini-Project
Setup your own cloud for Software as a Service (SaaS) over the existing LAN in your
laboratory. In this assignment you have to write your own code for cloud controller using
open- source technologies to implement with HDFS. Implement the basic operations may be
like to divide the file in segments/blocks and upload/ download file on/from cloud in
encrypted form.
Augmented and Virtual Reality
(Assignments 1,2, 3,7 are mandatory, any 2 from 4, 5
& 6)
1. Installation of Unity and Visual Studio, setting up Unity for VR development, understanding
documentation of the same.
2. Demonstration of the working of HTC Vive, Google Daydream or Samsung gear VR.
3. Develop a scene in Unity that includes:
iii. A cube, plane and sphere, apply transformations on the 3 game objects.
iv. Add a video and audio source.
4. Develop a scene in Unity that includes a cube, plane and sphere. Create a new material and
texture separately for three Game objects. Change the color, material and texture of each
Game object separately in the scene. Write a C# program in visual studio to change the color
and material/texture of the game objects dynamically on button click.
5. Develop and deploy a simple marker based AR app in which you have to write a C# program
to play video on tracking a particular marker.
6. Develop and deploy an AR app, implement the following using Vuforia Engine developer
portal:
iv. Plane detection
v. Marker based Tracking(Create a database of objects to be tracked in Vuforia)
vi. Object Tracking
7. Mini-Projects/ Case Study
Create a multiplayer VR game (battlefield game). The game should keep track of score,
no. of chances/lives, levels(created using different scenes), involve interaction, animation
and immersive environment.
OR
Create a treasure hunt AR application which should have the following features:
iv. A help button for instruction box to appear.
v. A series of markers which would give hints on being scanned.
vi. Involve interaction, sound, and good UI.
Software Modeling and Architectures
(Problem statement 1, 2 , 5 are mandatory and any one from 3
and 4)
1. Consider a library, where a member can perform two operations: issue book and return it. A
book is issued to a member only after verifying his credentials. Develop a use case diagram
for the given library system by identifying the actors and use cases and associate the use
cases with the actors by drawing a use case diagram. Use UML tool.
2. Consider online shopping system. Perform the following tasks and draw the class
diagram using UML tool.
Represent the individual classes, and objects Add methods
Represent relationships and other classifiers like interfaces

3. Consider the online shopping system in the assignment 2. Draw the sequence diagram using
UML tool to show message exchanges
4. Consider your neighboring travel agent from whom you can purchase flight tickets. To book
a ticket you need to provide details about your journey i.e., on which date and at what time
you would like to travel. You also need to provide your address. The agency has recently
been modernized. So, you can pay either by cash or by card. You can also cancel a booked
ticket later if you decide to change your plan. In that case you need to book a new ticket again.
Your agent also allows you to book a hotel along with flight ticket. While cancelling a flight
ticket you can also cancel hotel booking. Appropriate refund as per policy is made in case of
cancellation.
Perform the following tasks and draw the use case diagram using UML tool.
d. Identify the use cases from a given non-trivial problem statement.
e. Identify the primary and secondary actors for a system.
f. Use to generalization of use cases and «include» stereotypes to prevent
redundancy in the coding phase
Mini-Projects

5. Select a moderately complex system and narrate concise requirement Specification for the
same. Design the system indicating system elements organizations using applicable
architectural styles and design patterns with the help of a detailed Class diagram depicting
logical architecture. Specify and document the architecture and design pattern with the help
of templates. Implement the system features and judge the benefits of the design patterns
accommodated.
Learning Resources
Text Books:
Artificial Intelligence
1. 1.Stuart Russell and Peter Norvig, “Artificial Intelligence: A Modern Approach”, Third
edition, Pearson, 2003, ISBN :10: 0136042597
2. Deepak Khemani, “A First Course in Artificial Intelligence”, McGraw Hill
Education(India), 2013, ISBN : 978-1-25-902998-1
3. Elaine Rich, Kevin Knight and Nair, “Artificial Intelligence”, TMH, ISBN-978-0-07-
008770-5
Information Security
1. Atul Kahate, “Cryptography and Network Security”, 3e, McGraw Hill Education
2. Prakash C. Gupta, “Cryptography and Network Security”, PHI
3. V.K. Pachghare, “Cryptography and Information Security”, PHI Learning
Cloud Computing
1. Srinivasan, J. Suresh,” Cloud Computing: A Practical Approach for Learning and
Implementation”, Pearson, ISBN: 978-81-317-7651-3
2. Rajkumar Buyya, Christian Vecchiola, S. Thamarai Selvi, “Mastering Cloud
Computing”, McGraw Hill Education, ISBN-13:978-1-25-902995-0
Augmented and Virtual Reality
1. William R Sherman and Alan B Craig, “Understanding Virtual Reality: Interface,
Application and Design”, (The Morgan Kaufmann Series in Computer Graphics)”. Morgan
Kaufmann Publishers, San Francisco, CA, 2002
2. Alan B Craig, “Understanding Augmented Reality, Concepts and Applications”, Morgan
Kaufmann Publishers, ISBN:978-0240824086
Software Modeling and Architectures
1. Jim Arlow, Ila Neustadt, “UML 2 and the unified process –practical object-oriented
analysis and design”, Addison Wesley, Second edition, ISBN 978-0201770605
2. Len Bass, Paul Clements, Rick Kazman, ''Software Architecture in Practice", Second
Edition, Pearson ,ISBN 978-81-775-8996-2
3. Hassan Gomaa, “Software Modeling and Design- UML, Use cases, Patterns and Software
Architectures”, Cambridge University Press, 2011, ISBN 978-0-521-76414-8
4. Erich Gamma, “Design Patterns”, Pearson, ISBN 0-201-63361-2
Reference Books:
1. Nilsson Nils J , “Artificial Intelligence: A new Synthesis”, Morgan Kaufmann Publishers
Inc. San Francisco, CA, ISBN: 978-1-55-860467-4
2. Patrick Henry Winston, “Artificial Intelligence”, Addison-Wesley Publishing Company,
ISBN: 0- 201-53377-4
3. Andries P. Engelbrecht, “Computational Intelligence: An Introduction”, 2nd Edition-Wiley
India-
ISBN: 978-0-470-51250-0
Information Security
1. William Stallings, Lawrie Brown, “Computer Security Principles and Practice”, 3rd_Edition,
Pearson
2. William Stallings, “Cryptography and Network Security Principals and Practice”, Fifth edition,
Pearson
3. Nina Godbole, Sunit Belapure, “Cyber Security”, Wiley, ISBN: 978-81-265-2179-1
Augmented and Virtual Reality
1. Steven M. LaValle, “Virtual Reality”, Cambridge University Press, 2016
2. Alan B Craig, William R Sherman and Jeffrey D Will, “Developing Virtual Reality Applications:
Foundations of Effective Design”, Morgan Kaufmann, 2009.
3. Schmalstieg / Hollerer, “Augmented Reality: Principles & Practice”, Pearson Education India; First
edition (12 October 2016),ISBN-10: 9332578494
Cloud Computing
1. James Bond ,“The Enterprise Cloud”, O'Reilly Media, Inc. ISBN: 9781491907627
2. Dr. Kris Jamsa, “Cloud Computing: SaaS, PaaS, IaaS, Virtualization and more”, Wiley Publications,
ISBN: 978-0-470-97389-9
3. Anthony T. Velte Toby J. Velte, Robert Elsenpeter, “Cloud Computing: A Practical Approach”, 2010,
The McGraw-Hill.
Software Modeling and Architectures
1. Gardy Booch, James Rambaugh, Ivar Jacobson, “The unified modeling language user guide” , Pearson
Education, Second edition, 2008, ISBN 0-321-24562-8.
2. Lan Sommerville, “Software Engineering”, 9th edition, ISBN-13: 978-0-13-703515-1 ISBN-10: 0- 13-
703515-2.

@The CO-PO Mapping Matrix


PO PO
CO/P P P P P P P P P P 10 11 PO1
O O1 O O O O O O O O 2
2 3 4 5 6 7 8 9
CO1 2 - 2 - 3 - - 2 2 2 1 2
CO2 1 - 2 2 3 2 - 2 2 2 1 2
CO3 1 - 2 2 3 2 - 2 2 2 2 2
CO4 1 - 2 - 3 - - 2 2 2 2 2
CO5 1 - 2 - 3 - - 2 2 2 2 2
CO6 1 - 2 - 3 - - 2 2 2 2 2
INDEX
Sr. Title of Assignment
No.

1 Write a Java/C/C++/Python program that contains a string (char pointer)


with a value \Hello World’. The program should AND and XOR each
character in this string with127 and display the result.

2 Write a Java/C/C++/Python program to implement DES algorithm.

3 Write a Java/C/C++/Python program to implement AES Algorithm.

4 Write a Java/C/C++/Python program to implement RSA algorithm

5 Implement the Diffie-Hellman Key Exchange mechanism using HTML


and JavaScript. Consider the end user as one of the parties (Alice) and the
JavaScript application as other party (bob).
Assignment no. 1

AIM:
Write a Java/C/C++/Python program that contains a string (char pointer) with a value
\HelloWorld’. The program should AND and XOR each character in this string with127 and
display the result.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Eclipse

Theory:
The AND gate is an electronic circuit that gives a high output(1) only if all the inputs are
high. A dot(.) is used to show the AND operation i.e. A.B this dot is sometimes omitted.

Fig: XOR Gate


Fig: AND Gate

ALGORITHM:
1. start
2. take the input ‘hello world’ which is assigned to variable ‘str’
3.perform AND operation between the string and 127.
4. then print the result
5. Stop.

Output:

Conclusion: Thus we have studied XOR and AND gate operation on string to identify the
encryption and decryption process.
Assignment no. 3
Aim:
Write a Java/C/C++/Python program to implement DES algorithm.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Eclipse

Theory:
Data encryption standard (DES) has been found vulnerable against very powerful
attacks and therefore, the popularity of DES has been found slightly on the decline.
DES is a block cipher and encrypts data in blocks of size of 64 bits each, which means
64 bits of plain text goes as the input to DES, which produces 64 bits of ciphertext. The same
algorithm and key are used for encryption and decryption, with minor differences. The key
length is 56 bits. The basic idea is shown in the figure.
We have mentioned that DES uses a 56-bit key. Actually, the initial key consists of 64
bits. However, before the DES process even starts, every 8th bit of the key is discarded to
produce a 56-bit key. That is bit positions 8, 16, 24, 32, 40, 48, 56, and 64 are discarded.

Thus, the discarding of every 8th bit of the key produces a 56-bit key from the original 64-bit
key.

DES is based on the two fundamental attributes of cryptography: substitution (also called
confusion) and transposition (also called diffusion). DES consists of 16 steps, each of which is
called a round. Each round performs the steps of substitution and transposition. Let us now
discuss the broad-level steps in DES.

1. In the first step, the 64-bit plain text block is handed over to an initial Permutation
(IP) function.
2. The initial permutation is performed on plain text.
3. Next, the initial permutation (IP) produces two halves of the permuted block; says
Left Plain Text (LPT) and Right Plain Text (RPT).
4. Now each LPT and RPT go through 16 rounds of the encryption process.
5. In the end, LPT and RPT are rejoined and a Final Permutation (FP) is performed
on the combined block
6. The result of this process produces 64-bit ciphertext.

Initial Permutation (IP) –

As we have noted, the initial permutation (IP) happens only once and it
happens before the first round. It suggests how the transposition in IP should proceed, as shown
in the figure.

For example, it says that the IP replaces the first bit of the original plain text block with the
58th bit of the original plain text, the second bit with the 50th bit of the original plain text block,
and so on.

This is nothing but jugglery of bit positions of the original plain text block. the same rule
applies to all the other bit positions shown in the figure.

As we have noted after IP is done, the resulting 64-bit permuted text block is divided into two
half blocks. Each half-block consists of 32 bits, and each of the 16 rounds, in turn, consists of
the broad level steps outlined in the figure.

Step-1: Key transformation –

We have noted initial 64-bit key is transformed into a 56-bit key by discarding
every 8th bit of the initial key. Thus, for each a 56-bit key is available. From this 56-bit key, a
different 48-bit Sub Key is generated during each round using a process called key
transformation. For this, the 56-bit key is divided into two halves, each of 28 bits. These halves
are circularly shifted left by one or two positions, depending on the round.

For example, if the round numbers 1, 2, 9, or 16 the shift is done by only position for other
rounds, the circular shift is done by two positions. The number of key bits shifted per round is
shown in the figure.

After an appropriate shift, 48 of the 56 bits are selected. for selecting 48 of the 56 bits the table
is shown in the figure given below. For instance, after the shift, bit number 14 moves on the
first position, bit number 17 moves on the second position, and so on. If we observe the table
carefully, we will realize that it contains only 48-bit positions. Bit number 18 is discarded (we
will not find it in the table), like 7 others, to reduce a 56-bit key to a 48-bit key. Since the key
transformation process involves permutation as well as a selection of a 48-bit subset of the
original 56-bit key it is called Compression Permutation.

Because of this compression permutation technique, a different subset of key bits is used in
each round. That makes DES not easy to crack.

Step-2: Expansion Permutation –

Recall that after initial permutation, we had two 32-bit plain text areas called Left Plain
Text(LPT) and Right Plain Text(RPT). During the expansion permutation, the RPT is
expanded from 32 bits to 48 bits. Bits are permuted as well hence called expansion permutation.
This happens as the 32-bit RPT is divided into 8 blocks, with each block consisting of 4 bits.
Then, each 4-bit block of the previous step is then expanded to a corresponding 6-bit block,
i.e., per 4-bit block, 2 more bits are added.
This process results in expansion as well as a permutation of the input bit while creating output.
The key transformation process compresses the 56-bit key to 48 bits. Then the expansion
permutation process expands the 32-bit RPT to 48-bits. Now the 48-bit key is XOR with 48-
bit RPT and the resulting output is given to the next step, which is the S-Box substitution.

Python Program:

# Hexadecimal to binary conversion

def hex2bin(s):

mp = {'0' : "0000",

'1' : "0001",

'2' : "0010",

'3' : "0011",

'4' : "0100",

'5' : "0101",

'6' : "0110",

'7' : "0111",

'8' : "1000",

'9' : "1001",

'A' : "1010",

'B' : "1011",

'C' : "1100",

'D' : "1101",

'E' : "1110",
'F' : "1111" }

bin = ""

for i in
range(len(s)): bin
= bin + mp[s[i]]

return bin

# Binary to hexadecimal conversion

def bin2hex(s):

mp = {"0000" : '0',

"0001" : '1',

"0010" : '2',

"0011" : '3',

"0100" : '4',

"0101" : '5',

"0110" : '6',

"0111" : '7',

"1000" : '8',

"1001" : '9',

"1010" : 'A',

"1011" : 'B',

"1100" : 'C',

"1101" : 'D',

"1110" : 'E',

"1111" : 'F' }

hex = ""

for i in
range(0,len(s),4): ch
= ""

ch = ch + s[i]

ch = ch + s[i +
1] ch = ch + s[i
+ 2] ch = ch + s[i
+ 3] hex = hex +
mp[ch]
return hex

# Binary to decimal conversion

def bin2dec(binary):

binary1 = binary
decimal, i, n = 0, 0,
0

while(binary != 0):
dec = binary %
10

decimal = decimal + dec * pow(2,


i) binary = binary//10

i += 1

return decimal

# Decimal to binary conversion

def dec2bin(num):

res = bin(num).replace("0b", "")

if(len(res)%4 != 0):
div = len(res) /
4

div = int(div)

counter =(4 * (div + 1)) - len(res)

for i in range(0,
counter): res = '0' +
res

return res

# Permute function to rearrange the bits

def permute(k, arr,


n): permutation =
""

for i in range(0, n):

permutation = permutation + k[arr[i] - 1]

return permutation
# shifting the bits towards left by nth shifts

def shift_left(k,
nth_shifts): s = ""

for i in range(nth_shifts):

for j in
range(1,len(k)): s
= s + k[j]

s = s +
k[0] k = s

s = ""

return k

# calculating xow of two strings of binary number a and b

def xor(a,
b): ans =
""

for i in range(len(a)):

if a[i] == b[i]:
ans = ans +
"0"

else:
ans = ans + "1"

return ans

# Table of Position of 64 bits at initial level: Initial Permutation


Table

initial_perm = [58, 5 4 3 2 1 1 2
0, 2, 4, 6, 8, 0, ,
60, 5 4 3 2 2 1 4
2, 4, 6, 8, 0, 2, ,
62, 5 4 3 3 2 1 6
4, 6, 8, 0, 2, 4, ,
64, 5 4 4 3 2 1 8
6, 8, 0, 2, 4, 6, ,
57, 49, 41, 33, 25, 17, 9, 1,
59, 5 4 3 2 1 1 3
1, 3, 5, 7, 9, 1, ,
61, 5 4 3 2 2 1 5
3, 5, 7, 9, 1, 3, ,
63, 5 4 3 3 2 1 7
5, 7, 9, 1, 3, 5, ]
# Expansion D-box Table

exp_d = [32, 1 , 2 , 3 , 4 , 5 , 4 , 5,

6 , 7 , 8 , 9 , 8 , 9 , 10, 11,

1 1 1 1 1 1 1 1
2, 3, 2, 3, 4, 5, 6, 7,
1 1 1 1 2 2 2 2
6, 7, 8, 9, 0, 1, 0, 1,
2 2 2 2 2 2 2 2
2, 3, 4, 5, 4, 5, 6, 7,
2 2 2 2 3 3 3 1
8, 9, 8, 9, 0, 1, 2, ]

# Straight Permutation Table

per = [ 1 7, 2 21,
6, 0,
2 1 2 17,
9, 2, 8,
1, 1 2 26,
5, 3,
5, 1 3 10,
8, 1,
2, 8, 2 14,
4,
3 2 3, 9,
2, 7,
1 1 3 6,
9, 3, 0,
2 1 4, 25
2, 1, ]

# S-box Table

sbox = [[[14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7],

[ 0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8],


[ 4, 1, 14, 8 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0],
,
[15, 12, 8, 2 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13 ]],
,

[[15, 1, 8, 14, 6, 11, 3, 4, 9, 7,


2 13, 12, 0, 5, 10],
,
[3, 13, 4, 7, 15, 2, 8, 14, 12, 0 1, 10, 6, 9, 11, 5],
,
[0, 14, 7, 11, 10, 4, 13, 1, 5, 8 12, 6, 9, 3, 2, 15],
,
[13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9 ]],

[ [10 0 9 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8]


, , , ,
[13 7 0 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1]
, , , ,
[13 6 4 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7]
, , , ,
[1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12 ]],

[ [7, 13, 14, 3, 0, 6,


9 10, 1, 2, 8, 5, 11, 12, 4, 15]
, ,
[13, 8, 11, 5, 6, 15, 0 3, 4, 7, 2, 12, 1, 10, 14, 9],
,
[10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4],

[3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14] ],

[ [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9],

[14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6],

[4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14],

[11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 ]],

[ [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11],

[10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8],

[9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6],

[4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13] ],

[ [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1],

[13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6],

[1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2],

[6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12] ],

[ [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7],


[1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2],
[7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8],
[2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11] ] ]

# Final Permutation Table

final_perm = [ 40, 8 4 1 5 2 6 3
, 8, 6, 6, 4, 4, 2,
39, 7 4 1 5 2 6 3
, 7, 5, 5, 3, 3, 1,
38, 6 4 1 5 2 6 3
, 6, 4, 4, 2, 2, 0,
37, 5 4 1 5 2 6 2
, 5, 3, 3, 1, 1, 9,
36, 4 4 1 5 2 6 2
, 4, 2, 2, 0, 0, 8,
35, 3 4 1 5 1 5 2
, 3, 1, 1, 9, 9, 7,
34, 2 4 1 5 1 5 2
, 2, 0, 0, 8, 8, 6,
33, 1, 41, 9, 49, 17, 57, 25 ]

def encrypt(pt, rkb,


rk): pt =
hex2bin(pt)

# Initial Permutation

pt = permute(pt, initial_perm, 64)


print("After initial permutation",
bin2hex(pt))

# Splitting
left =
pt[0:32]

right = pt[32:64]

for i in range(0, 16):

# Expansion D-box: Expanding the 32 bits data into 48


bits right_expanded = permute(right, exp_d, 48)

# XOR RoundKey[i] and


right_expanded xor_x =
xor(right_expanded, rkb[i])

# S-boxex: substituting the value from s-box table by


calculating row and column

sbox_str = ""

for j in range(0, 8):

row = bin2dec(int(xor_x[j * 6] + xor_x[j * 6 + 5]))

col = bin2dec(int(xor_x[j * 6 + 1] + xor_x[j * 6 + 2] +

xor_x[j * 6 + 3] + xor_x[j * 6 + 4]))

val = sbox[j][row][col]

sbox_str = sbox_str + dec2bin(val)


# Straight D-box: After substituting rearranging the
bits sbox_str = permute(sbox_str, per, 32)

# XOR left and sbox_str


result = xor(left,
sbox_str) left = result

# Swapper

if(i != 15):

left, right = right, left

print("Round ", i + 1, " ", bin2hex(left), " ",


bin2hex(right), " ", rk[i])

# Combination

combine = left + right

# Final permutation: final rearranging of bits to get cipher text


cipher_text = permute(combine, final_perm, 64)

return cipher_text

pt =
"123456ABCD132536" key
= "AABB09182736CCDD"

# Key
generation # --
hex to binary

key = hex2bin(key)

# --parity bit drop table

keyp = [57, 49, 41, 33, 25, 17, 9,


1, 58, 50, 42, 34, 26, 18,
1 2, 59, 5 4 3 27
0, 1, 3, 5, ,
1 11, 3, 6 5 4 36
9, 0, 2, 4, ,
63, 55, 47, 39, 31, 23, 15,
7, 62, 54, 4 3 3 22
6, 8, 0, ,
14, 6, 61, 5 4 3 29
3, 5, 7, ,
21, 13, 5, 2 2 1 4]
8, 0, 2,

# getting 56 bit key from 64 bit using the parity


bits key = permute(key, keyp, 56)

# Number of bit shifts


shift_table = [1, 1, 2,
2,
2 2 2 2,
, , ,
1 2 2 2,
, , ,
2 2 2 1
, , , ]

# Key- Compression Table : Compression of key from 56 bits to 48 bits


key_comp = [14, 17, 11, 24, 1, 5,

3, 28, 15, 6, 21, 10,

23, 19, 12, 4, 26, 8,

16, 7, 27, 20, 13, 2,


4 5 3 3 4 5
1, 2, 1, 7, 7, 5,
3 4 5 4 3 4
0, 0, 1, 5, 3, 8,
4 4 3 5 3 5
4, 9, 9, 6, 4, 3,
4 4 5 3 2 32
6, 2, 0, 6, 9, ]

# Splitting

left = key[0:28] # rkb for RoundKeys in binary


right = key[28:56] # rk for RoundKeys in
hexadecimal

rkb = []

rk = []

for i in range(0, 16):

# Shifting the bits by nth shifts by checking from shift


table left = shift_left(left, shift_table[i])

right = shift_left(right, shift_table[i])

# Combination of left and right


string combine_str = left + right
# Compression of key from 56 to 48 bits
round_key = permute(combine_str, key_comp,
48)

rkb.append(round_key)
rk.append(bin2hex(round_key))

print("Encryption")

cipher_text = bin2hex(encrypt(pt, rkb, rk))

print("Cipher Text : ",cipher_text)

print("Decryption
") rkb_rev =
rkb[::-1] rk_rev
= rk[::-1]

text = bin2hex(encrypt(cipher_text, rkb_rev,


rk_rev)) print("Plain Text : ",text)

Output:
Conclusion : Thus we have studied encryption and decryption using DES algorithm
Assignment No. 4

Aim:
Write a Java/C/C++/Python program to implement AES Algorithm

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Eclipse

Theory:
Advanced Encryption Standard (AES) is a specification for the encryption of electronic data
established by the U.S National Institute of Standards and Technology (NIST) in 2001. AES is
widely used today as it is a much stronger than DES and triple DES despite being harder to
implement.
Points to remember

● AES is a block cipher.


● The key size can be 128/192/256 bits.
● Encrypts data in blocks of 128 bits each.
That means it takes 128 bits as input and outputs 128 bits of encrypted cipher text as output.
AES relies on substitution-permutation network principle which means it is performed using a
series of linked operations which involves replacing and shuffling of the input data.
Working of the cipher:
AES performs operations on bytes of data rather than in bits. Since the block size is 128 bits,
the cipher processes 128 bits (or 16 bytes) of the input data at a time.

The number of rounds depends on the key length as follows:

● 128 bit key – 10 rounds


● 192 bit key – 12 rounds
● 256 bit key – 14 rounds
Creation of Round keys :
A Key Schedule algorithm is used to calculate all the round keys from the key. So the initial
key is used to create many different round keys which will be used in the corresponding round
of the encryption.

Encryption :
AES considers each block as a 16 byte (4 byte x 4 byte = 128 ) grid in a column major
arrangement.

Each round comprises of 4 steps :

● SubBytes
● ShiftRows
● MixColumns
● Add Round Key
The last round doesn’t have the MixColumns round.
The SubBytes does the substitution and ShiftRows and MixColumns performs the permutation
in the algorithm.

SubBytes :
This step implements the substitution.
In this step each byte is substituted by another byte.(Its performed using a lookup table also
called the S-box.This substitution is done in a way that a byte is never substituted by itself and
also not substituted by another byte which is a compliment of the current byte.The result of this
step is a 16 byte (4 x 4 ) matrix like before.

The next two steps implement the permutation.

ShiftRows :
This step is just as it sounds. Each row is shifted a particular number of times.

● The first row is not shifted


● The second row is shifted once to the left.
● The third row is shifted twice to the left.
● The fourth row is shifted thrice to the left. (A left circular shift is performed.)

MixColumns :
This step is basically a matrix multiplication. Each column is multiplied with a specific matrix
and thus the position of each byte in the column is changed as a result.

This step is skipped in the last round.


Add Round Keys :

Now the resultant output of the previous stage is XOR-ed with the corresponding round key.
Here, the 16 bytes is not considered as a grid but just as 128 bits of data.

After all these rounds 128 bits of encrypted data is given back as output. This process is
repeated until all the data to be encrypted undergoes this process.

Decryption :
The stages in the rounds can be easily undone as these stages have an opposite to it which when
performed reverts the changes.Each 128 blocks goes through the 10,12 or 14 rounds depending
on the key size.

The stages of each round in decryption is as follows :

● Add round key


● Inverse MixColumns
● ShiftRows
● Inverse SubByte
The decryption process is the encryption process done in reverse so i will explain the steps with
notable differences.
Inverse MixColumns :
This step is similar to the MixColumns step in encryption, but differs in the matrix used to
carry out the operation.

Inverse SubBytes :
Inverse S-box is used as a lookup table and using which the bytes are substituted during
decryption.

C Program:
#include

<stdio.h>

#include <stdlib.h> #include


<string.h>

/*

* MCrypt API available online:


* http://linux.die.net/man/3/mcrypt
*/

#include <mcrypt.h>

#include <math.h>

#include <stdint.h> #include


<stdlib.h>

int encrypt(

void* buffer,

int buffer_len, /* Because the plaintext could include null


bytes*/

char* IV, char* key,

int key_len

){

MCRYPT td = mcrypt_module_open("rijndael-128", NULL, "cbc",


NULL); int blocksize = mcrypt_enc_get_block_size(td);

if( buffer_len % blocksize != 0 ){return 1;}


mcrypt_generic_init(td, key, key_len,
IV); mcrypt_generic(td, buffer,
buffer_len);

mcrypt_generic_deinit (td);

mcrypt_module_close(td);

return 0;

int decrypt(

void* buffer,

int
buffer_len,
char* IV,

char* key,
int key_len

){

MCRYPT td = mcrypt_module_open("rijndael-128", NULL, "cbc",


NULL); int blocksize = mcrypt_enc_get_block_size(td);

if( buffer_len % blocksize != 0 ){return 1;}

mcrypt_generic_init(td, key, key_len,


IV); mdecrypt_generic(td, buffer,
buffer_len); mcrypt_generic_deinit
(td);

mcrypt_module_close(td);

return 0;

void display(char* ciphertext, int


len){ int v;

for (v=0; v<len; v++){

printf("%d ", ciphertext[v]);

printf("\n");

int main()

MCRYPT td, td2;


char* plaintext = "test text
123"; char* IV =
"AAAAAAAAAAAAAAAA";

char* key =
"0123456789abcdef"; int
keysize = 16; /* 128 bits */
char* buffer;

int buffer_len = 16;

buffer = calloc(1, buffer_len);

strncpy(buffer, plaintext, buffer_len);

printf("==C==\n");

printf("plain: %s\n", plaintext);

encrypt(buffer, buffer_len, IV, key, keysize);

printf("cipher: "); display(buffer ,


buffer_len); decrypt(buffer, buffer_len, IV,
key, keysize);

printf("decrypt: %s\n", buffer);

return 0;

Conclusion: Thus we have studied encryption and decryption using AES algorithm
Assignment no. 5
Aim:
Write a Java/C/C++/Python program to implement RSA algorithm

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Eclipse

Theory:
RSA (Rivest–Shamir–Adleman) algorithm is asymmetric cryptography algorithm. The
acronym "RSA" comes from the surnames of Ron Rivest, Adi Shamir and Leonard Adleman,
who publicly described the algorithm in 1977.Asymmetric actually means that it works on two
different keys i.e. Public Key and Private Key. As the name describes that the Public Key is
given to everyone and Private key is kept private.
An example of asymmetric cryptography :
1. A client (for example browser) sends its public key to the server and requests for
some data.
2. The server encrypts the data using client’s public key and sends the encrypted
data.
3. Client receives this data and decrypts it.
Since this is asymmetric, nobody else except browser can decrypt the data even if a third party
has public key of browser.
The idea! The idea of RSA is based on the fact that it is difficult to factorize a large integer.
The public key consists of two numbers where one number is multiplication of two large prime
numbers. And private key is also derived from the same two prime numbers. So, if somebody
can factorize the large number, the private key is compromised. Therefore, encryption strength
totally lies on the key size and if we double or triple the key size, the strength of encryption
increases exponentially. RSA keys can be typically 1024 or 2048 bits long, but experts believe
that 1024-bit keys could be broken in the near future. But till now it seems to be an infeasible
task.

Let us learn the mechanism behind RSA algorithm : Generating


Public Key :
1. Select two prime no's. Suppose P = 53 and Q = 59.
2. Now First part of the Public key : n = P*Q = 3127. 3.
4. We also need a small exponent say e :
5. But e Must be
6.
a. An integer.
b.
c. Not be a factor of n. d.
e. 1 < e < Φ(n) [Φ(n) is discussed below],
f. Let us now consider it to be equal to 3.
8. Our Public Key is made of n and e
a. >> Generating Private Key :
9. We need to calculate Φ(n) :
10.Such that Φ(n) = (P-1)(Q-1) 11.
so, Φ(n) = 3016

13. Now calculate Private Key, d :


14.d = (k*Φ(n) + 1) / e for some integer k 15.For
k = 2, value of d is 2011.

a. Now we are ready with our – Public Key ( n = 3127 and e = 3) and Private
Key(d = 2011)
b. Now we will encrypt “HI” : 16.Convert
letters to numbers : H = 8 and I = 9 17.
18. Thus Encrypted Data c = 89e mod n.
19. Thus our Encrypted Data comes out to be 1394 20.
21.Now we will decrypt 1394 :
22.
23. Decrypted Data = cd mod n.
24. Thus our Encrypted Data comes out to be 89
25.8 = H and I = 9 i.e. "HI".

Program:

// C program for RSA asymmetric cryptographic

// algorithm. For demonstration values are

// relatively small compared to practical

// application
#include<stdio.h>
#include<math.h>
// Returns gcd of a and b int gcd(int a, int h)
{

int temp;
while (1)
{
temp = a%h; if
(temp == 0) return
h;

a = h;

h = temp;

// Code to demonstrate RSA algorithm int main()


{

// Two random prime numbers double p =


3;
double q = 7;

// First part of public key: double n =


p*q;
// Finding other part of public key.

// e stands for encrypt double e


= 2;
double phi = (p-1)*(q-1); while (e <
phi)
{

// e must be co-prime to phi and

// smaller than phi. if


(gcd(e, phi)==1) break;
else

e++;
}
// Private key (d stands for decrypt)

// choosing d such that it satisfies

// d*e = 1 + k * totient

int k = 2; // A constant value double d =


(1 + (k*phi))/e;
// Message to be encrypted double msg = 12;
printf("Message data = %lf", msg);

// Encryption c = (msg ^ e) % n double c =


pow(msg, e);
c = fmod(c, n);

printf("\nEncrypted data = %lf", c);


// Decryption m = (c ^ d) % n double m =
pow(c, d);
m = fmod(m, n);

printf("\nOriginal Message Sent = %lf", m);

return 0;

Output:

Conclusion: Thus we have studied RSA (Rivest–Shamir–Adleman) algorithm, a asymmetric


cryptography algorithm.
Assignment no. 6
Aim:

Implement the Diffie-Hellman Key Exchange mechanism using HTML and JavaScript.
Consider the end user as one of the parties (Alice) and the JavaScript application as other party
(bob).

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Eclipse

Theory:
The Diffie-Hellman algorithm is being used to establish a shared secret that can be used for
secret communications while exchanging data over a public network using the elliptic curve to
generate points and get the secret key using the parameters.
For the sake of simplicity and practical implementation of the algorithm, we will consider only
4 variables, one prime P and G (a primitive root of P) and two private values a and b.
P and G are both publicly available numbers. Users (say Alice and Bob) pick private values a
and b and they generate a key and exchange it publicly. The opposite person receives the key
and that generates a secret key, after which they have the same secret key to encrypt.
Step by Step Explanation
Alice Bob
Public Keys available = P, G Public Keys available = P, G

Private Key Selected = a Private Key Selected = b

Key generated = Key generated =

x = G^a mod P y = G^b mod P


Exchange of generated keys takes place
Key received = y key received = x

Generated Secret Key = Generated Secret Key =

ka = y^a mod P kb = x^b mod P


Algebraically, it can be shown that
ka = kb
Users now have a symmetric secret key to encrypt

Example:

Step 1: Alice and Bob get public numbers P = 23, G = 9 Step 2: Alice
selected a private key a = 4 and
Bob selected a private key b = 3

Step 3: Alice and Bob compute public values Alice:


x =(9^4 mod 23) = (6561 mod 23) = 6
Bob: y = (9^3 mod 23) = (729 mod 23) = 16
Step 4: Alice and Bob exchange public numbers Step 5:
Alice receives public key y =16 and
Bob receives public key x = 6

Step 6: Alice and Bob compute symmetric keys Alice:


ka = y^a mod p = 65536 mod 23 = 9 Bob: kb =
x^b mod p = 216 mod 23 = 9
Step 7: 9 is the shared secret.

Python Program:

from random import randint

if name == ' main ':

# Both the persons will be agreed upon


the # public keys G and P

# A prime number P is
taken P = 23

# A primitive root for P, G is


taken G = 9

print('The Value of P is :%d'%(P))

print('The Value of G is :%d'%(G))

# Alice will choose the private


key a a = 4

print('The Private Key a for Alice is :%d'%(a))


# gets the generated
key x =
int(pow(G,a,P))

# Bob will choose the private


key b b = 3

print('The Private Key b for Bob is :%d'%(b))

# gets the generated


key y =
int(pow(G,b,P))

# Secret key for Alice

ka = int(pow(y,a,P))

# Secret key for


Bob kb =
int(pow(x,b,P))

print('Secret key for the Alice is : %d'%(ka))

print('Secret Key for the Bob is : %d'%(kb))

Output:

Conclusion: Thus we have studied how to exchange keys using Diffie-Hellman key exchange.
“Techno – Social Excellence”
Marathwada Mitramandal’s
INSTITUTE OF TECHNOLOGY
Lohgaon, Pune-411047

“Towards Ubiquitous Computing Technology”


DEPARTMENT OF COMPUTER ENGINEERING

Savitribai Phule Pune University


Third Year of Computer Engineering (2019 Course)
310248: Laboratory Practice II

LAB MANUAL
LP-II TE COMP
(2019 Pattern)
(Part 2)
Prepared By:
Prof. Subhash G. Rathod
INDEX
Part II : Cloud Computing
Case study on Microsoft azure to learn about Microsoft Azure is a cloud
computing platform and infrastructure, created by Microsoft, for building,
deploying and managing applications and services through a global network
1
of Microsoft-managed data centers.
OR
Case study on Amazon EC2 and learn about Amazon EC2 web services.
Installation and configure Google App Engine.
2 OR
Installation and Configuration of virtualization using KVM.
Creating an Application in SalesForce.com using Apex programming
3
Language.
Design and develop custom Application (Mini Project) using Sales force
4 Cloud.

Mini-Project
Setup your own cloud for Software as a Service (SaaS) over the existing
LAN in your laboratory. In this assignment you have to write your own code
5
for cloud controller using open- source technologies to implement with
HDFS. Implement the basic operations may be like to divide the file in
segments/blocks and upload/ download file on/from cloud in encrypted form.
Cloud Computing
Assignment No 1:

Aim/Title: Case study on Microsoft azure to learn about Microsoft Azure is a cloud
computing platform and infrastructure, created by Microsoft, for building,
deploying and managing applications and services through a global network of
Microsoft-managed data centres.
OR
Case study on Amazon EC2 and learn about Amazon EC2 web services

Objective:
1. To learn cloud computing environment.
2. To study how to use Microsoft Azure/Amazon EC2
Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij

Theory:

Windows Azure is one of them, which is provided by Microsoft. Azure can be described as the
managed data centers that are used to build, deploy, manage the applications and provide services
through a global network. The services provided by Microsoft Azure are PaaS and IaaS. Many
programming languages and frameworks are supported by it. Azure as PaaS (Platform as a
Service) As the name suggests, a platform is provided to clients to develop and deploy software.
The clients can focus on the application development rather than having to worry about hardware
and infrastructure. It also takes care of most of the operating systems, servers and networking
issues.

Pros
●The overall cost is low as the resources are allocated on demand and servers are automatically
updated.
● It is less vulnerable as servers are automatically updated and being checked for all known
security issues. The whole process is not visible to developer and thus does not pose a risk of data
breach.
● Since new versions of development tools are tested by the Azure team, it becomes easy for
developers to move on to new tools. This also helps the developers to meet the customer’s demand
by quickly adapting to new versions.

Cons
● There are portability issues with using PaaS. There can be a different environment at Azure,
thus the application might have to be adapted accordingly. Azure as IaaS (Infrastructure as a
Service) It is a managed compute service that gives complete control of the operating systems and
the application platform stack to the application developers. It lets the user to access, manage and
monitor the data centers by themselves.
● This is ideal for the application where complete control is required. The virtual machine can be
completely adapted to the requirements of the organization or business.
● IaaS facilitates very efficient design time portability. This means application can be migrated to
Windows Azure without rework. All the application dependencies such as database can also be
migrated to Azure.
● IaaS allows quick transition of services to clouds, which helps the vendors to offer services to
their clients easily. This also helps the vendors to expand their business by selling the existing
software or services in new markets. Azure Management Portal Azure Management Portal is an
interface to manage the services and infrastructure launched in 2012. All the services and
applications are displayed in it and it lets the user manage them. started A free trial account can
be created on Azure management portal by visiting the following link -
manage.windowsazure.com The screen that pops up is as shown in the following image. The
account can be created using our existing Gmail, Hotmail or Yahoo account. Compute / Execution
Models This is the interface for executing the application, which is one of the basic functions of
Azure.

Output:

Conclusion:
Thus, we saw in detail how to create an on-demand Azure instance in this tutorial. Because it is
an on-demand server, you can keep it running when in use and 'Stop' it when it's unused to save
on your costs
Assignment No 2:

Aim/Title: Installation and configure Google App Engine.


OR
Installation and Configuration of virtualization using KVM.

Objective:
• To learn basic of Google App Engine.
• To install and configure Google App Engine.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij

Theory:
Google App Engine is a web application hosting service. By “web application,” we mean an
application or service accessed over the Web, usually with a web browser: storefronts with
shopping carts, social networking sites, multiplayer games, mobile applications, survey
applications, project management, collaboration, publishing, and all the other things we’re
discovering are good uses for the Web. App Engine can serve traditional website content too,
such as documents and images, but the environment is especially designed for real-time
dynamic applications. Of course, a web browser is merely one kind of client: web application
infrastructure is well suited to mobile applications, as well.
In particular, Google App Engine is designed to host applications with many
simultaneous users. When an application can serve many simultaneous users without degrading
performance, we say it scales. Applications written for App Engine scale automatically. As
more people use the application, App Engine allocates more resources for the application and
manages the use of those resources. The application itself does not need to know anything about
the resources it is using.
Google App Engine: It is a platform-as-a-service (PaaS) Cloud computing platform that is fully
managed and uses inbuilt services to run your apps. You can start development almost instantly
after downloading the software development kit (SDK). You can go on to the developer’s guide
right away when you click on the language you wish to develop your app in. As soon as you have
signed up for a Cloud account.
These are covered by the depreciation policy and the service-level agreement of the app engine.
Any changes made to such a feature are backward-compatible and implementation of such a
feature is usually stable. These include data storage, retrieval, and search; communications;
process management; computation; app configuration and management.

Advantages of Google App Engine:


Infrastructure for Security :
Around the world, the Internet infrastructure that Google has is probably the most secure. There
is rarely any type of unauthorized access till date as the application data and code are stored in
highly secure servers.
Scalability :
For any app’s success, this is among the deciding factors. Google creates its own apps using GFS,
Big Table and other such technologies, which are available to you when you utilize the Google
app engine to create apps
Performance and Reliability :
Google is among the leaders worldwide among global brands. So, when you discuss performance
and reliability you have to keep that in mind. In the past 15 years, the company has created new
benchmarks based on its services’ and products’ performance.
Cost Savings
You don’t have to hire engineers to manage your servers or to do that yourself. You can invest the
money saved into other parts of your business.

Output:

ALL CODE AND DESCRIPTION IS IN GIVEN BELOW:

GOOGLE APP ENGINE INSTALLATION.pdf

Conclusion:

Thus, We have installed and Configured Google App Engine.


Assignment No 3:

Aim/Title: Creating an Application in SalesForce.com using Apex programming


Language.

Objective:
• To learn salesforce cloud administration.
• To create application in SalesForce.com using Apex programming.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij

Theory:
What is Apex?
Apex is a proprietary language developed by the Salesforce.com. As per the official definition,
Apex is a strongly typed, object-oriented programming language that allows developers to
execute the flow and transaction control statements on the Force.com platform server in
conjunction with calls to the Force.com API.
It has a Java-like syntax and acts like database stored procedures. It enables the developers to
add business logic to most system events, including button clicks, related record updates, and
Visual force pages. Apex code can be initiated by Web service requests and from triggers on
objects. Apex is included in Performance Edition, Unlimited Edition, Enterprise Edition, and
Developer edition.

Features of Apex as a Language

Java like syntax and easy to use


Apex is easy to use as it uses the syntax like Java. For example, variable declaration,
loop syntax and conditional statements.

Strongly Integrated With Data


Apex is data focused and designed to execute multiple queries and DML statements together. It
issues multiple transaction statements on Database.

Strongly Typed
Apex is a strongly typed language. It uses direct reference to schema objects like Object and any
invalid reference quickly fails if it is deleted or if is of wrong data type.
Multitenant Environment
Apex runs in a multitenant environment. Consequently, the Apex runtime engine is designed to
guard closely against runaway code, preventing it from monopolizing shared resources. Any
code that violates limits fails with easy-to-understand error messages.

Upgrades Automatically
Apex is upgraded as part of Salesforce releases. We don't have to upgrade it manually.

Easy Testing
Apex provides built-in support for unit test creation and execution, including test results that
indicate how much code is covered, and which parts of your code can be more efficient.

When Should Developer Choose Apex Apex code should only be written if a business scenario
is too complex and can’t be implemented using the pre-built functionality provided by
Salesforce

Following are the few scenarios where we need to write apex code:
● To create web services that integrate Salesforce with other applications.
● To implement custom validation on sobjects.
● To execute custom apex logic when a DML operation is performed.
● To implement functionality that can’t be implemented using existing workflows flows and
process builders functionality.
● To setup email services, you need to include processing the contents, headers, and
attachments of email using apex code.

Following are the flow of actions for an apex code:

● Developer Action: All the apex code written by a developer is compiled into a set of
instructions that can be understood by apex runtime interpreter when the developer saves the
code to the platform and these instructions then save as metadata to the platform.
● End User Action: When the user event executes an apex code, the platform server gets the
compiled instructions from metadata and runs them through the apex interpreter before returning
the result.

Output:
ALL CODE AND DESCRIPTION IS IN BELOW LINK:
clound-computing-practicals.pdf

Conclusion:
Thus, We have created an Application in SalesForce.com using Apex programming Language.
Assignment No 4:

Aim/Title: Design and develop custom Application (Mini Project) using Sales force
Cloud.

Objective:
• To learn salesforce cloud administration.
• To install and configure the salesforce cloud administrative features.

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij

Theory:
Salesforce is the primary enterprise offering within the Salesforce platform. It provides
companies with an interface for case management and task management, and a system for
automatically routing and escalating important events. The Salesforce customer portal provides
customers the ability to track their own cases, includes a social networking plug-in that enables
the user to join the conversation about their company on social networking websites, provides
analytical tools and other services including email alert, Google search, and access to customers'
entitlement and contracts.

Lightning Platform
Lightning Platform (also known as Force.com) is a platform as a service (PaaS) that allows
developers to create add-on applications that integrate into the main Salesforce.com
application.These third-party applications are hosted on Salesforce.com's infrastructure.
Force.com applications are built using declarative tools, backed by Lightning and Apex (a
proprietary Java-like programming language for Force.com) and Lightning and Visual force (a
framework that includes an XML syntax typically used to generate HTML).

Community Cloud
Community Cloud provides Salesforce customers the ability to create online web properties for
external collaboration, customer service, channel sales, and other custom portals I their instance
of Salesforce. Tightly integrated to Sales Cloud, Service Cloud, and App Cloud, Community
Cloud can be quickly customized to provide a wide variety of web properties Salesforce Sales
Cloud Salesforce Sales Cloud is a customer relationship management (CRM) platform designed
to support sales, marketing and customer support in both business-to-business (B2B) and business-
to-customer (B2C) contexts.

Create Custom Apps for Salesforce Classic


Create custom apps to give your Salesforce Classic users’ access to everything they need all in
one place.
If you're new to custom apps, we recommend using Lightning Platform quick start to create
an app. With this tool, you can generate a basic working app in just one step.
If you’ve already created the objects, tabs, and fields you need for your app, follow these
steps. With this option, you create an app label and logo, add items to the app, and assign the
app to profiles.

1. From Setup, enter Apps in the Quick Find box, then select Apps.
2. Click New.
3. If the Salesforce console is available, select whether you want to define a custom app or a
Salesforce console.
4. Give the app a name and description. An app name can have a maximum of 40 characters,
including spaces.
5. Optionally, brand your app by giving it a custom logo.
6. Select which items to include in the app.
7. Optionally, set the default landing tab for your new app using the Default Landing
Tab drop-down menu below the list of selected tabs. This determines the first tab a user
sees when logging into this app.
8. Choose which profiles the app will be visible to.
9. Check the Default box to set the app as that profile’s default app, meaning that new users
with the profile see this app the first time they log in. Profiles with limits are excluded
from this list.
10. Click Save

Output:

ALL CODE AND DESCRIPTION IS IN BELOW LINK:

MINIPROJECT SALESFORCE CLOUD.pdf

Conclusion:
Thus, We have designed and developed custom application using salesforce cloud.
Assignment No 5:
Mini-Project

Aim/Title: Setup your own cloud for Software as a Service (SaaS) over the existing
LAN in your laboratory. In this assignment you have to write your own code for a
cloud controller using open source technologies to implement with HDFS.
Implementing the basic operations may be like to divide the file in segments/blocks
and upload/ download file on/from cloud in encrypted form.

Objective:
To set your own cloud for SaaS over existing LAN
To implement the basic operations may be like to divide the file in segments/blocks

Requirements:

Hardware Requirement:
Object: PC, Laptop

Software Requirement:
Operating System: Windows 7,8,10/11
Specification: Core i3,i5 or above
Specified Language : C++, Java, Python
Software: Visual Studio Code, Intellij

Theory:

Output:

Conclusion:

You might also like