Professional Documents
Culture Documents
On
Of
Ambernath (Maharashtra)
(2019-20)
1
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to certify that Mr/Ms.
Sr.No Name of group Roll Enrollment Seat No
members No No
1 More Siddharth
2 Utekar Pooja
3 Suryavanshi Vinayak
4 Sable Deepali
5 Dalvi Parth
6 Jadhav Srushti
of 3rd Semester of Diploma in COMPUTER TECHNOLOGY of Institute,
SAMARTH.SHIVAJIRAO JONDHALE POLYTECHNIC (Code:0147) has
completed the Micro Project satisfactorily in Subject: Object-Oriented
Programming Using C++ (22316) for the academic year (2019- 2020) as
prescribed in the curriculum.
Place: AMBERNATH. Date:
Subject Teacher Head of the Department Principal
2
Group Details:
1) More Siddharth
2) Utekar Pooja
3) Suryavanshi
Vinayak
4) Sable Deepali
5) Dalvi Parth
6) Jadhav Srushti
3
INDEX
1 ABSTRACT 6
2 INTRODUCTION 7
3 LITERATURE SURVEY 8
4 PROBLEM DEFINITION 9
5 PROPOSED SYSTEM 10
6 TECHNIQUE 11
7 Source Code 12
8 SYSTEM IMPLEMENTATION 25
9 APPLICATIONS 28
10 REFERENCES 29
11 CONCLUSION 30
4
WEEKLY PROGRESS REPORT
5
1. ABSTRACT
6
2. INTRODUCTION
.
7
3. LITERATURE SURVEY
The prime purpose of C++ programming was to add object orientation to the C
programming language, which is in itself one of the most powerful programming
languages.
The core of pure object-oriented programming is to create an object, in code, that has
certain properties and methods. While designing C++ modules, we try to see the whole
world in the form of objects. For example, a car is an object which has certain properties
such as color, number of doors, and the like. It also has certain methods such as
accelerate, brake, and so on.
Object-oriented programming uses objects, but not all of the associated techniques and
structures are supported directly in languages that claim to support OOP. The features
listed below are common among languages considered to be strongly class- and object-
oriented (or multi-paradigm with OOP support), with notable exceptions mentioned.
8
4. PROBLEM DEFINITION
9
5. PROPOSED SYSTEM
10
6. TECHNIQUE:
Encapsulation
Data Hiding
Overloading
Polymorphism
Grand-daddy of them all – Inheritance
11
7. Source Code
#include<iostream.h>
#include<conio.h>
#include<fstream.h>
#include<stdio.h>
#include<dos.h>
class hotel
int room_no;
char name[30];
char address[50];
char phone[10];
public:
void main_menu();
void add();
void display();
void rooms();
void edit();
int check(int);
void modify(int);
12
void delete_rec(int);
};
void hotel::main_menu()
int choice;
while(choice!=5)
clrscr(); cout<<"\n\t\t\t\
t*************"; cout<<"\n\t\t\t\t*
t*************"; cout<<"\n\n\n\t\t\
switch(choice)
13
case 1: add();
break;
case 2: display();
break;
case 3: rooms();
break;
case 4: edit();
break;
case 5: break;
default:
{
cout<<"\n\n\t\t\tWrong choice!!!";
getch();
void hotel::add()
clrscr();
int r,flag;
14
ofstream fout("Record.dat",ios::app);
cout<<"\n **********************";
cin>>r;
flag=check(r);
if(flag)
else
room_no=r;
gets(name);
gets(address);
gets(phone);
fout.write((char*)this,sizeof(hotel)); cout<<"\
n Room is booked!!!";
}
15
cout<<"\n Press any key to continue!!";
getch();
fout.close();
void hotel::display()
clrscr();
ifstream fin("Record.dat",ios::in);
int r,flag;
cin>>r;
while(!fin.eof())
fin.read((char*)this,sizeof(hotel));
if(room_no==r)
clrscr();
cout<<"\n ****************";
16
cout<<"\n Address: "<<address;
flag=1;
break;
if(flag==0)
getch();
fin.close();
void hotel::rooms()
clrscr();
ifstream fin("Record.dat",ios::in);
cout<<"\n\t\t\t*********************";
cout<<"\n\n Room No.\tName\t\tAddress\t\tPhone No.\n";
17
while(!fin.eof())
fin.read((char*)this,sizeof(hotel));
cout<<"\n\n "<<room_no<<"\t\t"<<name;
cout<<"\t\t"<<address<<"\t\t"<<phone;
}
getch();
fin.close();
void hotel::edit()
clrscr();
int choice,r;
cout<<"\n *********";
18
cin>>choice;
clrscr();
cin>>r;
switch(choice)
case 1: modify(r);
break;
case 2: delete_rec(r);
break;
getch();
int hotel::check(int r)
int flag=0;
ifstream fin("Record.dat",ios::in);
19
while(!fin.eof())
fin.read((char*)this,sizeof(hotel));
if(room_no==r)
flag=1;
break;
fin.close();
return(flag);
void hotel::modify(int r)
long pos,flag=0;
fstream file("Record.dat",ios::in|ios::out|ios::binary);
while(!file.eof())
pos=file.tellg();
file.read((char*)this,sizeof(hotel));
20
if(room_no==r)
cout<<"\n *****************";
gets(name);
gets(address);
gets(phone);
file.seekg(pos);
file.write((char*)this,sizeof(hotel));
flag=1;
break;
if(flag==0)
file.close();
21
}
void hotel::delete_rec(int r)
int flag=0;
char ch;
ifstream fin("Record.dat",ios::in);
ofstream fout("temp.dat",ios::out);
while(!fin.eof())
fin.read((char*)this,sizeof(hotel));
if(room_no==r)
{
cin>>ch;
if(ch=='n')
fout.write((char*)this,sizeof(hotel));
22
flag=1;
else
fout.write((char*)this,sizeof(hotel));
fin.close();
fout.close();
if(flag==0)
else
remove("Record.dat");
rename("temp.dat","Record.dat");
}
void main()
hotel h;
textmode(C80);
textbackground(BLACK);
23
textcolor(WHITE);
clrscr();
cout<<"\n\t\t\t****************************";
cout<<"\n\t\t\t****************************";
sleep(2);
getch();
h.main_menu();
24
8. SYSTEM IMPLEMENTATION:
25
26
27
9. APPLICATION:
Real-Time Systems
Object-oriented databases
28
10. References
https://www.thecrazyprogrammer.com/2012/12/c-hotel-management-project.html
https://en.wikipedia.org/wiki/Object-oriented_programming#Features
https://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm
https://www.codewithc.com/hotel-management-system-project-in-c/
https://sites.google.com/site/ignoubcafinalyearprojects/project-report/hotel-management-
system-project-report
https://www.slideshare.net/princejustleavehimalone/hotel-management-system-in-c
https://www.mycplus.com/tutorials/object-oriented-programming/oop-techniques/
https://tutorialink.com/cpp/applications-of-object-oriented-programming.cpp
29
11. CONCLUSION:
At the end of this coursework, we can: - Explain object-oriented programming concepts
and apply them to the modeling of real-world systems. - Explain the object-oriented
paradigm and utilization of the offered facilities. - Demonstrate the ability to develop and
derive new class structures and organize them such that they will model real-world
systems within computers.
30
Shivajirao S. Jondhale Polytechnic, Ambernath (E)
Teacher Evaluation Sheet
Academic Year 2019-20
31
Marks:
Siddharth More.
Pooja Utekar.
Vinayak Suryavanshi
Deepali Sable.
Parth Dalvi.
Srushti Jadhav.
32