VELAMMAL VIDHYASHRAM
SURAPET
COMPUTER SCIENCE INVESTIGATORY PROJECT ON
TOPIC: ARMORY AND INFANTRY MANAGMENT
NAME: Abhijit. I
CLASS: XII-A1
REGISTER NUMBER:
SSCE -2024 -2025
BONAFIDE CERTIFICATE
This is to certify that this COMPUTER SCIENCE Project on the topic
"ARMORY AND INFANTRY MANAGMENT” has been successfully
completed by ABHIJIT.I of class XII, Roll.no…………………... at Velammal
Vidhyashram, Surapet, for the partial fulfilment of this project as a part of
Senior School Certificate Examination-CBSE, New Delhi for the academic Year
2024- 2025.
Date: ……………………..
Teacher in-charge
Signature of External Examiner Signature of Internal Examiner
Signature of the Principal
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely on the encouragement and
guidelines of many others. I take this opportunity to express my gratitude to the people who have been
instrumental in the successful completion of this project.
I express deep sense of gratitude to almighty God for giving me strength for the successful completion of
the project.
I express my heartfelt gratitude to my parents for constant encouragement while carrying out this project.
I gratefully acknowledge the contribution of the individuals who contributed in bringing this project up to
this level, who continues to look after me despite my flaws,
I express my deep sense of gratitude to the luminary The Principal, The Director Velammal
vidhyashram surapet who has been continuously motivating and extending their helping hand to us.
I express my sincere thanks to the CEO Mr.Velmurugan Velammal vidhyashram surapet, for
providing these opportunity in doing this project
My sincere thanks to Mrs. Shanthi Siddheswaran, Master In-charge, A guide, Mentor all the above a
friend, who critically reviewed my project and helped in solving each and every problem, occurred during
implementation of the project
The guidance and support received from all the members who contributed and who are contributing to
this project, was vital for the success of the project. I am grateful for their constant support and help.
TABLE OF CONTENTS
S.N PAGE
TOPIC
O NO.
1.
ABSTRACT 5
2. SYSTEM 5
CONFIGURATION
3.
INTRODUCTION 6
4. OBJECTIVES OF THE
PROJECT 6
5.
PROPOSED SYSTEM 7
6. LIBRARIES AND
8
FUNCTIONS USED
7.
SOURCE CODE 9
8.
OUTPUT(SCREENSHOT) 25
9.
CONCLUSION 38
10.
BIBILIOGRAPHY 38
ABSTRACT
This project presents an Army Management System developed in Python
using SQLite for database management. It enables users to add, display, and
remove army units through a simple interface. The system checks available
quantities before removal, ensuring accurate inventory management. Overall,
it serves as a practical example of basic database operations in a user-friendly
application
SYSTEM CONFIGURATION
HARDWARE CONFIGURATION
Microsoft Apple
Processor: Apple M1
Memory: 8GB
Disk space : 19 of 256GB
SOFTWARE CONFIGURATION
GB RAM
Apple M1
13.3 Inch(2560x1600)
INTRODUCTION
I This project is a straightforward Army Management System created in Python using
SQLite. It allows users to easily add, display, and remove army units. The program features
a simple interface for managing military resources. Users can input unit details and see
current inventory at any time. It also checks if enough units are available before removal.
Overall, it demonstrates basic database operations in a user-friendly way.
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.
Write programs utilizing modern software tools.
Apply object-oriented programming principles effectively when developing small to medium
sized projects.
Write effective procedural code to solve small to medium sized problems.
Students will demonstrate a breadth of knowledge in computer science, as exemplified in the
areas of systems, theory and software development.
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 outdated 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
much sophisticated hard disk of the computer.
One has to use the data management software. Software has been an ascent in atomization
various organisations. Many software products working are now in markets, which have helped in
making the organizations work easier and efficiently. Data management initially had to maintain
a lot of ledgers and a lot of paperwork has to be done but now software product on this organization
has made their work faster and easier. Now only this software has to be loaded on the computer
and work can be done.
This prevents a lot of time and money. The work becomes fully automated and any
information regarding the organization can be obtained by clicking the button. Moreover, now it’s
an age of computers of and automating such an organization gives the better look.
Libraries Used:
1. sqlite3:
- A built-in Python library for interacting with SQLite databases, allowing for the creation,
querying, and management of the database.
Functions Used:
1. setup_database():
- Creates the database and the army table if it doesn't already exist.
2. insert_army_unit(unit_type, name, quantity):
- Inserts a new army unit into the database with the specified type, name, and quantity.
3. remove_army_unit(name, quantity_to_remove) :
- Removes a specified quantity of a unit from the database, checking if enough units are
available first.
4. get_user_input():
- Collects user input for adding a new army unit, including unit type, name, and quantity.
5. display_army_units():
- Fetches and displays all current army units from the database in a structured format.
6. main_menu():
- Provides a simple text-based interface for navigating between options to add, display, or
remove army units.
SOURCE CODE
import sqlite3
def setup_database():
conn = sqlite3.connect('army.db')
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS army (
id INTEGER PRIMARY KEY AUTOINCREMENT,
unit_type TEXT NOT NULL,
name TEXT NOT NULL,
quantity INTEGER NOT NULL
''')
conn.commit()
conn.close()
if __name__ == "__main__":
setup_database()
print("Database setup complete.")
def insert_army_unit(unit_type, name, quantity):
conn = sqlite3.connect('army.db')
cursor = conn.cursor()
cursor.execute('''
INSERT INTO army (unit_type, name, quantity)
VALUES (?, ?, ?)
''', (unit_type, name, quantity))
conn.commit()
conn.close()
print(f"Added {quantity} units of {name} to {unit_type}.")
def remove_army_unit(name, quantity_to_remove):
conn = sqlite3.connect('army.db')
cursor = conn.cursor()
# Fetch current quantity for the specified unit
cursor.execute('SELECT quantity FROM army WHERE name = ?',
(name,))
result = cursor.fetchone()
if result:
current_quantity = result[0]
if current_quantity >= quantity_to_remove:
new_quantity = current_quantity - quantity_to_remove
cursor.execute('UPDATE army SET quantity = ? WHERE name
= ?', (new_quantity, name))
conn.commit()
print(f"Removed {quantity_to_remove} units of {name}.")
else:
print(f"Cannot remove {quantity_to_remove} units. Only
{current_quantity} available.")
else:
print(f"No units found with the name '{name}'.")
conn.close()
def get_user_input():
unit_type = input("Enter unit type (Armory/Infantry): ")
name = input("Enter unit name: ")
quantity = int(input("Enter quantity: "))
insert_army_unit(unit_type, name, quantity)
def display_army_units():
conn = sqlite3.connect('army.db')
cursor = conn.cursor()
cursor.execute('SELECT * FROM army')
rows = cursor.fetchall()
if rows:
print("\nCurrent Army Units:")
print("-" * 60)
print(f"| {'ID':<5} | {'Type':<12} | {'Name':<20} | {'Quantity':<8} |")
print("-" * 60)
for row in rows:
print(f"| {row[0]:<5} | {row[1]:<12} | {row[2]:<20} | {row[3]:<8}
|")
print("-" * 60)
else:
print("No units found in the database.")
conn.close()
def main_menu():
while True:
print("\n\t\t Army Management System")
print("1. Add Army Unit")
print("2. Display Army Units")
print("3. Remove Army Unit")
print("4. Exit")
choice = input("Choose an option: ")
if choice == '1':
get_user_input()
elif choice == '2':
display_army_units()
elif choice == '3':
name = input("Enter the unit name to remove: ")
quantity = int(input("Enter the quantity to remove: "))
remove_army_unit(name, quantity)
elif choice == '4':
print("Exiting the program.")
break
else:
print("Invalid choice. Please try again.")
if __name__ == "__main__":
main_menu()
OUTPUT:
CONCLUSION
In conclusion, this Army Management System effectively demonstrates basic
database operations using Python and SQLite. Users can easily add, display, and
remove army units. The project highlights key programming concepts and provides
a practical tool for managing military resources. It serves as a foundation for
further development and enhancements.
BIBLIOGRAPHY
Computer Science with python by Sumita Arora for Class 11 and 12
www.google.in