0% found this document useful (0 votes)
3 views

COMPUTER SCIENCE PROJECT

The document outlines a project report for a Portfolio Management System developed for Class XII Computer Science students at Sri Chaitanya Senior Secondary School. It includes sections on project objectives, system development life cycle (SDLC), and features of the system, along with acknowledgments and a certificate of completion. The project utilizes Python, Tkinter, and SQLite for managing user registration, login, and asset management functionalities.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

COMPUTER SCIENCE PROJECT

The document outlines a project report for a Portfolio Management System developed for Class XII Computer Science students at Sri Chaitanya Senior Secondary School. It includes sections on project objectives, system development life cycle (SDLC), and features of the system, along with acknowledgments and a certificate of completion. The project utilizes Python, Tkinter, and SQLite for managing user registration, login, and asset management functionalities.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

SRI CHAITANYA SENIOR SECONDARY SCHOOL

ACADEMIC YEAR: 2024-2025


PROJECT REPORT ON:
ROLL NO :
NAME :
CLASS : XII
SUBJECT : COMPUTER SCIENCE
SUBJECT CODE : 083

PROJECT GUIDE: Mr. D MUKESH KANNA


PGT(CS)
SRI CHAITANYA SENIOR SECONDARY SCHOOL,
CHENNAI
Certificate

This is to certify that


Roll No:.................................... has successfully completed

The Project work entitled in the

subject Computer Science (083) laid down in the regulations

of CBSE for the purpose of Practical Examination in Class XII

to be held in Sri Chaitanya Senior Secondary School.

Date:

Internal Examiner Sign: External Examiner Sign:


TABLE OF CONTENTS

S.NO DESCRIPTION PAGE NO

1 ACKNOWLEDGEMENT

2 INTRODUCTION

3 OBJECTIVES OF THE PROJECT

4 PROPOSED SYSTEM

5 SYSTEM DEVELOPMENT LIFE CYCLE

6 PHASES OF SDLC

7 SOURCE CODE

8 OUTPUT

9 HARDWARE AND SOFTWARE REQUIREMENTS

10 BIBLIOGRAPHY
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 a 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,


D. Chiranjeevi Garu who has been continuously motivating and extending
their helping hand to us.

I am overwhelmed to express my thanks to The Administrative Officer for


providing me the infrastructure and moral support while carrying out this project in
the school.

My sincere thanks to Mr. D MUKESH KANNA, 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.

Portfolio Management System


Portfolio Management System in Python with the help of Tkinter and
SQLite. Portfolio Management is a system in which any individual can select
investment plans based on some qualities of a particular asset to meet the
long-term financial objectives of an individual.

Features of the Portfolio Management


system
 The user can Register and log in to the system
 The user will be able to choose from a list of available stocks
 The user will be able to add, delete, update, and view all the assets.

SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)

The systems development life cycle is a project management technique that


divides complex projects into smaller, more easily managed segments or phases.
Segmenting projects allows managers to verify the successful completion of project
phases before allocating resources to subsequent phases.
Software development projects typically include initiation, planning, design,
development, testing, implementation and maintenance phases. However, the
phases may be divided differently depending on the organization involved.
For example, initial project activities might be designated as request,
requirements-definition, and planning phases, or initiation, concept-development and
planning phases. End users of the system under development should be involved in
reviewing the output of each phase to ensure the system is being built to deliver the
needed functionality.

PHASES OF SYSTEM DEVELOPMENT LIFE CYCLE


INITIATION PHASE

The Initiation Phase begins when a business sponsor identifies a need or an


opportunity.
The purpose of the Initiation Phase is to:
 Identify and validate an opportunity to improve business accomplishments of
the organization or a deficiency related to a business need.
 Identify significant assumptions and constraints on solutions to that need.
 Recommend the exploration of alternative concepts and methods to satisfy
the need including questioning the need for technology, i.e., will a change in
the business process offer a solution?
 Assure executive business and executive technical sponsorship. The Sponsor
designates a Project Manager and the business need is documented in a
Concept Proposal. The Concept Proposal includes information about the
business process and the relationship to the Agency/Organization.
 Infrastructure and the Strategic Plan. A successful Concept Proposal results
in a Project Management Charter which outlines the authority of the project
manager to begin
the project.

Careful oversight is required to ensure projects support strategic business


objectives and resources are effectively implemented into an organization's
enterprise architecture. The initiation phase begins when an opportunity to add,
improve, or correct a system is identified and formally requested through the
presentation of a business case. The business case should, at a minimum, describe
a proposal’s purpose, identify expected benefits, and explain how the proposed
system supports one of the organization’s business strategies. The business case
should also identify alternative solutions and detail as many informational, functional,
and network requirements as possible.

SYSTEM CONCEPT DEVELOPMENT PHASE


The System Concept Development Phase begins after a business need or
opportunity is validated by the Agency/Organization Program Leadership and the
Agency/Organization CIO.

The purpose of the System Concept Development Phase is to:

 Determine the feasibility and appropriateness of the alternatives.


 Identify system interfaces.
 Identify basic functional and data requirements to satisfy the business need.
 Establish system boundaries; identify goals, objectives, critical success
factors, and performance measures.
 Evaluate costs and benefits of alternative approaches to satisfy the basic
functional requirements
 Assess project risks
 Identify and initiate risk mitigation actions, and develop high-level technical
architecture, process models, data models, and a concept of operations. This
phase explores potential technical solutions within the context of the business
need.
 It may include several trade-off decisions such as the decision to use COTS
software products as opposed to developing custom software or reusing
software components, or the decision to use an incremental delivery versus a
complete, onetime deployment.
 Construction of executable prototypes is encouraged to evaluate technology
to support the business process. The System Boundary Document serves as
an important reference document to support the Information Technology
Project Request (ITPR) process.
 The ITPR must be approved by the State CIO before the project can move
forward.

PICTORIAL REPRESENTATION OF SDLC:


PLANNING PHASE

The planning phase is the most critical step in completing development,


acquisition, and maintenance projects. Careful planning, particularly in the early
stages of a project, is necessary to coordinate activities and manage project risks
effectively. The depth and formality of project plans should be commensurate with
the characteristics and risks of a given project. Project plans refine the information
gathered during the initiation phase by further identifying the specific activities and
resources required to complete a project.
A critical part of a project manager’s job is to coordinate discussions between
user, audit, security, design, development, and network personnel to identify and
document as many functional, security, and network requirements as possible.
During this phase, a plan is developed that documents the approach to be used and
includes a discussion of methods, tools, tasks, resources, project schedules, and
user input. Personnel assignments, costs, project schedule, and target dates are
established.
A Project Management Plan is created with components related to acquisition
planning, configuration management planning, quality assurance planning, concept
of operations, system security, verification and validation, and systems engineering
management planning.

REQUIREMENTS ANALYSIS PHASE


This phase formally defines the detailed functional user requirements using
high-level requirements identified in the Initiation, System Concept, and Planning
phases. It also delineates the requirements in terms of data, system performance,
security, and maintainability requirements for the system. The requirements are
defined in this phase to a level of detail sufficient for systems design to proceed.
They need to be measurable, testable, and relate to the business need or
opportunity identified in the Initiation Phase. The requirements that will be used to
determine acceptance of the system are captured in the Test and Evaluation
Masterplan.

The purposes of this phase are to:

 Further define and refine the functional and data requirements and document
them in the Requirements Document,
 Complete business process reengineering of the functions to be supported
(i.e., verify what information drives the business process, what information is
generated, who generates it, where does the information go, and who
processes it),
 Develop detailed data and process models (system inputs, outputs, and the
process.
 Develop the test and evaluation requirements that will be used to determine
acceptable system performance.

DESIGN PHASE
The design phase involves converting the informational, functional, and
network requirements identified during the initiation and planning phases into unified
design specifications that developers use to script programs during the development
phase. Program designs are constructed in various ways. Using a top-down
approach, designers first identify and link major program components and interfaces,
then expand design layouts as they identify and link smaller subsystems and
connections. Using a bottom-up approach, designers first identify and link minor
program components and interfaces, then expand design layouts as they identify
and link larger systems and connections. Contemporary design techniques often use
prototyping tools that build mock-up designs of items such as application screens,
database layouts, and system architectures. End users, designers, developers,
database managers, and network administrators should review and refine the
prototyped designs in an iterative process until they agree on an acceptable design.
Audit, security, and quality assurance personnel should be involved in the review
and approval process. During this phase, the system is designed to satisfy the
functional requirements identified in the previous phase. Since problems in the
design phase could be very expensive to solve in the later stage of the software
development, a variety of elements are considered in the design to mitigate risk.
These include:

 Identifying potential risks and defining mitigating design features.


 Performing a security risk assessment.
 Developing a conversion plan to migrate current data to the new system.
 Determining the operating environment.
 Defining major subsystems and their inputs and outputs.
 Allocating processes to resources.
 Preparing detailed logic specifications for each software module. The result is
a draft System Design Document which captures the preliminary design for
the system.
 Everything requiring user input or approval is documented and reviewed by
the user. Once these documents have been approved by the Agency CIO and
Business Sponsor, the final System Design Document is created to serve as
the Critical/Detailed Design for the system.
 This document receives a rigorous review by Agency technical and functional
representatives to ensure that it satisfies the business requirements.
Concurrent with the development of the system design, the Agency Project
Manager begins development of the Implementation Plan, Operations and
Maintenance Manual, and the Training Plan.

DEVELOPMENT PHASE
The development phase involves converting design specifications into
executable programs. Effective development standards include requirements that
programmers and other project participants discuss design specifications before
programming begins. The procedures help ensure programmers clearly
understand program designs and functional requirements. Programmers use
various techniques to develop computer programs. The large transaction oriented
programs associated with financial institutions have traditionally been developed
using procedural programming techniques. Procedural programming involves the
line-by-line scripting of logical instructions that are combined to form a program.
Effective completion of the previous stages is a key factor in the success of the
Development phase. The Development phase consists of:

 Translating the detailed requirements and design into system components.


 Testing individual elements (units) for usability.
 Preparing for integration and testing of the IT system.

INTEGRATION AND TEST PHASE

 Subsystem integration, system, security, and user acceptance testing is


conducted during the integration and test phase. The user, with those
responsible for quality assurance, validates that the functional requirements,
as defined in the functional requirements document, are satisfied by the
developed or modified system. OIT Security staff assess the system security
and issue a security certification and accreditation prior to
installation/implementation.

Multiple levels of testing are performed, including:

 Testing at the development facility by the contractor and possibly supported


by end users

 Testing as a deployed system with end users working together with contract
personnel

 Operational testing by the end user alone performing all functions.


Requirements are traced throughout testing a final Independent Verification &
Validation evaluation is performed and all documentation is reviewed and
accepted prior to acceptance of the system.
IMPLEMENTATION PHASE

This phase is initiated after the system has been tested and accepted by the
user. In this phase, the system is installed to support the intended business
functions. System performance is compared to performance objectives established
during the planning phase. Implementation includes user notification, user training,
installation of hardware, installation of software onto production computers, and
integration of the system into daily work processes. This phase continues until the
system is operating in production in accordance with the defined user requirements.

OPERATIONS AND MAINTENANCE PHASE

The system operation is ongoing. The system is monitored for continued


performance in accordance with user requirements and needed system
modifications are incorporated. Operations continue as long as the system can be
effectively adapted to respond to the organization’s needs. When modifications or
changes are identified, the system may re-enter the planning phase.

The purpose of this phase is to:

 Operate, maintain, and enhance the system.


 Certify that the system can process sensitive information.
 Conduct periodic assessments of the system to ensure the functional
requirements continue to be satisfied.
 Determine when the system needs to be modernized, replaced, or retired.
login.py file
In this file, we write the code for creating the GUI for the login screen and the
backend logic for registering and logging in for the user.

import sqlite3
from tkinter import*
import os # for os.system
from tkinter import ttk
from tkinter import messagebox as ms # for messagebox

def main():
root = Tk()
app = user(root)
# make database and users (if not exists already) table at programme start up
with sqlite3.connect('Users.db') as db:
c = db.cursor()

c.execute('CREATE TABLE IF NOT EXISTS user (username TEXT NOT NULL ,password TEXT NOT
NULL)')
db.commit()
db.close()

#main Class
class user:
def __init__(self,master):
# Window
self.master = master
# Some Usefull variables
self.username = StringVar()
self.password = StringVar()
self.n_username = StringVar()
self.n_password = StringVar()
#Create Widgets
self.widgets()

#Login Function
def login(self):
#Establish Connection
with sqlite3.connect('Users.db') as db:
c = db.cursor()

#Find user If there is any take proper action


find_user = ('SELECT * FROM user WHERE username = ? and password = ?')
c.execute(find_user,[(self.username.get()),(self.password.get())])
result = c.fetchall()
if result:
# close this window
self.master.destroy()
# open new window
os.system('python ' + 'Portfolio_frontend.py')
else:
ms.showerror('Oops!','Username Not Found.')

def new_user(self):
#Establish Connection
with sqlite3.connect('Users.db') as db:
c = db.cursor()

#Find Existing username if any take proper action


find_user = ('SELECT * FROM user WHERE username = ?')
c.execute(find_user,[(self.username.get())])
if c.fetchall():
ms.showerror('Error!','Username Already Taken!')
else:
ms.showinfo('Success!','Account Created!')
self.log()
#Create New Account
insert = 'INSERT INTO user(username,password) VALUES(?,?)'
c.execute(insert,[(self.n_username.get()),(self.n_password.get())])
db.commit()

#Frame Packing Methods


def log(self):
self.username.set('')
self.password.set('')
self.crf.pack_forget()
self.head['text'] = 'Login'
self.logf.pack()
def cr(self):
self.n_username.set('')
self.n_password.set('')
self.logf.pack_forget()
self.head['text'] = 'Register'
self.crf.pack()

#Draw Widgets
def widgets(self):
self.head = Label(self.master,text = 'Login or Register',font = ('MV boli',30),pady = 10)
self.head.pack()
self.logf = Frame(self.master, padx =50,pady = 50)
Label(self.logf,text = 'Username: ',font = ('MV Boli',20),pady=10,padx=5).grid(sticky = W)
Entry(self.logf,textvariable = self.username,bd = 5,font = ('',15)).grid(row=0,column=1)
Label(self.logf,text = 'Password: ',font = ('MV Boli',20),pady=30,padx=5).grid(sticky = W)
Entry(self.logf,textvariable = self.password,bd = 5,font = ('',15),show = '*').grid(row=1,column=1)
Button(self.logf,text = ' Login ',bd = 1 ,font = ('',15),padx=5,pady=5,command=self.login,
bg="black", fg="white").grid()
Button(self.logf,text = ' Register ',bd = 1 ,font = ('',15),padx=5,pady=5,command=self.cr,
bg="black", fg="white").grid(row=2,column=1)
self.logf.pack()
self.crf = Frame(self.master, padx =10,pady = 10)
Label(self.crf,text = 'Username: ',font = ('',20),pady=30,padx=5).grid(sticky = W)
Entry(self.crf,textvariable = self.n_username,bd = 5,font = ('',15)).grid(row=0,column=1)
Label(self.crf,text = 'Password: ',font = ('',20),pady=30,padx=5).grid(sticky = W)
Entry(self.crf,textvariable = self.n_password,bd = 5,font = ('',15),show =
'*').grid(row=1,column=1)
Button(self.crf,text = 'Register',bd = 1 ,font = ('',15),padx=5,pady=5,command=self.new_user,
bg="black", fg="white").grid()
Button(self.crf,text = 'Go to Login',bd = 1 ,font = ('',15),padx=5,pady=5,command=self.log,
bg="black", fg="white").grid(row=2,column=1)

if __name__=='__main__':
root = Tk()
root.geometry("600x480+320+100")
root.title('Login Form')
application = user(root)
root.mainloop()
Portfolio_frontend.py file
In this file, we write the code for Creating the GUI for the front end of the
Portfolio Management page with the help of Tkinter Library.

from tkinter import *


from tkinter import ttk
import random
from datetime import datetime
import tkinter.messagebox
import Portfolio_backend

class Portfolio:

def __init__(self, root):


self.root = root
self.root.title('Manage your Portfolio')
self.root.geometry('1250x600+10+10')
self.root.config(bg='#F8C4B4')

# =============================Variables=============================
self.Mtype = StringVar()
self.refno = StringVar()
self.fname = StringVar()
self.surname = StringVar()
self.address = StringVar()
self.post = StringVar()
self.mobno = StringVar()
self.ID = StringVar()
self.title = StringVar()
self.Company = StringVar()
self.borrow = StringVar()
self.due = StringVar()
self.loan = StringVar()
self.yop = StringVar()
self.edsn = StringVar()

# =========================Functions===================================
def Rec(event):
try:
global selected_tuple
index = self.Listbox_2.curselection()[0]
selected_tuple = self.Listbox_2.get(index)

self.Entry_0.delete(0, END)
self.Entry_0.insert(END, selected_tuple[1])
self.Entry_1.delete(0, END)
self.Entry_1.insert(END, selected_tuple[2])
self.Entry_2.delete(0, END)
self.Entry_2.insert(END, selected_tuple[3])
self.Entry_3.delete(0, END)
self.Entry_3.insert(END, selected_tuple[4])
self.Entry_4.delete(0, END)
self.Entry_4.insert(END, selected_tuple[5])
self.Entry_5.delete(0, END)
self.Entry_5.insert(END, selected_tuple[6])
self.Entry_6.delete(0, END)
self.Entry_6.insert(END, selected_tuple[7])
self.Entry_7.delete(0, END)
self.Entry_7.insert(END, selected_tuple[8])
self.Entry_8.delete(0, END)
self.Entry_8.insert(END, selected_tuple[9])
self.Entry_9.delete(0, END)
self.Entry_9.insert(END, selected_tuple[10])
self.Entry_10.delete(0, END)
self.Entry_10.insert(END, selected_tuple[11])
self.Entry_11.delete(0, END)
self.Entry_11.insert(END, selected_tuple[12])
self.Entry_12.delete(0, END)
self.Entry_12.insert(END, selected_tuple[13])

except IndexError:
pass

def Insert():
if (len(self.refno.get()) != 0):
Portfolio_backend.insert(self.Mtype.get(), self.refno.get(), self.fname.get(),
self.surname.get(), self.address.get(), self.post.get(
), self.mobno.get(), self.ID.get(), self.title.get(), self.Company.get(), self.borrow.get(),
self.due.get(), self.loan.get())
self.Listbox_2.delete(0, END)
self.Listbox_2.insert(END, (self.Mtype.get(), self.refno.get(), self.fname.get(),
self.surname.get(), self.address.get(), self.post.get(
), self.mobno.get(), self.ID.get(), self.title.get(), self.Company.get(), self.borrow.get(),
self.due.get(), self.loan.get()))

def Display():
self.Listbox_2.delete(0, END)
for row in Portfolio_backend.view():
self.Listbox_2.insert(END, row, str(' '))

def Exit():
root.destroy()
return

def Reset():
self.Mtype.set('')
self.refno.set('')
self.fname.set('')
self.surname.set('')
self.address.set('')
self.post.set('')
self.mobno.set('')
self.ID.set('')
self.title.set('')
self.Company.set('')
self.borrow.set('')
self.due.set('')
self.loan.set('')
self.Display.delete('1.0', END)
self.Listbox_2.delete(0, END)

def Delete():
Portfolio_backend.delete(selected_tuple[0])
Reset()
Display()

def Update():
Portfolio_backend.delete(selected_tuple[0])
Portfolio_backend.insert(self.Mtype.get(), self.refno.get(), self.fname.get(),
self.surname.get(), self.address.get(), self.post.get(
), self.mobno.get(), self.ID.get(), self.title.get(), self.Company.get(), self.borrow.get(),
self.due.get(), self.loan.get())
self.Listbox_2.delete(0, END)
self.Listbox_2.insert(END, (self.Mtype.get(), self.refno.get(), self.fname.get(),
self.surname.get(), self.address.get(), self.post.get(
), self.mobno.get(), self.ID.get(), self.title.get(), self.Company.get(), self.borrow.get(),
self.due.get(), self.loan.get()))

def Details():
self.Display.delete('1.0', END)
self.Display.insert(END, 'ID: ' + self.ID.get() + '\n')
self.Display.insert(END, 'Title: ' + self.title.get() + '\n')
self.Display.insert(END, 'Company: ' + self.Company.get() + '\n')
self.Display.insert(END, 'Min qty: ' + self.edsn.get() + '\n')
self.Display.insert(
END, 'Year: \t' + self.yop.get() + '\n')
self.Display.insert(END, 'Issued Date: ' +
self.borrow.get() + '\n')
self.Display.insert(END, 'Due Date:' + self.due.get() + '\n')
self.Display.insert(END, 'Annualized Return(%): ' +
self.loan.get() + '%' + '\n')

# ============================Frames===========================================
Main_Frame = Frame(self.root, bg='#F8C4B4')
Main_Frame.grid()

Title_Frame_1 = Frame(Main_Frame, width=1350,


bg='#F8C4B4', relief=RIDGE, bd=15, padx=20)
Title_Frame_1.pack(side=TOP)
self.lblTitle = Label(Title_Frame_1, font=('arial', 15, 'bold'), text='\tPortfolio Management\t',
bg='#F8C4B4', padx=13)
self.lblTitle.grid()

Button_Frame = Frame(Main_Frame, width=1350, height=50,


relief=RIDGE, bd=5, bg='#F8C4B4')
Button_Frame.pack(side=BOTTOM)

Detail_Frame = Frame(Main_Frame, width=1350,


height=100, relief=RIDGE, bd=5, bg='#F8C4B4')
Detail_Frame.pack(side=BOTTOM)

Data_Frame = Frame(Main_Frame, width=1350, height=400,


relief=RIDGE, bd=5, bg='#F8C4B4')
Data_Frame.pack(side=BOTTOM)

Frame_1 = LabelFrame(Data_Frame, width=800, height=400, relief=RIDGE, bd=5, bg='#F8C4B4',


text="Membership Info:", padx=20, font=('arial', 10, 'bold'))
Frame_1.pack(side=LEFT, padx=3)

Frame_2 = LabelFrame(Data_Frame, width=550, height=400, relief=RIDGE, bd=5, bg='#F8C4B4',


text="Stocks Availabe:", padx=0, font=('arial', 10, 'bold'))
Frame_2.pack(side=RIGHT)

# =========================Labels=============================
self.Label_1 = Label(Frame_1, text='Member type', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_1.grid(row=0, column=0, sticky=W)
self.Label_2 = Label(Frame_1, text='Reference No.', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_2.grid(row=1, column=0, sticky=W)
self.Label_3 = Label(Frame_1, text='First Name', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_3.grid(row=2, column=0, sticky=W)
self.Label_4 = Label(Frame_1, text='Surname', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_4.grid(row=3, column=0, sticky=W)
self.Label_5 = Label(Frame_1, text='Address', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_5.grid(row=4, column=0, sticky=W)
self.Label_6 = Label(Frame_1, text='Post Code', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_6.grid(row=5, column=0, sticky=W)
self.Label_7 = Label(Frame_1, text='Mobile No.', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_7.grid(row=6, column=0, sticky=W)
self.Label_8 = Label(Frame_1, text='ID', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_8.grid(row=0, column=2, sticky=W)
self.Label_9 = Label(Frame_1, text='Title', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_9.grid(row=1, column=2, sticky=W)
self.Label_10 = Label(Frame_1, text='Company', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_10.grid(row=2, column=2, sticky=W)
self.Label_11 = Label(Frame_1, text='Issued Date', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_11.grid(row=3, column=2, sticky=W)
self.Label_13 = Label(Frame_1, text='Due Date', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_13.grid(row=4, column=2, sticky=W)
self.Label_13 = Label(Frame_1, text='Annualized Return(%)', font=('arial', 13, 'bold'), pady=2,
bg='#F8C4B4')
self.Label_13.grid(row=5, column=2, sticky=W)

# ===========================Entries=====================================
self.Entry_0 = ttk.Combobox(Frame_1, values=(' ', 'Individual', 'Group', 'Hybrid'),
font=('arial', 13, 'bold'), width=23, textvariable=self.Mtype)
self.Entry_0.grid(row=0, column=1)
self.Entry_1 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.refno)
self.Entry_1.grid(row=1, column=1, padx=15)
self.Entry_2 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.fname)
self.Entry_2.grid(row=2, column=1, padx=15)
self.Entry_3 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.surname)
self.Entry_3.grid(row=3, column=1, padx=15)
self.Entry_4 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.address)
self.Entry_4.grid(row=4, column=1, padx=15)
self.Entry_5 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.post)
self.Entry_5.grid(row=5, column=1, padx=15)
self.Entry_6 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.mobno)
self.Entry_6.grid(row=6, column=1, padx=15)
self.Entry_7 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.ID)
self.Entry_7.grid(row=0, column=4, padx=15)
self.Entry_8 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.title)
self.Entry_8.grid(row=1, column=4, padx=15)
self.Entry_9 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.Company)
self.Entry_9.grid(row=2, column=4, padx=15)
self.Entry_10 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.borrow)
self.Entry_10.grid(row=3, column=4, padx=15)
self.Entry_11 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.due)
self.Entry_11.grid(row=4, column=4, padx=15)
self.Entry_12 = Entry(Frame_1, font=(
'arial', 13, 'bold'), width=25, textvariable=self.loan)
self.Entry_12.grid(row=5, column=4, padx=15)

# =====================Widgets=====================================
self.Display = Text(Frame_2, font=(
'arial', 13, 'bold'), width=28, height=11.5)
self.Display.grid(row=0, column=2)

List_of_Books = [' DOLLEX', ' KFINTECH', ' UMA', ' ELIN', ' ALAN']

# =======================Function for Books Details========================

def SelectedBook(event):
value = str(self.Listbox_1.get(self.Listbox_1.curselection()))
v = value

if (v == ' DOLLEX'):
self.ID.set('ISBN 525341')
self.title.set('DOLLEX')
self.Company.set('Dollex Argotech Ltd')
self.yop.set('2022')
self.edsn.set('4000')

import datetime

d1 = datetime.date.today()
d2 = datetime.timedelta(days=14)
d3 = (d1 + d2)
self.borrow.set(d1)
self.loan.set('14')
self.due.set(d3)
Details()
elif (v == ' KFINTECH'):
self.ID.set('ISBN 345687')
self.title.set('KFINTECH')
self.Company.set('KFinTech Solutions Ltd')
self.yop.set('2019')
self.edsn.set('40')

import datetime

d1 = datetime.date.today()
d2 = datetime.timedelta(days=10)
d3 = (d1 + d2)
self.borrow.set(d1)
self.loan.set('10')
self.due.set(d3)
Details()
elif (v == ' UMA'):
self.ID.set('ISBN 643842')
self.title.set('UMA')
self.Company.set('UMA Solutions Ltd')
self.yop.set('2017')
self.edsn.set('2000')

import datetime

d1 = datetime.date.today()
d2 = datetime.timedelta(days=13)
d3 = (d1 + d2)
self.borrow.set(d1)
self.loan.set('13')
self.due.set(d3)
Details()
elif (v == ' ELIN'):
self.ID.set('ISBN 564524')
self.title.set('ELIN')
self.Company.set('ELIN Electronics Ltd')
self.yop.set('2018')
self.edsn.set('60')

import datetime

d1 = datetime.date.today()
d2 = datetime.timedelta(days=13)
d3 = (d1 + d2)
self.borrow.set(d1)
self.loan.set('13')
self.due.set(d3)
Details()
elif (v == ' ALAN'):
self.ID.set('ISBN 735893')
self.title.set('ALAN')
self.Company.set('Alan Solutions Ltd')
self.yop.set('2021')
self.edsn.set('1200')

import datetime

d1 = datetime.date.today()
d2 = datetime.timedelta(days=15)
d3 = (d1 + d2)
self.borrow.set(d1)
self.loan.set('15')
self.due.set(d3)
Details()

# ====================List Box and Scroll Bar=================================


self.Listbox_1 = Listbox(Frame_2, font=(
'arial', 13, 'bold'), width=20, height=11)
self.Listbox_1.bind('<<ListboxSelect>>', SelectedBook)
self.Listbox_1.grid(row=0, column=0)

self.Listbox_2 = Listbox(Detail_Frame, font=(


'arial', 13, 'bold'), width=144, height=8)
self.Listbox_2.bind('<<ListboxSelect>>', Rec)
self.Listbox_2.grid(row=1, column=0)

for items in List_of_Books:


self.Listbox_1.insert(END, items)

# ====================Buttons========================================
Button_1 = Button(Button_Frame, text='Add', font=(
'arial', 10, 'bold'), bg='#FF8787', width=10, command=Insert)
Button_1.grid(row=0, column=0, padx=8, pady=5)
Button_2 = Button(Button_Frame, text='DISPLAY', font=(
'arial', 10, 'bold'), bg='#FF8787', width=10, command=Display)
Button_2.grid(row=0, column=1, padx=8)
Button_3 = Button(Button_Frame, text='RESET', font=(
'arial', 10, 'bold'), bg='#FF8787', width=10, command=Reset)
Button_3.grid(row=0, column=2, padx=8)
Button_4 = Button(Button_Frame, text='UPDATE', font=(
'arial', 10, 'bold'), bg='#FF8787', width=10, command=Update)
Button_4.grid(row=0, column=3, padx=8)
Button_6 = Button(Button_Frame, text='DELETE', font=(
'arial', 10, 'bold'), bg='#FF8787', width=10, command=Delete)
Button_6.grid(row=0, column=5, padx=8)
Button_7 = Button(Button_Frame, text='EXIT', font=(
'arial', 10, 'bold'), bg='#FF8787', width=10, command=Exit)
Button_7.grid(row=0, column=6, padx=8)
if __name__ == '__main__':
root = Tk()
applicaton = Portfolio(root)
root.mainloop()
Output for Portfolio Management System in
Python
Image Output

You might also like