0% found this document useful (0 votes)
9 views11 pages

1) Identify Project Scope and Objective of Given Problem: A. College Automation System. B. Banking Management System. College Automation System

The document outlines two project scopes and objectives: a College Automation System that automates administrative and academic functions, and a Banking Management System that manages bank accounts. The College Automation System focuses on student registration, attendance tracking, and course management, while the Banking Management System allows for account creation, deposits, and withdrawals. Both systems include Python code examples demonstrating their functionalities.

Uploaded by

Liveesh Johnson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views11 pages

1) Identify Project Scope and Objective of Given Problem: A. College Automation System. B. Banking Management System. College Automation System

The document outlines two project scopes and objectives: a College Automation System that automates administrative and academic functions, and a Banking Management System that manages bank accounts. The College Automation System focuses on student registration, attendance tracking, and course management, while the Banking Management System allows for account creation, deposits, and withdrawals. Both systems include Python code examples demonstrating their functionalities.

Uploaded by

Liveesh Johnson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

1) Identify project scope and objective of given problem:

a. College automation system.


b. Banking Management System.
College Automation System

Project Scope:

The College Automation System aims to automate various administrative and academic
functions of a college, such as student registration, attendance management, course
management, and exam results. The system streamlines processes to improve efficiency and
accuracy.

Objectives:

1. Centralized management of student and faculty data.


2. Automate attendance tracking.
3. Simplify course enrolment and schedule management.
4. Enable faculty to upload and manage grades.
5. Generate reports for administrative purposes.

Python Code Example

class Student:

def __init__(self, roll_no, name, course):

self.roll_no = roll_no

self.name = name

self.course = course

self.attendance = 0
def mark_attendance(self):

self.attendance += 1

def display_details(self):

print(f"Roll No: {self.roll_no}, Name: {self.name}, Course: {self.course}, Attendance:


{self.attendance} days")

class College:

def __init__(self):

self.students = {}

def add_student(self):

roll_no = int(input("Enter Roll No: "))

if roll_no in self.students:

print("Student with this Roll No already exists!")

return

name = input("Enter Name: ")

course = input("Enter Course: ")

student = Student(roll_no, name, course)

self.students[roll_no] = student

print(f"Student {name} added successfully.")


def mark_attendance(self):

roll_no = int(input("Enter Roll No to mark attendance: "))

if roll_no in self.students:

self.students[roll_no].mark_attendance()

print("Attendance marked successfully!")

else:

print("Student not found!")

def display_all_students(self):

print("\nList of Students:")

for student in self.students.values():

student.display_details()

# Driver Code

college = College()

while True:

print("\nMenu:")

print("1. Add Student")

print("2. Mark Attendance")

print("3. Display All Students")

print("4. Exit")

choice = int(input("Enter your choice: "))

if choice == 1:
college.add_student()

elif choice == 2:

college.mark_attendance()

elif choice == 3:

college.display_all_students()

elif choice == 4:

print("Exiting...")

break

else:

print("Invalid choice! Please try again.")

Code Explanation

Defining the Student Class


class Student:
def __init__(self, roll_no, name, course):
self.roll_no = roll_no # Roll number of the student
self.name = name # Name of the student
self.course = course # Course the student is enrolled in
self.attendance = 0 # Initialize attendance to 0 (default value)

 Purpose: The Student class is used to represent individual students.


 The __init__ method initializes each student's attributes: roll number, name, course,
and attendance (default is 0).

def mark_attendance(self):
self.attendance += 1 # Increment attendance by 1

 Purpose: This method is called whenever attendance needs to be marked for the
student.
def display_details(self):
print(f"Roll No: {self.roll_no}, Name: {self.name}, Course: {self.course}, Attendance:
{self.attendance} days")

 Purpose: Displays the student's details in a formatted way.


 Output: Includes roll number, name, course, and attendance count.

Defining the College Class


class College:
def __init__(self):
self.students = {} # Dictionary to store students with roll numbers as keys

 Purpose: The College class acts as a manager for all students. It contains methods to
add students, mark attendance, and display all students.
 self.students is a dictionary where:
o Key: roll_no of the student.
o Value: Student object.

def add_student(self):
roll_no = int(input("Enter Roll No: ")) # Input roll number from the user
if roll_no in self.students:
print("Student with this Roll No already exists!") # Prevent duplicate roll numbers
return
name = input("Enter Name: ") # Input name
course = input("Enter Course: ") # Input course
student = Student(roll_no, name, course) # Create a Student object
self.students[roll_no] = student # Add student to the dictionary
print(f"Student {name} added successfully.")

 Purpose: Adds a new student to the system.


 Key Steps:
1. Take user input for roll number, name, and course.
2. Check if the roll number already exists (to avoid duplicates).
3. Create a Student object and store it in self.students using the roll number as
the key.
def mark_attendance(self):
roll_no = int(input("Enter Roll No to mark attendance: ")) # Input roll number
if roll_no in self.students:
self.students[roll_no].mark_attendance() # Call the student's `mark_attendance`
method
print("Attendance marked successfully!")
else:
print("Student not found!") # Handle case where roll number doesn't exist

 Purpose: Marks attendance for a student by roll number.


 Key Steps:
1. Check if the given roll number exists in self.students.
2. If found, call the mark_attendance() method of the corresponding student.
3. If not found, display an error message.

def display_all_students(self):
print("\nList of Students:")
for student in self.students.values(): # Iterate through all Student objects in the
dictionary
student.display_details() # Call the `display_details()` method of each student

 Purpose: Displays the details of all students.


 Key Steps:
1. Loop through the self.students dictionary.
2. Call each student's display_details() method to print their information.

Driver Code
college = College() # Create an instance of the College class

 Purpose: Initializes the College object where students will be stored and managed.
while True:
print("\nMenu:")
print("1. Add Student")
print("2. Mark Attendance")
print("3. Display All Students")
print("4. Exit")
choice = int(input("Enter your choice: "))

 Purpose: Displays a menu and allows the user to perform different actions (add
students, mark attendance, display students, or exit).

if choice == 1:
college.add_student() # Calls the method to add a student
elif choice == 2:
college.mark_attendance() # Calls the method to mark attendance
elif choice == 3:
college.display_all_students() # Calls the method to display all students
elif choice == 4:
print("Exiting...")
break # Exit the loop and program
else:
print("Invalid choice! Please try again.")

 Purpose:
o Based on the user's choice:
 1: Adds a student.
 2: Marks attendance for a student.
 3: Displays all students.
 4: Exits the program.
o Handles invalid input by displaying an error message.

How the Program Works

1. Start: The program starts with the College object initialized.


2. Menu: The user is presented with a menu to choose from:
o Add a new student.
o Mark attendance for an existing student.
o Display all student details.
o Exit the program.
3. Dynamic Input: The program takes dynamic input for roll numbers, names, courses,
and attendance marking.
4. Output: Displays student details and confirmation messages for all actions.

b. Banking Management System

class BankAccount:
def __init__(self, account_no, name, balance=0):
self.account_no = account_no
self.name = name
self.balance = balance

def deposit(self):
amount = float(input("Enter amount to deposit: "))
self.balance += amount
print(f"{amount} deposited successfully. New Balance: {self.balance}")

def withdraw(self):
amount = float(input("Enter amount to withdraw: "))
if amount > self.balance:
print("Insufficient balance!")
else:
self.balance -= amount
print(f"{amount} withdrawn successfully. Remaining Balance: {self.balance}")
def display_details(self):
print(f"Account No: {self.account_no}, Name: {self.name}, Balance: {self.balance}")

class BankingSystem:
def __init__(self):
self.accounts = {}

def create_account(self):
account_no = int(input("Enter Account Number: "))
if account_no in self.accounts:
print("Account with this number already exists!")
return
name = input("Enter Account Holder's Name: ")
initial_balance = float(input("Enter Initial Balance: "))
account = BankAccount(account_no, name, initial_balance)
self.accounts[account_no] = account
print(f"Account for {name} created successfully.")

def access_account(self):
account_no = int(input("Enter Account Number: "))
if account_no in self.accounts:
account = self.accounts[account_no]
while True:
print("\nAccount Menu:")
print("1. Deposit")
print("2. Withdraw")
print("3. Display Account Details")
print("4. Exit")
choice = int(input("Enter your choice: "))
if choice == 1:
account.deposit()
elif choice == 2:
account.withdraw()
elif choice == 3:
account.display_details()
elif choice == 4:
break
else:
print("Invalid choice! Please try again.")
else:
print("Account not found!")

# Driver Code
banking_system = BankingSystem()

while True:
print("\nMain Menu:")
print("1. Create Account")
print("2. Access Account")
print("3. Exit")
choice = int(input("Enter your choice: "))
if choice == 1:
banking_system.create_account()
elif choice == 2:
banking_system.access_account()
elif choice == 3:
print("Exiting...")
break
else:
print("Invalid choice! Please try again.")

 College Automation System:

 Add students dynamically.


 Mark attendance for specific students.
 Display all student details with attendance.

 Banking Management System:

 Create new accounts dynamically.


 Deposit and withdraw money.
 Display account details.

You might also like