Frontc Update
Frontc Update
(0018)
Semester :Third
MICROPROJECT ON
Certificate
This is to certify that Master /Ms.Mamta Mahajan , Kalyani Patil , Mansi Baviskar
2200180362
2200180380
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
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
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:-
b. Derived Classes.
c. Constructor, Destructor.
2. 1983:-
b. Virtual Function.
3. 1985:-
a. Commercial Release Error
4. 1997:-
8
a. Namespace
b. Standard library.
5. 1998:-
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.
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)
{
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)
{
}
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)
{
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
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