COMPUTER SCIENCE PROJECT
COMPUTER SCIENCE PROJECT
Date:
1 ACKNOWLEDGEMENT
2 INTRODUCTION
4 PROPOSED SYSTEM
6 PHASES OF SDLC
7 SOURCE CODE
8 OUTPUT
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.
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.
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:
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:
Testing as a deployed system with end users working together with contract
personnel
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.
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()
def new_user(self):
#Establish Connection
with sqlite3.connect('Users.db') as db:
c = db.cursor()
#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.
class Portfolio:
# =============================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()
# =========================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']
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()
# ====================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