0% found this document useful (0 votes)
3 views14 pages

Project DSU (4)

The project report focuses on the development of a library management system that includes features like user and teacher logins, an online notice board, and various report generation capabilities for librarians. It also discusses converting arithmetic expressions between infix, postfix, and prefix notations using stack data structures, along with providing C++ code for the conversion process. The project aims to enhance library operations and facilitate better information management for students and staff.

Uploaded by

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

Project DSU (4)

The project report focuses on the development of a library management system that includes features like user and teacher logins, an online notice board, and various report generation capabilities for librarians. It also discusses converting arithmetic expressions between infix, postfix, and prefix notations using stack data structures, along with providing C++ code for the conversion process. The project aims to enhance library operations and facilitate better information management for students and staff.

Uploaded by

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

A

Project Report

On

" Risk & Thread Analysis "


Submitted & Presented in the partial fulfillment of the requirement for the
award on Diploma in Computer Engineering

By.

Ms. Dipali Sanjay Jadhav

Ms. Rupali shivaji Gejage

Ms. Kirtika Ragentra Gavade

Under The Guidance of


Ms. Hande P.N.

DEPARTMENT OF COMPUTER ENGINEERING

NEW SATARA COLLEGE OF ENGINEERING


&MANAGEMENT (POLY.), KORTI-
PANDHARPUR.
ACY: 2022-2023
NEW SATARA COLLEGE OF ENGINEERING AND
MANAGMENKORTI -PANDHARPUR

This is to certify that the project report on “Develop project to convert arithmetic
expression prefix & postfix or infix” has been presented subject of object oriented
programing [oop-22316] by, students of SY IF in the partial fulfillment for the award of
Diploma in information technology engineering as per curriculum laid by the
Maharashtra State Board of Technical Education, MUMBAI during the academic year
2022-23

Project guide H.O.D principle


( Ms. Hande P.N.) (Mr.Puri.S.B) (Mr.londhe.V.H)
Abstract

Library management system is a project which aims in developing a computerized system to


maintain all the daily work of library .This project has many feature swhich are generally not
availiable in normal library management systems like facility of user login and a facility of
teachers login .It also has a facility of adminlo gin through which the admin can monitor the
whole system It also has facility of an online notice board where teachers can student can
put up information about workshops or seminars being held in our colleges or nearby
colleges and library an after proper verification from the concerned institution organizing
the seminar can add it to the notice board . It has also a facility where student after logging
in thei accounts can see list of books issued and its issue date and return date and also the

students can request the librarian to add new books by filling the book request form .The

librarian after logging into his account ie admin account can generate various reports such
as student report , issue report, teacher report and book report Overall this project of ours
is being developed to help the students as well as staff of library to maintain the library in
the best way possible and also reduce the human efforts.
DECLARATION
We hereby declare that, Dissertation entitled “Develop project to
convert arithmetic expression prefix & postfix or infix” completed and
submitted for the award of Diploma Engineering in Information Technology
branch, of New Satara College of Engineering And Management (Poly.),Korti,
Pandharpur. It has not been previously presented and to the best of my
knowledge, for the award of diploma engineering title of this or any other
university or examination body.

PLACE: - KORTI, PANDHARPUR


DATE:-
ACKNOWLEDGEMENT

We feel happiness in forwarding this project design report as an image


of sincere efforts the successful design report reflects efforts of our guide in
giving us good information.
Our sincere thanks to our guide Ms. Hande P.N. Who has been a
constant source of inspiration and guiding star in achieving our goal. We give
our special thanks to Prof. Puri.S.B head of computer department for
providing encouragement and all facilities required for completion of work.
We express our deep gratitude to all staff members who lend us their valuable
support and co-operation.
We are also equally indebted to our principal for his valuable help
whenever needed. At last we thank all those who directly or indirectly
encouraged and helped us.
Introduction
The growing significance of websites for various organizations is well
known. In recognizing that we decided to develop a website for the college which
compromises of all the required information about the college. Purpose of the
project: The purpose of our project is to design, publish and maintain a website for
our college which consists of all the information regarding the college like infra
structure, faculty, transport facilities, etc., Current and Proposed System: Current
System: As the existing website is not maintained and the domain has been blocked
there is a need for new one. Proposal System: Initially the college authorities had the
feeling of maintaining a comprehensive website for information exchange apart from
existing one(static). We used all the possible ways to monitor the data and maintain
and format the data requested by the authority. Also to formulated the text to embed
into World Wide Web. The data is about to change all the time so we will update it all
the time possible. Scope of the project:
How to convert infix notation into postfix and prefix
notations

Let’s recall how we write a mathematical equation with basic arithmetical


operations. Here is an example of a simple equation:

((2 + 2) * 3)

This is the form that we normally use to write equations. This notation is
called infix notation.

Due to the involvement of brackets, computers do not use this notation.


Instead, they use either postfix or prefix notation.

Postfix notation

In postfix notation, the operands come before their operators. Below is


the same equation in postfix notation:

2 2 + 3 *

For the conversion of infix notation into postfix notation, we use


the stack data structure. These are the rules for conversion:

1. Start scanning from left to right.

2. If there is an operand, store it into the output string.

3. If there is an operator, there are three possible cases.

 If the stack is empty, push the operator onto the stack.


 If the operator at hand has more precedence than the topmost
operator on the stack, push the at-hand operator onto the stack.
 If the operator at hand has less or equal precedence than the
topmost operator on the stack, pop the operator from the stack and
store it into the output string, then push the at-hand operator onto
the stack.
4. If there is an opening bracket, push it onto the stack.

5. If there is a closing bracket, pop operators from the stack and


store them into the output string until we popped an opening
bracket.

Let’s convert the given infix notation into postfix


notation.
Prefix notation

In prefix notation, the operators come before their operands. This is also
called Polish notation, or Warsaw notation. Below is the same equation in prefix
notation:

*+ 2 2 3
For the conversion of infix notation into postfix notation, we use the stack data
structure. These are the rules for conversion:

 Reverse the given infix expression.


 Change every ( to ) and every ) to (.
 Convert the expression into postfix notation.
 Reverse the resulting postfix expression.

Let’s convert the given infix notation into prefix notation.

Infix: ((2+2)*3)

Step 1: Reverse the expression.

)3*)2+2((

Step 2: Change every ‘(’ to ‘)’ and every ‘)’ to ‘(’.

(3*(2+2))

Step 3: Convert the expression into postfix.

Now, the resulting postfix expression is 322+*.

Step 4: Reverse the postfix expression.

*+ 2 2 3

This is the resulting prefix expression.


// C++ code to convert infix expression to postfix

#include <bits/stdc++.h>
using namespace std;
// Function to return precedence of operators
int prec(char c)
{
if (c == '^')
return 3;
else if (c == '/' || c == '*')
return 2;
else if (c == '+' || c == '-')
return 1;
else
return -1;
}

// The main function to convert infix expression


// to postfix expression
void infixToPostfix(string s)
{

stack<char> st;
string result;

for (int i = 0; i < s.length(); i++) {


char c = s[i];

// If the scanned character is


// an operand, add it to output string.
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|| (c >= '0' && c <= '9'))
result += c;

// If the scanned character is an


// ‘(‘, push it to the stack.
else if (c == '(')
st.push('(');

// If the scanned character is an ‘)’,


// pop and add to output string from the stack
// until an ‘(‘ is encountered.
else if (c == ')') {
while (st.top() != '(') {
result += st.top();
st.pop();
}
st.pop();
}

// If an operator is scanned
else {
while (!st.empty()
&& prec(s[i]) <= prec(st.top())) {
result += st.top();
st.pop();
}
st.push(c);
}
}

// Pop all the remaining elements from the stack


while (!st.empty()) {
result += st.top();
st.pop();
}

cout << result << endl;


}

// Driver code
int main()
{
string exp = "a+b*(c^d-e)^(f+g*h)-i";

// Function call
infixToPostfix(exp);

return 0;
}
Output:

abcd^e-fgh*+^*+i-

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy