Anda di halaman 1dari 7

TERM PAPER

This is just a documentation of the project which gives the outline of the
project and brief explanation of the functioning of the program code and
it’s importance in the real world. The lengthof this document is exactly
1,615 words. No program code is attatched to this document and it will be
submitted with the executable code when asked by the teacher.

NAME : AMBRISH KUMAR SINGH

SECTION : C1903

ROLL NUMBER : 37

SUBJECT: CSE 101

STUDENT GROUP : 2

REGISTRATION ID : 10906128

COURSE INSTRUCTOR : PARAMJIT SINGH

DATE OF SUBMISSION : 7/12/2009

DECLARATION

I declare that this term paper is my individual work. I have not copied from any
other student’s work or from any other source nor has any part been written for
me by another person.

Student’s Signature: Ambrish

1
INDEX

Sl. No. Topic Pg. No.

Abstract 3
I Acknowledgement 3
II Introduction 3
III Aim of the project 3
IV Concepts of programming implemented in the project 3
V The concept of modular programming 3
VI Explanation of the program code in brief 4
A) The header files used in the program 4
B) The in-built functions used in the program 4
C) User defined functions in the program 4
1) display() 4
2) Hotel_Details() 4
3) loading() 4
4) password() 4-5
5) attempt(int) 5
6) start() 5
7) Menu_Card() 5
8) balance_sheet() 5
9) Room_Booking() 5
10) View() 5
11) presentation(int) 5
12) presentation1() 6
13) background(int,int) 6
D) Structures used in the program 6
VII Conclusion 6
VIII References 6
IX Further Readings 6
X Bibliography 7

2
Abstract – This document gives a detailed description of the project on “Hotel
Management” created by me.

I. ACKNOWLEDGEMENT

First of all I would like to thank the almighty for helping me to complete this project without
panicking even under so much of stress and pressure. Special thanks to my mom for
whispering the words of encouragement in my ears whenever I got demoralised, my younger
brother for his creative ideas and suggestions from time to time, last but not the least thanks to
all my teachers for guiding me and correcting me when I was wrong and encouraging me to
think creatively to solve problems rather than mugging up the bookish approach.

II. INTRODUCTION

It’s a complex task to manage a hotel, arrange for cooks and waiters, ensure that the staff is
polite with the guest, ensure that the rooms are clean, keep a record of personal details of the
guests, maintain a record of the meals taken by the guest, and maintain these records(they are
important in case of police enquiry).

III. AIM OF THE PROJECT

The project has been given a professional look. The idea behind creating this project is to
minimize the paper work done in managing a hotel. This project stores every record in files
that can be retrieved whenever needed. The management doesn’t need to store heaps of files
in record rooms to keep a record of their customers. Now they just need is a computer and a
man who has basic knowledge about computers. The user has to give raw information which
will be processed by the program code to extract meaningful results.

IV. CONCEPTS OF PROGRAMMING IMPLEMENTED IN THE


PROJECT

This project makes use of core concepts of C implemented in a logical sequence backed up by
terrific programming. The concepts that have been used are:
A) Structures
B) Operation on files
C) Pointers
D) Arrays
E) Functions
F) Looping statements (for, while and do while)
G) Conditional Statements(if and switch)
H) Selective use of datatypes
I) Modulation of a program code

V. THE CONCEPT OF MODULAR PROGRAMMING


The program has been modulated i.e. divided into small parts and each part is responsible for
carrying out a specific task. This makes it easier to find flaws in the program and the code also
becomes readable and easier to understand as the logic implemented is clearly depicted.

3
VI. EXPLANATION OF THE PROGRAM CODE IN BRIEF

A) The header files used in the program are:

#include<stdio.h>
#include<dos.h>
#include<string.h>
#include<conio.h>
#include<process.h>

B) The in-built functions used in the program are:

delay()
printf()
scanf()
cprintf()
cscanf()
getch()
getche()
settextcolor()
textbackground()
strcmp()
fopen()
fclose()
clrscr()

C) User Defined functions in the program

The progam makes use of several user-defined functions and each function performs a
specific task:

1. display() – The return type of this function is void as this function doesn’t return any value.
This function initiates the program and it displays the name of the programmer and the people
he wants to thank.

2. Hotel_Details() - The return type of this function is void as this function doesn’t return
any value. It displays details about:
a) The hotel
b) The Manager
c) Cooks
d) Waiters
e) Other staff members

3. loading() – It is just an illusion created to show that the project is loaded in the memory.
The progress is shown by a green bar and the percentage upto which progress is made is
displayed towards the right side.

4. password() – This is to certify that only the users with proper authority can make use of the
code created. If the user types wrong password thrice then the program automatically closes

4
itself in 10 seconds. password() makes use of another user defined function attempt(int) to
accomplish this task.

5. attempt(int) – This function takes an integer as input and it keeps a track of the number of
attempts the user has made to get the password right. It doesn’t allow the user to make more
than three attempts.

6. start() – This function initiates the most important part of the program. It gives the user the
following choices:
1) Hotel Details
2) View Menu Card
3) Pay the bill of the food
4) Booking a room
5) Customer Details
6) Exit
Once the user makes a choice it initiates the respective function to carry out the task.

7) Menu_Card() – It displays the categories of the food in the menu and the user has to select
from the category to display the names of the food items under that category. The choices in
category are:
1) Snacks
2) Chinese
3) Soups
4) Rice
5) Roti/Nan
6) Indian
7) Dal
8) Salad
9) Beverages
0) Return to Main Menu

8) balance_sheet() – It takes the item name, its price, quantity, discount on the item as input
and displays the amount to be paid after proper calculation, thereby making reduction to the
price after discount and adding the payable amount to the previous balance and displays the
net amount the customer has to pay. It also takes the name, address, phone number and the
previous balance that the customer has to clear as input.

9) Room_Booking() – This user defined function displays a form which the customer has to
fill to book a room for himself. It takes the personal information about the customer which is
save in a file for future reference.

10) View() – This user defined function is created to search among the records of the
customers. The following criteria is set to carry out a search:
a) List name and place where the customer belongs
b) Type customers name for full details
c) Search by Mobile Number

11. presentation(int) – This user defined function takes an integer input and and displays
animated border when called by some other function.

5
12. presentation1() – This user defined function displays borber in an animated manner
whenever it is called by some other user defined function.

13. background(int,int) – Since the in-built function setbkcolor() under Graphics.h header
file couldn’t be used without initializing the init graph to change the background. Therefore I
created a self-defined function to accomplish the task and I did it successfully.

14. presentation2() – This user defined function doesn’t return any value and is designed
mainly for the purpose of displaying border on different occasions when it’s required.

D) Structures used in the program

The structures used in the program are useful in referring a customers detail under one name
and saving the data to specified files. This is of great help in retrieving the data for
comparing, viewing or modifying.
1. Structure N – The structure named N is used to manipulate the data which is provided in the
balance sheet while making payment for the food.
2. Structure book – The structure named book is a collection of different variables which
assists the user to manipulate the data provided by the customer in the room booking form.

VII. CONCLUSION

This project has allowed me to revise and implement the basic concepts of programming. It is
a boost to my confidence level and now I can work on complex logics with more confidence. I
have realized how important each concept is and how it can be implemented in real world
programming. While writing the code I faced many problems and I thought over them and got
over them with the help of logical and clever programming. I have got the taste of thrill and
the excitement that the professionals feel while designing their programming code. After
completing this project I get the feeling of being a software engineer and I am all charged up
to write coding for more problems.

VIII. REFERENCES

[1] Behrauz A. Foruzan & Richard F. Gilberg,”Computer Science – A structure programming


approach using C”,Thompson Asia 2001. [2] http://www.exforsys.com/404go.php?
zuri=/tutorials/clanguage

IX. FURTHER READINGS

[1] B. W. Kernighan and D. M. Ritchie, “The C Programming Language”,Prentice Hall of


India, New Delhi.
[2] E. Balagurusamy, “Programming in ANSI C”,Tata Mc Graw Hills Company Limited,New
Delhi.

X. BIBLIOGRAPHY

6
Serial Name of the Book Author
No.

1. Programming with ANSI and turbo C Ashok N. Kamthane


2. Let Us C Yashwant Kanetkar
3. Programming with C Byron Gottfried

Anda mungkin juga menyukai