Software Design for Library Management System by sys20543

VIEWS: 134 PAGES: 18

More Info
									Library Management System                                            Version:      1.0
Detail Level Design Document                                         Date: 23-Apr-2002


                                       Library Management System
                                     Detail Level Design Document

                                                                            Version 1.0


                                                                           Thursday Team
                                                                    Dated: 23th April 2002


                                                                                   Authors

                                             Zhouxuan Teng zt0873@albany.edu (Leader)

                                             Zhaohui Yang            jamesyzh@yahoo.com

                                             Jie Tang              cnjasontang@yahoo.com




                               Revision History
         Date              Version                   Description                    Author
22th April 2002          1.0         First version                          Coding Team




Confidential                             CSI 518 : Thursday Team                             Page 1
Library Management System                                    Version:      1.0
Detail Level Design Document                                 Date: 23-Apr-2002



                               Table of Contents

1. Introduction ……………………………………………………………………….. 3
 1.1 Reference ………………………………………………………………………………………….. 3
2. Programming platform ……………………………………………………………………… 3
3. Database …………………………………………………………………………………………… 3
4. Database tables ………………………………………………………………………………… 3
5. Classes ………………………………………………………………………………………………4
 5.1 Class diagram …………………………………………………………………………………. 4
 5.2 Class design detail …………………………………………………………………………….5
6. Activity diagrams/State diagram …………………………………………………………..7
 6.1 Activity diagram of whole system …………………………………………………………7
 6.2 Activity diagram of each operation ……………………………………………………….8
      6.2.1 Student class ……………………………………………………………………………8
      6.2.2 Book class ……………………………………………………………………………. 10
      6.2.3 Transaction class …………………………………………………………………… 14
      6.2.4 MyList class ……………………………………………………………………………16




Confidential                       CSI 518 : Thursday Team                       Page 2
Library Management System                                               Version:      1.0
Detail Level Design Document                                            Date: 23-Apr-2002




1.       Introduction

        This document provides a detailed design of the system. Please refer to the requirement
        analysis document and high level design document for the overall view and high level
        design of the system. This document concentrates on the detailed design of the system,
        including database connection, programming platform, activities diagrams of whole
        system and each operation of each class.


1.1     References

        Requirements Document Ver 1.1
        High level design Document Ver 1.1




2.      Programming platform

        The system will be written in Java language. Thus our software is system-
        independent and can be run in both MS Windows and Unix system. During
        development process we will use the MS Windows system.

3.      Database

        The database being used is the DB2 database system, and the connection to the
        database is made by Java’s JDBC interface. The tables will be created using SQL
        statements; the runtime SQL will be sent to database and the query result will be
        sent back to application by JDBC connection.


4.      Database tables




Confidential                              CSI 518 : Thursday Team                                 Page 3
Library Management System                                Version:      1.0
Detail Level Design Document                             Date: 23-Apr-2002




5.      Classes


5.1     Class Diagram




Confidential                   CSI 518 : Thursday Team                       Page 4
Library Management System                                                 Version:      1.0
Detail Level Design Document                                              Date: 23-Apr-2002


5.2      Class Design Details


Student Class :

This class encapsulates all student related operations and details.




Book Class :

This class encapsulates all Book related operations and details.




Confidential                                    CSI 518 : Thursday Team                       Page 5
Library Management System                                                      Version:      1.0
Detail Level Design Document                                                   Date: 23-Apr-2002



Transaction Class :

This class encapsulates a single transaction, and maps a student to a book which has been checked out. All
associated details of a transaction are also stored in this class (late fees, checkin, checkout dates).




MyListClass :

This class encapsulates the usecases related to maintaing a temporary subset of user selected books
during a search operation.




Confidential                                  CSI 518 : Thursday Team                                        Page 6
Library Management System                                                                                                       Version:      1.0
Detail Level Design Document                                                                                                    Date: 23-Apr-2002

6.        Activity diagrams/State diagrams

6.1       State diagram of whole system




      Totally 12 windows.
      All states except "Display Exit Info"
      can go back to Main Menu.

                                                                                                                                                                 Help
                                                                                                                                 Get Help                       Content
                              Enter Book Info                        Add a book             Main Menu
                                    14
                                                                                                1                       Add a student
                        do/ Insert a student into DB
                                                                                                                                                        Enter Student Info
                                                                                                                                                                7
                                       Reset                                                                        Search students                 do/ Insert student into DB
                                                                Search books
                                                                                                             Exit

                                                                                  View Mylist
                                                                                                                                            Enter Search Info
                                 Enter Search Info
                                                                                                                                                   11
                                        2                        Update/Delete
                                                                                                                                                     Search
                                                                                                                    Display
                                                                                                                                        Back
                                                                                                                    Exit Info
                                                                 Display MyList
                                                                        5                                                                        Display Results
                     New Search                                                                                                                        12
                                                         exit/ Send from List message              Check In/Out
                                                                                                                                        entry/ Search students in DB

                                Search
                                                                    Add to list                                                               View Detail / UpdateDelete


                                                                                                                                                                Update,Delete
                                               Add to list    Display Book Detail
                                                                       4                Check In/Out
                                              Back                                                                                                 Update Detail
                                                             do/ Update, Delete                                                                         60
                                                                                                                                                do/ Update,Delete
                                              View Detail
                  Display Results
                         3
                                                                                        Check In/Out
            entry/ Search books in DB
                                                                 Check In/Out

                                                                                                       Enter books. student Info
                                                                                                                 13
                                                                                                  do/ Check In, Check Out




Confidential                                                           CSI 518 : Thursday Team                                                                             Page 7
Library Management System                                                       Version:      1.0
Detail Level Design Document                                                    Date: 23-Apr-2002


6.2      Activity diagram of each operation

6.2.1 Student class

     AddStudent : add a new student


                       validateStudent          [ exists ]      return error
                                                                 message


                          [ not exists ]




                  add the student record to                    return success
                        Student table                              message


     DeleteStudent : delete an existing student



                       validateStudent        [ not exists ]    return error
                                                                 message



                             [ exists ]



                  delete the student record                    return success
                       to Student table                            message



     UpdateStudent : update information of existing student



                    Update the student record in
                         the Student table




Confidential                                      CSI 518 : Thursday Team                           Page 8
Library Management System                                                   Version:      1.0
Detail Level Design Document                                                Date: 23-Apr-2002



   SearchStudent : search students



                       Query the student record
                           in Student table




                               return Resultset




   ValidateStudent : validate student


                    Query the student in Student
                    table according to studentID




                                Return        [ not empty ]   Return true
                               Resultset


                                 [ empty ]


                            Return false




Confidential                                   CSI 518 : Thursday Team                          Page 9
Library Management System                                      Version:      1.0
Detail Level Design Document                                   Date: 23-Apr-2002


6.2.2 Book class


addBook: Add a new book in database




      Check Book record
         in database




                               yes    Return "Book already
                   exist
                                         exist" message


                 no


       Insert book record
          in database




        return success
           message




Confidential                         CSI 518 : Thursday Team                       Page 10
Library Management System                                            Version:      1.0
Detail Level Design Document                                         Date: 23-Apr-2002

exist: Check if the book record already exist in database.




       Search Book record
           in database




                                     no                   return not exist
                     found record?
                                                              message


                  yes


           return exist
             message




Confidential                              CSI 518 : Thursday Team                        Page 11
Library Management System                                   Version:      1.0
Detail Level Design Document                                Date: 23-Apr-2002

searchBook: Search books in database




     search book record
         in database




           return
          resultset




updateBook: modify book info




    update record in
       database




     return success
        message




Confidential                      CSI 518 : Thursday Team                       Page 12
Library Management System                                        Version:      1.0
Detail Level Design Document                                     Date: 23-Apr-2002

deleteBook: Delete a book in database




          check
         existence



                               no
                 exist?

               yes



         delete the
           record                   return fail
                                    message




      return success
         message




Confidential                           CSI 518 : Thursday Team                       Page 13
Library Management System                                            Version:      1.0
Detail Level Design Document                                         Date: 23-Apr-2002


6.2.3 Transaction class

checkIn() : check in one book




               SQL Statement
                (Update.....)




                        Exception?   Yes
                                                    Print "error
                                                     message"
                      No

                return true                       return false




Confidential                               CSI 518 : Thursday Team                       Page 14
Library Management System                                            Version:      1.0
Detail Level Design Document                                         Date: 23-Apr-2002



checkOut() : check out one book




               SQL Statement
                (Update.....)




                        Exception?   Yes
                                                    Print "error
                                                     message"
                      No

                return true                       return false




Confidential                               CSI 518 : Thursday Team                       Page 15
Library Management System                                            Version:      1.0
Detail Level Design Document                                         Date: 23-Apr-2002


6.2.4 MyList class


addTolist() : add one book to mylist




               SQL Statement
                 (Insert.....)




                        Exception?   Yes
                                                    Print "error
                                                     message"
                      No

                return true                       return false




Confidential                               CSI 518 : Thursday Team                       Page 16
Library Management System                                            Version:      1.0
Detail Level Design Document                                         Date: 23-Apr-2002

deleteFromList() : delete one book from mylist




               SQL Statement
                 (Delete.....)




                        Exception?   Yes
                                                    Print "error
                                                     message"
                      No

                return true                       return false




Confidential                               CSI 518 : Thursday Team                       Page 17
Library Management System                                            Version:      1.0
Detail Level Design Document                                         Date: 23-Apr-2002

Mylist.viewList() : retrieve books in mylist




               SQL Statement
                 (Select....)




                        Exception?   Yes
                                                    Print "error
                                                     message"
                      No

                return true                       return false




Confidential                               CSI 518 : Thursday Team                       Page 18

								
To top