Micro-Project: Government Polytechnic Osmanabad

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

GOVERNMENT POLYTECHNIC

OSMANABAD

MICRO-PROJECT
Academic Year: 2021 -2022

Shell-Script For Online Banking/ATM


System

Program Code: Computer Engineering Roll Number: 51


Course Name: Operating System(OSY) Course Code: 22516 .

Submitted by:
Shubham kale

Submitted to:
Prof. P.J. Bansode
MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION
Certificate

This is to certify that Mr. / Ms. SHUBHAM BALAJI KALE .

Roll No. 51 of Fifth Semester Diploma in Computer Engineering (CO5I) of

Government Polytechnic Osmanabad (Code No. 0118) has completed the Micro-

Project work satisfactory in Operating System (22516) for the academic year 2021 - 2022

as prescribed in the MSBTE curriculum.

Place: Osmanabad Enrollment No. 1901180327 .

Date: . Exam Seat No.: .

Subject Teacher Head of the Department Principal

Seal of

Institution
INDEX

Academic Year : 2021-2022 . Name of Faculty: Prof .P.J. Bansode

Roll Number: 51 . Course & Course Code: OSY (22516) .

Enrollment No: 1901180327

Name of Student: Shubham Balaji Kale .

Shell-Script For Online Banking/ATM System

Sr.
Table of Contents Page No.
No.

1 Project Proposal 4

2 Action plan 5

3 Resource required 5

4 Introduction 6

5 Actual Procedure 7

6 Output 14

7 Skill developed 17

8 Evaluation sheet 19
Annexure – I
Micro-Project Proposal
Shell-Script for online Banking/ATM System

1.0 Aim/Benefits of the Micro-Project:


1. To develop Programs using Shell-Script methodology in Linux Environment..
2. To understand various concepts of if-else decidion making statements, case and function in
Linux Command Line OS.
3.To develop an application using varied Linux commands.

2.0 Course Outcomes Addressed:


1. Install operating system and configure it. [✔]
2. Use operating system tools to perform various functions. [✔]
3. Execute process commands for performing process management operations. [✔]
4. Apply scheduling algorithms to calculate turnaround time and average waiting time. [ ]
5. Calculate efficiency of different memory management techniques. [ ]

3.0 Proposed Methodology:


In order to make a best micro-project, we decided to divide our tasks and proposed a short
methodology for our project. It is as follows:

1. To have a brain-storming session for the topic with group members, select one of the topics and
get it alloted from the respective teacher.
2. To prepare a proposed plan about the Micro-Project and inform about it to the respective teacher.
3. To manage the required resources like computer, printer, required softwares, etc. for project.
4. To discuss about the aim, outcomes, applications, outputs, etc. of the project in detail.
5. To divide the work responsibilities like collecting data, editing, code-desining, modifying,
report-writing, buying resources, etc. among the group members.
6. To do Research Analysis on the actual development of the Project.
7. Finally, to prepare a rough documentation on the assigned topic and show it to the teacher.
8. To design algorithm and flowchart for the given alloted topic.
9. To start working for the code by carrying out the activites as guided in the flowchart.
10. Fixing of the bugs in the code by the team and producing the correct output.
11. To demonstrate the results and explain about the functioning of the project in the class.
12. To prepare and submit the Full-Proof project report before the deadline to the respective subject
teacher.
4.0 Action Plan:

Details
Sr. Planned Planned Name of Team
of
No. Start date Finish date Members
Activity
1. Finalization of project Title and Scope 06-09-21 13-09-21 All members
2. Project Definition and design structure 14-09-21 21-09-21 All members
3. Design procedure (algorithm) 22-09-21 28-09-21 All members
4. Draw flowchart 29-09-21 05-10-21 All members
5. Coding 06-10-21 12-10-21 All members
6. Output 13-10-21 20-10-21 All members
7. Report writing 25-10-21 15-11-21 All members
8. Demonstration of project and final submission 16-11-21 06-12-21 All members

5.0 Resources Required:

Sr. No. Name of Resource/material Specifications Remarks

1. A Hardware Computer System Intel Pentium Processor -------------

2. Operating System Kali Linux(64-bit) -------------

3. Reference Websites www.tutorialspoint.com -------------

Names of Team Members with Roll No.s:

Roll.
Sr. No. Name of Team Members Enrollment No. Seat No.
No.
1. 51 Shubham Balaji Kale 1901180327

Teacher’s Signature
(Prof. P.J. Bansode)
*************
Annexure – II
1.0 Rationale:
In this Project, we have developed an Online Banking/ATM application using shell-script in a Linux
based Operating System Environment. An Operating System is basically a system program that
controls the execution of programs and acts as an interface between applications and the computer
hardware. Linux is a family of open-source Unix-like operating systems based on the Linux kernel.
It is one of the fastest, smoothest and oldest operating system used till date.

Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration
testing; that we used for the development of our application. Throgh this application, we have
demonstrated the use of varied linux commands & concept of function. The Application is divided
into 8 modules and thus we have a program with 8 functions each of them inter-related to the other.
Different modules of our online banking system are to open account, login, balance enquiry,
deposits, withdrawls consisting of a menu, sub-menu and an exit option.

2.0 Aim/Benefits of the Micro-Project:


1. To develop Programs using Shell-Script methodology in Linux Environment..
2. To understand various concepts of if-else decidion making statements, case and function in
Linux Command Line OS.
3.To develop an application using varied Linux commands.

3.0 Course Outcomes Addressed:


1. Install operating system and configure it. [✔]
2. Use operating system tools to perform various functions. [✔]
3. Execute process commands for performing process management operations. [✔]
4. Apply scheduling algorithms to calculate turnaround time and average waiting time. [ ]
5. Calculate efficiency of different memory management techniques. [ ]

4.0 Literature Review:


Linux is a community of open-source Unix like operating systems that are based on the Linux
Kernel. Linux was created for personal computers and gradually it was used in other machines like
servers, mainframe computers, supercomputers, etc. Nowadays, Linux is also used in embedded
systems like routers, automation controls, televisions, digital video recorders, video game consoles,
smartwatches, etc. The biggest success of Linux is Android (an operating system). Here, are the
concepts of the Linux that we have used in our Micro-Project:

Shell Script: A shell script is a computer program designed to be run by the Unix shell, a command-
line interpreter. The file extension of shell script is .sh and the code can be written in text ediors like
Vi/VIM, Nano, etc available in linux. In order to execute the script, the file should be assigned with
execute permission. Then it can be execute by writing command $ ./filename.sh in the terminal.
function(): Functions enable you to break down the overall functionality of a script into smaller,
logical sub-sections, which can then be called upon to perform their individual tasks when needed.
Functions provide code reuseability, which is an important part of modern OOP principle.

Process Commands: Process is defined as a program in execution. We have used sleep and kill
process commands in our micro-project. Other process commands are ps, wait, exit & many more.
$ Sleep 5 - It is used to execute command after certain amount of time by sleeping for given seconds
(here 5seconds).
$ kill 0 $$ -Used to stop execution of all the processes by sending an interrupt signal to them.

The if...else statements: If else statements are useful decision-making statements which can be used
to select an option from a given set of options. The “fi” keyword is used to indicate the end of
if…else statements.

case: A “case...esac” statement construct helps us to simplify nested if statement. Each case is an
expression matching a certain pattern. The interpreter checks each case against the value of the
expression until a match is found. If nothing matches, a default condition will be used. It is always
ended with “esac” keyword.

Thus, this was all about the terminologies of our Project. The project Banking system developed
uses the function concept and thus code-reusability. The code is divided into 8 modules which can
be re-used again and again. This is a subtle Bank application with features of account opening and
online transactions.

5.0 Actual Methodology Followed:


We divided our tasks and worked accordingly as per the planned methodology for our project. But
the actual steps followed by us in the real world are as follows:

1. We had a brain-storming session for the topic with group members & selected one of the topics.
2. The selected topic was alloted by the respective teacher.
3. Discussed about the aim, outcomes, applications, outputs, etc. of the project in detail.
4. Divided the project activities of Algorithm, Flowchart, Code & Report-making amongst the
four members.
5. Carried out background tasks like resource management which includes computer, printer,
required softwares, etc. for the project.
6. A group of two members designed the algorithm and Flowchart.
7. Another team developed a Code as guided in the algorithm by following the steps as mentioned
in flowchart.
8. Minor bugs were found by deep-analysis from each member which were later fixed on.
9. Final demonstration of the project was done in front of the whole class.
10.Finally, a full-proof project report was submitted before the deadline for the evaluation.
Algorithm:

Step 1 : Start

Step 2 : Declare the function MainMenu()

2.1 Take user input to switch between 3 options-


1. To_Open_Account
2. Login
3. Exit
2.2 After receiving the input , the respective function is called related to 1st or 2nd options.
2.3 If user selects the 3rd option all the processes will be termiated (using kill command) i.e. it
will exit.
2.4 But if the user presses key other than 1,2,3 then it displays “invalid choice” & calls the
function MainMenu()

Step 3 : Declare the function To_Open_Account()

3.1 Take User Details as Input.


3.2 Display Randomly generated “account no”. & “secret pin”.
3.3 Also declare variable named “balance” and assign it value 1000.
3.4 Display message as “Rs.1000 deposited as initial account opening balance”.
3.5 Call function Login().

Step 4 : Declare the function Login()

if user enters correct account_no. and password


then
display “login successful” & call function Menu()
Else
display “Invalid Details” & call function MainMenu()

Step 5 : Declare the function Menu()

5.1 Take user input to switch between 4 options-


1. Balance Enquiry
2. Deposits
3. Withdrawls
4. Main Menu.
5.2 After receiving the input , the respective function is called related to any 1 of the above
available options.
5.3 But if the user presses key other than 1,2,3,4 then it displays “invalid choice” & calls the
function MainMenu()
Step 6 : Declare the function Balance_Enquiry()

6.1 Display the availabe balance of user logged in.


6.2 Again call the function Menu()

Step 7 : Declare the function Deposits()

7.1 Take user input for the amount that is to be deposited.


7.2 Display “Transaction Successful” & Display updated available balance.
7.3 Again call the function Menu()

Step 8 : Declare the function Withdrawls()

8.1 Take user input for the amount that is to be withdrawn.


8.2 if amount is less than available balance,
then
display “Transaction successfu”l & Display updated available balance.
call the function Menu()
else
display “enter lesser amount”.
8.3 Again call the function Menu()

Step 09 : Call the function MainMenu()

Step 10 : Stop.

*************
Flowchart:
Start

Main
Menu

Value = 1 Value = 2 Value = 3 No match

function Open function function Display Invalid


Account() Login() Exit() Choice

Stop
If acc_no.
& pin are
correct False

True

Menu

Value = 1 Value = 2 Value = 3 Value = 4 No match

function Balance function function function Display


Enquiry() Deposits() Withdrawls() MainMenu() Invalid Choice
Program Code:
function MainMenu() {
echo "_________________________________________________________________"
echo " Welcome to XYZ Banking Application"
echo "_________________________________________________________________"
echo "1. Open New Account"
echo "2. Login"
echo "3. Exit Application"
echo "_________________________________________________________________"
read choice
case $choice in
"1") Open_New_Account
;;
"2") Login
;;
"3") kill 0 $$
;;
*) echo "Invalid Choice..!"
MainMenu
esac
}

function Open_New_Account() {
echo "Enter your Name"
read name
echo "Enter your Pan Card No."
read pan_no
echo ""
echo "Good! Your Details are Verified!"
echo "Rs. 1000 deposited as Initial Opening Balance"
let balance="1000"
sleep 5;

let acc="$RANDOM"
echo "_________________________________________________________________"
echo "Your Account no. is " $acc
let paswd="$RANDOM"
echo "Your Secret Pin is " $paswd
sleep 5;

Login
}

function Login() {
echo "_________________________________________________________________"
echo " XYZ Bank Login Portal"
echo "_________________________________________________________________"
echo "Enter your Account no."
read response1
echo "Enter your Secret Pin"
read response2
If [[ $response1 == "$acc" && $response2 == "$paswd" ]]
then
echo "Login Successful...!"
sleep 5;
Menu
elif [ $response1 -ne "$acc" ]
then
echo "**Invalid Account No.**"
sleep 5;
MainMenu
else
echo "**Invalid Pin**"
sleep 5;
MainMenu
fi
}
function Menu() {
echo "_________________________________________________________________"
echo " **MENU**"
echo "_________________________________________________________________"
echo ""Press 1"" - "For Balance Enquiry"
echo ""Press 2"" - "To Deposit Cash"
echo ""Press 3"" - "To Withdraw Cash"
echo ""Press 4"" - "Main Menu"
echo "_________________________________________________________________"
read option
case $option in
"1") Balance_Enquiry
;;
"2") Deposit_Money
;;
"3") Withdraw_Money
;;
"4") MainMenu
;;
*) echo "Invalid Choice..!"
Menu
esac
}
echo""

function Balance_Enquiry() {
echo "Your Available Balance is Rs. "$balance
echo ""
sleep 5;
Menu
}
function Deposit_Money() {
echo " Deposits"
echo "_________________________________________________________________"
echo "Enter the amount you want to Deposit:"
read dep_amt
echo ""
echo "Rs. $dep_amt Deposited Successfully in your Account."
echo ""
let balance=balance+$dep_amt
echo "Your Available Balance is Rs. "$balance
echo ""
sleep 5;
Menu
}
function Withdraw_Money () {
echo " Withdrawls"
echo "_________________________________________________________________"
echo "Enter the amount you want to Withdraw:"
read wdrw_amt
echo ""
if [ $wdrw_amt -lt $balance ]
then
echo "Rs. $wdrw_amt Withdrawn Successfully from your Account."
echo ""
let balance=$balance-$wdrw_amt
echo "Remaining Balance is Rs. "$balance
else
echo "**Low Balance !!**"
echo "Please enter lesser Amount."
fi
echo ""
sleep 5;
Menu
}

MainMenu

*************
6.0 Actual Resources Used:

Sr. No. Name of Resource/material Specifications Remarks

1. A Hardware Computer System Intel Pentium Processor -------------

2. Operating System Kali Linux(64-bit) -------------

3. Reference Websites www.tutorialspoint.com -------------

7.0 Outputs of the Micro-Project:


Main Menu of the Application-

Selecting the 1st Option-

Logging in with Details-


Logging in with wrong Details

Sub-Menu is displayed after login if correct credentials are entered-

Depositing of money-

Withdrawl of money-
Withdrawing amount greater than Balance amount-

Entering the wrong Choice-

Exit the Application-


8.0 Skill Developed / Learning outcomes:
The following skills were developed while developing this micro-project-
1. Able to use Linux Environment.
2. Developing a Shell-Script Program using different concepts.
3. Subtle Application development.
4. Research Analysis and Information Gathering.
5. Problem solving Approach.
6. Time management.
7. Technical Writing.
8. Team work.
9. Project Documentation.

9.0 Applications of the Micro-Project:


By viewing the different aspects of this micro-project, we can enlist its applications in different areas
as follows:

1. Its useful for the individuals having their interest in areas of command line interface like Linux
operating systems.
2. Kali Linux is continuously being used as a key tool for hackers and CyberSecurity professionals
all over the world.
3. This project is also benificial for building secure and robust applications in Linux Environment.
4. Simple and Subtle softwares can be made very easily.
5. Android, which has emerged as an advanced OS, is based on the modified version of the Linux
kernel and other open source software. It is continuously being used in Mobile Phones and now
in TVs giving boost to the smarter technology.

Teacher’s Signature
(Mr.P.J. Bansode)

*************
Annexure – III

MICRO-PROJECT EVALUATION SHEET

Process and Product Individual


Roll Name Total
Assessment Presentation / Viva
No. (10 Marks)
(6 Marks) (4 Marks)

22 Shubham Kale

Comments/Suggestions about teamwork/leadership/interpersonal communication (if any):


The project was implemented with good leadership and teamwork with a active co-operation of all the
team members. Everyone contributed equally and met with good outcomes. Hence, overall project was
done with great harmony and good team spirit.

Name and designation of the Faculty Member: Prof. P.J. Bansode Lecturer.

Dated Signature: .

*************

You might also like