You are on page 1of 6

PROJECT ON HOSTEL MANAGEMENT

INTRODUCTION

This project is based on management of hostels, such as informations about the

students such as his\her roll number , in department they belong to , etc. These

information can be stored in the data and can be verified whenever we want.this        

computer programme can be used for hostels schools etc.. 

OBJECTIVES OF THE PROJECT

The objective of this project is to let the students apply the programming

knowledge into a real- world situation/problem and exposed the students how

programming skills helps in developing a good software.

1. Write programs utilizing modern software tools.

2. Apply object oriented programming principles effectively when developing small

to medium sized projects.

3. Write effective procedural code to solve small to medium sized problems.

4. Students will demonstrate a breadth of knowledge in computer science, as

exemplified in the areas of systems, theory and software development.

5. Students will demonstrate ability to conduct a research or applied Computer

Science project, requiring writing and presentation skills which exemplify

scholarly style in computer science.


PROPOSED SYSTEM

Today one cannot afford to rely on the fallible human beings of be really wants to

stand against today’s merciless competition where not to wise saying “to err is

human” no longer valid, it’s out-dated to rationalize your mistake. So, to keep pace with

time, to bring about the best result without malfunctioning and greater efficiency so to

replace the unending heaps of flies with a muchsophisticated hard disk of the

computer. 

One has to use the data management software. Software has been an ascent in

atomizationvarious organisations. Many software products working are now in markets,

which have helped in making the organizations work easier and efficiently. Data

management initially hadto maintain a lot of ledgers and a lot of paperwork has to be

done but now software producton this organization has made their work fasterand

easier. Now only this software has to beloaded on the computer and work can be done.

This prevents a lot of time and money. Thework becomes fully automated and

any information regarding the organization can beobtained by clicking the button.

Moreover, nowit’s an age of computers of and automatingsuch an organization gives

the better look.


SOURCE CODE

import mysql.connector as sql

conn=sql.connect(host='localhost',user='root',passwd='admin@123',

database='hostel_management')

conn.autocommit=True

if conn.is_connected():

    print('connected succesfully')

else:

    print('not connected')

c1=conn.cursor()

#c1.execute("create table hostel_management(roll_no int primary

key,name varchar(20),address varchar(100),room_no int,dept

varchar(15),fees int,bal int)

print("                                   WELCOME TO  HOSTEL

MANAGEMENT                                   ")

print("     1.ADMISSION FORM")

print("     2.FEE CHECKING")

print("     3.MODIFY DATA")

print("     4.EXIT")

choice=int(input('ENTER YOUR CHOICE'))

if choice==1:
    v_roll=input("ENTER YOUR ROLL NUMBER")

    v_name=input("ENTER YOUR NAME")

    v_add=input("ENTER YOUR ADDRESS")

    v_room_no=input("ENTER YOUR ROOM NUMBER")

    v_dept=input("ENTER YOUR DEPARTMENT")

    v_fees=input("ENTER YOUR FEES")

    v_bal=input("ENTER YOUR BALANCE")

    

    abc=("insert into hostel_management values

("+v_roll+",'"+v_name+"','"+v_add+"',"+v_room_no+",'"+v_dept+"',"

+v_fees+","+v_bal+")")

    print(abc)

    c1.execute(abc)

    conn.commit()

elif choice==3:

    roll_no=int(input("enter your roll number"))

    mysql="select*from hostel_management where

roll_no={}".format(roll_no)

    c1.execute(mysql)

    data=c1.fetchall()

    print("roll_no:",data[0][0])

    print("name:",data[0][1])

    print("address:",data[0][2])           

    print("room_no:",data[0][3])
    print("dept:",data[0][4])

    print("fees:",data[0][5])           

    print("bal:",data[0][6])

elif choice==2:

    print("AVAILABLE DEPARTMENTS AS FOLLOWS")

    print("1.COMPUTER")

    print("2.BIO")

    print("3.TECH")

    print("4.PHYSICS")

    print("5.ECO")

    print("6.ENG")

    department=input("ENTER YOUR DEPARTMENT")

    mysql="select*from fees where

department='{}'".format(department)

    c1.execute(mysql)

    data=c1.fetchall()

    print("your fees is:",data[0][1])

else:

     print("QUITTING!!!!!!!!!")
OUTPUT:

ENTER YOUR CHOICE:

ENTER YOUR ROLL NUMBER

ENTER YOUR NAME

ENTER YOUR ADDRESS

ENTER YOUR ROOM NUMBER

ENTER YOUR DEPARTMENT

ENTER YOUR FEES

ENTER YOUR BALANCE

You might also like