Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
43 views

Frontc Update

Here are the key terms related to file handling in C++: - File stream (fstream): Base class that supports both input and output file operations. - Output file stream (ofstream): Used for writing data to files. Open files in write or append mode. - Input file stream (ifstream): Used for reading data from files. Open files in read mode. - open(): Opens a file and associates it with a file stream object. - close(): Closes an open file. - read(): Reads data from an open input file into a variable. - write(): Writes data from a variable to an open output file. - seekg(): Changes the
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Frontc Update

Here are the key terms related to file handling in C++: - File stream (fstream): Base class that supports both input and output file operations. - Output file stream (ofstream): Used for writing data to files. Open files in write or append mode. - Input file stream (ifstream): Used for reading data from files. Open files in read mode. - open(): Opens a file and associates it with a file stream object. - close(): Closes an open file. - read(): Reads data from an open input file into a variable. - write(): Writes data from a variable to an open output file. - seekg(): Changes the
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

GOVERNMENT POLYTECHNIC, JALGAON

(0018)

Program Name and Code : Information Technology (IF3I)


Course Name and Code : Object Oriented Programming
Academic Year : 2023-2024

Semester :Third

MICROPROJECT ON

Plantshop Management System

Submitted in October 2023 by the group of 4 students


Sr. Roll Enrollment
No. No. Name of student No. Seat No.

1 3 Mahajan Mamta Nandu 2200180333


2 27 Patil Kalyani Kiran 2200180362
3 37 Baviskar Mansi Sandip 2200180373
4 41 Patil Payal Mohan 2200180380

Project Guide :-Mrs.Sunita Lande Mam


MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION

Certificate
This is to certify that Master /Ms.Mamta Mahajan , Kalyani Patil , Mansi Baviskar

Payal Patil. .RollNo :- 3, 27, 37, 41 of Third Semester of Diploma in Information


Technology of Institute, Government Polytechnic, Jalgaon (Code:0018) has completed
the Micro Project satisfactorily in the Subject – Object Oriented Programming for the
Academic Year 2023-2024. as prescribed in the curriculum.

Place: Jalgaon Enrollment No :- 2200180333

2200180362

Date: …………………….. 2200180373

2200180380

Subject Teacher Head of the Department Principal

Seal of
Institution
GOVERNMENT POLYTECHNIC
JALGAON

-SUBMISSION-

I (Full Name) Mamta Nandu Mahajan, Kalyani Kiran Patil, Mansi Sandip
Baviskar, Payal Moahan Patil. Roll No :- 3,27,37,41 as a student of Second
Sem/Year of the Programme Information Technology humbly submit that I
have completed from time to time the Practical/Micro-Project work as described
in this report by my own skills and study between the period from July 2023 to
October 2023 as per instructions/guidance of Mrs. Sunita Landge Mam

And that following students were associated with me for this work,
however, quantum of my contribution has been approved by the Lecturer.
And that I have not copied the report on its any appreciable part from any
other literature in contravention of the academic ethics.

Signature of Student
Roll No Sign
3
27
Date :……/…………/2023 37
41
Evaluation Sheet for the Micro Project
Academic Year: 2022-23
Name of the Faculty:Mrs. Sunita Landge Mam
Course: Course code:Object Oriented Programming 22316
Semester: Third
Title of the project :- Plantshop Management System
COs addressed by Micro Project:
Study The Plantshop Management System

Use File Handling Concept

Major learning outcomes achieved by students by doing the project

Marks out of Marks out of


6 for 4for
Roll Student Name performance performance in Total out
No in group oral/ of 10
activity (D5 presentation
Col.8) (D5 Col.9)

3 Mahajan Mamta Nandu

27 Patil Kalyani Kiran

37 Baviskar Mansi Sandip

41 Patil Payal Mohan


INDEX

Sr. No Page Name Page No.

1 Introduction 7

2 9
History
File Handling Terminology
3 11

4 Features 12

5 Program Code 13

6 Output 25

7 Conclusion 29

8 References 30
WEEKLY PROGRESS REPORT

SR.NO. WEEK ACTIVITY PERFORMED SIGN OF GUIDE DATE

1 1st Discussion and finalization of


topic

2 2nd Preparation and submission of


Abstract
3 3rd Literature Review

4 4th Collection of Data

5 5th Collection of Data

6 6th Discussion and outline of


Content

7 7th Formulation of Content

8 8th Editing and proof Reading of


Content
9 9th Compilation of Report And
Presentation
10 10th Seminar

11 11th Viva voce

12 12th Final submission of Micro


Project

Sign of the student Sign of the faculty


Introduction

Object-oriented programming (OOP) is a programming paradigm based on the concept of


objects, which are data structures that contain data, in the form of fields (or attributes) and
code, in the form of procedures, (or methods). A distinguishing feature of objects is that an
object’s procedures provide access to and modify its fields.

In object-oriented programming, computer programs are designed by making them out of


objects that interact with one another. There is significant diversity in object-oriented
programming, but most popular languages are class-based, meaning that objects are instances
of classes, which typically also determines their type.

Object orientation is an outgrowth of procedural programming. Procedural programming is


a programming paradigm, derived from structured programming, based upon the concept of
the procedure call. Procedures, also known as routines, subroutines, or methods define the
computational steps to be carried out.

Any given procedure might be called at any point during a program’s execution, including
by other procedures or itself. Procedural programming is a list or set of instructions telling a
computer what to do step by step and how to perform from the first code to the second code.
Procedural programming languages include C, Fortran, Pascal, and BASIC.

The focus of procedural programming is to break down a programming task into a collection
of variables, data structures, and subroutines, whereas in object-oriented programming it is
to break down a programming task into objects that expose behavior (methods) and data
(fields) using interfaces. The most important distinction is that while procedural
programming uses procedures to operate on data structures, object-oriented programming
bundles the two together, so an object, which is an instance of a class, operates on its “own”
data structure.
History

Among all programming language existing today, C++ remain one of the most
widely used language by computer scientists in the world. Turns out, C++ never
really started with the name “C++” when it was first created. Tracing back in 1979,
Danish computer scientist Bjarne Stroustrup first started with a language called
“Simula”, which was mainly used for simulation as the name implies. The Simula 67
language, a variant of Simula, is acknowledged to be an Object-Oriented
Programming paradigm. However , it has its drawback which is to slow for practical
uses. Stroustrup then began working with “C with Classes” the superset of the C++
language which acquired praises due to its speed and portability. Its compile is called
C Font which can self-compile.
Amazingly, C with Classes allowed the birth of C++ in 1983, “C with Classes” was
renamed to “C++” in which the “++” is an operator for incrementing a variable.

C++ Timeline:

1. 1979:-

a. C with Classes was born.

b. Derived Classes.

c. Constructor, Destructor.

d. private/public access control and function declaration with argument checking.

2. 1983:-

a. New official name C++.

b. Virtual Function.

c. Function and Operator overloading.

d. Reference and I/O Stream.

3. 1985:-
a. Commercial Release Error

b. Handling base on Exception.

4. 1997:-

8
a. Namespace

b. Standard library.

5. 1998:-

a. C++98 ISO Standard Release.

6. 2003:- C++04 standard release.

7. 2009:- C++0X Uniform initialization.

a. Standard library :Threads, locks.

8. 2013:- C++11 standard release. 9. 2014:- C++14 standard release.


9. 2017:- C++17 standard release.
File Handling Terminology
The fstream library provides C++ programmers with three classes for working with files.
These classes include:

ofstream– This class represents an output stream. It’s used for creating files and writing
information to files.

• ifstream– This class represents an input stream. It’s used for reading information from
data files.
fstream– This class generally represents a file stream. It comes with ofstream/ifstream
capabilities.

This means it’s capable of creating files, writing to files, reading from data files.

File Opening Mode:


Features

Plant Shop management system project in C++ is a simple console application


built without graphics. In this project, users can add a new plant record, display all
records, search a particular plant record and delete plant records. This simple project
will teach you file handling operations such as how to add, search, modify list and
delete records using file.

1) Add a plant name:- This features adds a new plant record to the file. It asks for
the plant number and name of the person whose record is to be created. Upon
successful creation of a new plant record, the plantshop management system
program display the message” New contact added successfully”.
2) Show all plant:- In plantshop management system, this feature allow user to
show all the plant records stored in file. The information displayed here are
plant number , plant name , No.of copies..
3) Search For plant:- This function is very simple, and with it users can search for
a plant record by providing the plant number.
4) Update a plant:- This simple feature allows user to update the shopkeeper
name and plant name corresponding to a particular plant record
Delete a plant :-This feature deletes added plant record from the file. The user needs to
provided the number to be deleted from plantshop management system
Program code

#include<iostream>
#include<stdio.h>
#include<fstream>
using namespace std;
class plantshop
{
public:
void control_panel();
void add_plant();
void show_plant();
void check_plant();
void update_plant();
void del_plant();
};
void plantshop::control_panel()
{

cout<<"\n\n\t\t\t\tControl Panel";
cout<<"\n 1. Add New plant";
cout<<"\n 2. Show plant";
cout<<"\n 3. Check Specific plant";
cout<<"\n 4. Update plant";
cout<<"\n 5. Delete plant";
cout<<"\n 6. Exit";
}

void plantshop::add_plant()
{

fstream file;
int no_quantity,p_num;
string p_name,s_name;
cout<<"\n\n\t\t\t\t ADD Plants";
cout<<"\n plant Number : ";
cin>>p_num;
cout<<"\n plant Name : ";
cin>>p_name;
cout<<"\n shopkeeper Name : ";
cin>>s_name;
cout<<"\n No. of quantity : ";
cin>>no_quantity;
file.open("plant.txt",ios::out|ios::app);
file<<" "<<p_num<<" "<<p_name<<" "<<s_name<<" "<<no_quantity<<"\n";
file.close();
}

void plantshop::show_plant()
{

fstream file;
int no_quantity;
string p_name,p_num,s_name;
cout<<"\n\n\t\t\t\tShow All plants";
file.open("plant.txt",ios::in);
if(!file)
cout<<"\nFile Openning Error...";
else
{
cout<<"\n plant number Plant name shopkeeperName No. of
quantity\n\n";
file>> p_num>> p_name>> s_name>> no_quantity;
while(!file.eof())
{
cout<<" "<<p_num<<" "<<p_name<<"
"<<s_name<<" "<< no_quantity <<"\n";
file>> p_num>> p_name>> s_name>>
no_quantity;
}
file.close();
}
}

void plantshop::check_plant()
{

fstream file;
int no_quantity,count=0,p_num,p_No;
string p_name,s_name;
cout<<"\n\n\t\t\t\tCheck Specific plant";
file.open("plant.txt",ios::in);
if(!file)
cout<<"\n File Openning Error...";
else
{
cout<<"\n\n plant Number : ";
cin>>p_No;
file>>p_num>>p_name>>s_name>>no_quantity;
while(!file.eof())
{
if(p_No == p_num)
{

cout<<"\n\t\t\t\tCheck Specific plant";


cout<<"\nplant Number : "<<p_num;
cout<<"\nName : "<<p_name;
cout<<"\nshopkeeper name: "<<s_name;
cout<<"\nNo. of quantity: "<<no_quantity;
count++;
break;
}
file>>p_num>>p_name>>s_name>>no_quantity;
}
file.close();
if(count == 0)
cout<<"\n\n plant number is Not Found...";
}
}

void plantshop::update_plant()
{

fstream file,file1;
int no_quantity,no_qt,count=0;
string p_name,p_na,s_name,s_na,p_No,p_num;
cout<<"\n\n\t\t\t\tUpdate plant Record";
file1.open("plant1.txt",ios::app|ios::out);
file.open("plant.txt",ios::in);
if(!file)
cout<<"\n\n File Openning Error...";
else
{
cout<<"\n plant Number: ";
cin>>p_num;
file>>p_No>>p_name>>s_name>>no_quantity;
while(!file.eof())
{
if(p_num == p_No)
{

cout<<"\n\n\t\t\t\tUpdate Plant Record";


cout<<"\n New Plant Name : ";
cin>>p_na;
cout<<"\nshopkeeper Name : ";
cin>>s_na;
cout<<"\n No. of quantity : ";
cin>>no_qt;
file1<<" "<<p_num<<" "<<p_na<<" "<<s_na<<"
"<<no_qt<<"\n";
count++;

}
else
file1<<" "<<p_No<<" "<<p_name<<" "<<s_name<<"
"<<no_quantity<<"\n";
file>>p_No>>p_name>>s_name>>no_quantity;
}

if(count == 1)
cout<<"\nplant is Updated successfully...";
else
cout<<"\nplant number is not found ...";

}
file.close();
file1.close();
remove("plant.txt");
rename("plant1.txt","plant.txt");
}

void plantshop::del_plant()
{

fstream file,file1;
int no_quantity,p_No,p_num,count=0;
string p_name,s_name;
cout<<"\nDelete plant Record";
cout<<"\nplant Number: ";
cin>>p_num;

file1.open("plant1.txt",ios::app|ios::out);
file.open("plant.txt",ios::in);

file>>p_No>>p_name>>s_name>>no_quantity;
while(!file.eof())
{
if(p_num == p_No)
{

cout<<"\n\n\t\t\t\tDelete plant Record";


cout<<"\n plant is Deleted Successfully...";
count++;
}
else
file1<<" "<<p_No<<" "<<p_name<<" "<<s_name<<"
"<<no_quantity<<"\n";
file>>p_No>>p_name>>s_name>>no_quantity;
}
if(count == 0)
cout<<"\n plant is Not deleted...";

file.close();
file1.close();
remove("plant.txt");
rename("plant1.txt","plant.txt");
}
main()
{
int choice;
char x;
plantshop p;
p:
p.control_panel();
cout<<"\n\n Your Choice : ";
cin>>choice;
switch(choice)
{
case 1:
do
{
p.add_plant();
cout<<"\n Do You Want to Add another shopkeeper(y,n) : ";
cin>>x;
}while(x == 'y');
break;
case 2:
p.show_plant();
break;
case 3:
p.check_plant();
break;
case 4:
p.update_plant();
break;
case 5:
p.del_plant();
break;
case 6:
exit(0);
default:
cout<<"\n\n Invalid Value...Please Try Again...";
}

got p;

}
Output :-

Add palnt

Show plant

Show specific plant


Update plant

Delete plant
Conclusion

The plantshop Management System project is designed in ‘C++’ language. This system is
based on a concept to store and generate all the records of the Plant Management system
Contact. Also, this program is considered as a simple database of plantshops in store n
where the user can add Contact details safely and it’s not time-consuming. This System
makes easy to store records of each. Moreover, the user can add personal details, view a list
of it, modify and remove the details. Also, this micro project is easy to operate and
understand by the users
Reference

1. https://www.programiz.com/cpp-programming/examples
2. https://www.w3schools.com/cpp/
https://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm
4. http://www.cplusplus.com

You might also like