MSE PROJECT

Committee: Dr. Bill Hankley, Dr Dan Andresen, Dr.Mitchell Neilsen

TimeLog

Phase I: Project requirement

-Project description

-Overview

-Benefit

-Project plan

-Cost estimation

-Presentation I (.ppt)

-Report (.doc)

Phase II: Project Design
- Use case diagram
- Class diagram
- Sequence diagram
- Formal specification
- Software quality assurance plan
- Test plan
- Formal technical inspection
- Presentation II (.ppt)
- Report II (.doc)
Phase III: Project implementation, testing and documentation

- Coding
- Testing
- Documentations
- Evaluation
- Presentation III (.ppt)
- Report (.doc)

Download

Source Code

ConnectionBean (subtotal: 300)

connectionBean.zip

DatabaseTableBean (Subtotal 1072)

DatabaseBean.zip

DrawChartBean (Subtotal 562)

DrawChartBean.zip

CopyFileBean (subtotal 327)

 CopyfileBean.zip

Report

Report for Phase I

Report for Phase II

Report for Phase III

Report for Phase I, II, III

User manual

Manual for Data Java beans

Phase I: Project Requirement

1. Project Description:

This project is to develop a Database application by using JavaBean Technology under Jbuilder.

2. Overview

One of the major application of JavaBeans is for rapid application development or RAD, a powerful feature used in software development tools for visual programming. RAD allows you to select a component
And drop it to a desired location. The click-and-drop capability enables you to write programes with little or no coding, thereby greatly improving software reuseability and productivity.

Since a JavaBeans component is a java class. It can be used wherever a class is applicable. This project is specially designed for use in a builder tool that enables the user to visually manipulate the beans during the design time. The builder tool may be a java IDE like JBuilder or IMB Visual Age for java. By using these tools user can easily use the beans created by this project, discover the contents(properties, methods, and events) without knowing the inside code of the bean components.
In this phase we decide to create 3 beans:

1. Connection Bean ( connect your java application to different databases such as Oracle, MSql, MySql)
2. List Database Items Bean ( list all the items currently in the database)
3. Database Transaction Bean ( add or remove item from current of transaction)

3. Benefit
The major reason for this project is that the development of advanced database java Bean and related improvement in IDE environment. The implementation of this project will have positive impacts on CIS 501 and CIS560 teachings and will help students to easily implement database java bean without having further knowledge of using advanced swing complements and latest JDBC technology.

4. Project Plan

My MSE final project is divided into three phases:

Phase I: Specification
Expected to finish by 10/1/2002
1. Topics selection and literature search:
Time span: 8/1/2001 to 8/30/2002
Search and review the related literature.
2. Overview of project:
Time span: 9/1/2002 to 9/15/2002
Content: Write project overview, including project description, purpose and goals.
3. Project plan:
Time span: 9/16/2002-9/20/02
Content: Break down project into more details, and set up milestones.
4. Cost estimation:
Time span: 9/21/2002 to 9/25/2002
Content: Estimate size, effort needed for the project (COCOMO).
5. Requirement:
Time span: 9/25/2002 to 10/1/2002
Content: Document overall requirement. Draw the system model and scenarios.
6. Presentation I: expected by 10/1/2002

Phase II: Design
Expected to finish by 12/1/2002
1. Design:
Time span: 10/1/2002 to 10/15/2002
Content: Draw use case diagram, class diagram .
2. Software quality assurance plan:
Time span: 10/16/2002 - 10/26/2002
Content: Develop SQA plan to ensure the quality of the project.
3. Test plan:
Time span: 10/27/2002 - 11/5/2002
Content: Design test cases.
4. Formal technical inspection:
Time span: 11/5/2002 to 11/20/2002
Content: Develop a formal checklist and a formal report.
5. Prepare for the second presentation
Time span: 11/21/2002 to 11/25/2002

6. Presentation II: expected by 12/1/2002

Phase III: Implementation, Testing and Documentation:
Expected to finish by 3/25/2003
1. Coding:
Time span: 12/5/2002 to 2/25/2003 (including 3 weeks for winter break)
Content: Use JBuilder, Oracle9i.
2. Testing:
Time span: 2/25/2003 to 3/5/2003
Content: Test project based on test cases designed in previous phase. Write test report.
3. Project Evaluation:
Time span: 3/6/2003 to 3/10/2003
Content: Review the methodologies. Evaluate the quality of the project.
4. Documentation:
Time span: 3/10/2003 to 3/20/2003
Content: Write user manual.
5. Prepare presentation III
Time span 11/21/2002 to 11/24/2002
5. Presentation III: expected by 3/25/2003
5. Cost Estimation: (2200-2800)
The total loc for this project is around 2200 - 2800.
In order to estimate the development effort of my MSE project, I will use Function Point Analysis (FPA) and COCOMO model to predicate the size and cost of developing the Use Case Analysis Tool. The Source Lines of Code (SLOC) is estimated base on the FPA. The function point value can be converted to SLOC by a Language Factor(LF). So the SLOC for Java code in my MSE project will be calculated after the function points are calculated. After that, I will use the COCOMO model to estimate the cost estimation of the project. Number of Person-months is calculated from the SLOC using COCOMOII calculator. And also a Gantt chart is plotted from the available person months.
The function point model includes three major parts for the cost estimation. Firstly, calculate the Unadjusted Function Points (UFP) by counting the identical types, user input, user output, logic file, user inquiry, and external interface. Secondly, calculate the adjusted function point (AFP) through the unadjusted function point and Product Complexity Adjustment (PC). Thirdly, calculate the Source Lines of Code through the adjusted function point and Language Factor.
1. Calculation of the unadjusted function points (UFP)
In order to calculate, it is necessary to consider five features in the software program. They are user input type, user output type, user inquiry type, file, external Interface. Each user input that provides distinct application-oriented data to the software is counted. Inputs should be distinguished from inquires, which are counted separately.
Each user output that provides application-oriented information to the user is counted. In this context output refers to reports, screens, error messages, and so on. Each user inquiry is defined as an on-line input that results in the generation of some immediate software response in the form of an on-line output. Each distinct inquiry is counted. Each file that may be one part of a large database or a separate file is counted. External interface refers to all machine readable interfaces (e.g. data files on tape or disk) that are used to transmit information to another system.
·INPUT

Simple Average Complex
username 4
password 4
tablename 4
choose JDBC driver 8
choose database URL 8
connect to database 6
choose which bean toconnect 8
get table information 6
insert a new item 6
delete an existing item 6
update an existing transaction 6
cancel a transaction 6

Subtotal = 4*3 + 6 *6 + 8*3 = 72

·OUTPUT

Simple Average Complex
Confirmation for update of a item info 4
Confirmation for deletion of a item 4
Comfirmation for insertion of a item 4
Subtotal = 4*3 =12

·INQUIRES

Simple Average Complex
Check product info 6
View purchase list and cost 6
check if the item already exist 6

Subtotal = 6 * 3 = 18

·FILES

Simple Average Complex
insert a collection of data from a txt file 6
execute a sql command from a txt file 6
Subtotal = 6 * 2 = 12

·INTERFACES

Simple Average Complex
Data files on floppy disk and local hard disk 6

Subtotal = 6 * 1 = 6

Grand total: 72+ 12 + 18 + 12 + 6 = 120

2) Adjusted function points:
Based on Stutzke ,the adjusted FP is analyzed as follow:
Complexity Weighting Factors Rate (1-5)
Does the system require reliable backup and recovery? 1
Are data communications required? 3
Are there distributed processing functions? 1
Is performance critical ? 4
Will the system run in an existing, heavily utilized operational environment? 3
Does the system require on-line data entry? 1
Does the on-line data entry require the input transaction
to be built over multiple screens or operations 1
Are the master files updated on-line 3
Are the inputs, outputs, files, or inquiries complex 5
Is the internal processing complex 4
Is the code designed to be reusable 5
Are conversion and installation included in the design 6
Is the system designed for multiple installations in different organizations 2
Is the application designed to facilitate change and ease of use by the user 2
Sum 41
Complexity adjustment factor 1.05

Adjusted FP = FPunadjusted * (0.65 + 0.01 * (sum of ratings))
= 120 * (0.65+0.01*41)
= 127.2
3) Cost estimation by COCOMO model:
The following is a summary of formulas for different programs (Pressman [3]):
TDEV Programmer Productivity Development Time (Month)
Application Programs PM = 2.4*(KDSI) 1.05 TDEV = 2.5* (PM) 0.38
Utility Programs PM = 3.0*(KDSI) 1.12 TDEV = 2.5*(PM) 0.35
System Programs PM = 3.6*(KDSI) 1.20 TDEV = 2.5*(PM) 0.32
This project is to develop an application program, thus, the formula of application program is applied:

KDSI = 2.8 KLOC
PM = 2.4 * (KDSI) ^ 1.05
= 2.4 * 2.8^1.05
= 7.1 (person-month)
TDEV = 2.5 * (PM) ^ 0.38
= 2.5 * 7.1 ^ 0.38
= 5.2 (month)

5. References
[1]
[2]
[3] L. Bernstein and A. Lubashevsky, "Living with Function Points", in Software Management, 5th Edition, 1997
[4] R. D. Stutzke, "Software Estimating Technology: A Survey", in Software Management, 5th Edition, 1997
[5] R. S. Pressman, "Software Engineering: A practitioner's approach", 4th Edition, 1997

Phase II: Project Design

1. Design

1.1 Use case diagram

A use case diagram provided as follow. The actor for this system is developer who will initiate the events involved in each task. A developer calls the Jbuilder to make a new DB application . After the application created he can choose which bean he want to use(Connection Bean, DBTable Bean, DrawChart Bean and Copy File bean). For each particular bean, developer should set correct value for each properties.

1.2 Class diagram

For the Database Connection Bean, we are going to develop a java bean component to connect to database, as shown below. The user enters or selects a JDBC driver, a database URL , a username, and a password, and clicks the Connect button to connect to the database. Once connected, an instance of the Connection interface can obtained from the getConnection Bean.

In the database connection bean, after user input the JDBC driver, database URL, username and password ,

connectionPanel will pass all these information to the ConnectionClass which will verify the information and return a connection object back to connectionPanel. Then, connectionPanel will send the connection object to the bean upon user’s requirment.

DatabaseTable bean is a useful utility that displays all the rows of a database table in a Jtable , allow user to navigate and modify it’s content.

This bean consists two classes: CreateTable and NewRecordDialog. Once the database is connected, the table contents are displayed in an instance of CreatTable. The CreateTable class is a JavaBean component that can be used to browse a table and modify a table.

An instance of NewRecordDialog is displayed to let user enter a new record when user click the Insert button in CreateTable.

The DrawChart bean will provide a statistic view of data information currently in the databasetable. By using this bean, user can draw a pie chart, a bar chart, or both of them. DrawChart class is a JavaBean component with GUIs in it.

Once received the connection object passed by connectionPanel class, it will select the useful information or data and pass them to PieChart class and BarChart class by using an instance of ChartModel. After get the data, PieChart and BarChart will automatically draw charts on the GUIs.

For the copy bean, we can get data from a text file and copy the data to a table. Before add the data to database user can have a look at the content of the text file, then go ahead to save it to databse.

The following is the class model for the whole DB JavaBean project, which almost includes all the major classes in the project. The diagram gives an overview of the whole system by showing its classes and the relationships among them. It models a developer develop a database project by using beans. The central class is Frame1, which likes a controller for the whole project. Associated with it are connection bean, database table bean, drawchart bean, and copyfile bean. The Frame1 will decide which bean will be used and by how. By using connectionPanel bean, user can set properties to each bean.

1.3 Sequence diagram

Sequence diagram describes how different classes collaborate in the DB JavaBean project. It is an interaction diagram that details how operations are carried out -- what messages are sent and when. As shown as follow, the whole diagram organized according to time. The time progresses as you go down the page. The objects involved in the operation are listed from left to right according to when they take part in the message sequence.

2. Formal specification and prototyping

English version of pre and post condition.

For the database connection bean:

Operation1 :select JBDC driver and Database URL

Pre: none JDBC driver and Database URL were selected

Pos: User specify what kind of database he/she want to connect to and select driver and URL from the list of the combo box.

Operation2: Give the correct Username and Password for database access

Pre: None username and password were given at the beginning.

Pos: User fill in his/her username and password, the system will verify the if the information is correct. If not, show the error message on status bar.

Operation3: Use database table bean

Pre: The connectToTable property of connectionPanel is set to false by default. Which means database bean will not be used.

Pos: Set the connectToTable property value to be true.

Operation4: Use drawChart bean

Pre: The DrawChart property of connectionPanel is set to false by default. Which means drawChart bean will not be used.

Pos: Set the DrawChart property value to be true.

Operation5: Use copyFile bean

Pre: The CopyFile property of connectionPanel is set to false by default. Which means CopyFile bean will not be used.

Pos: Set the CopyFile property value to be true.

Operation6: check if get the correct information from database.

Pre: There will be nothing in the table at the beginning.

Pos: After connected to the database, the records shown in the table should be exactly the same as what in the database. [

Operation7: insert a new record

Pre: database don’t have that record.

Pos: database have all the record including the one just added.

Operation8: delete a new record

Pre: the record we want to be deleted was already in the database

Pos: this particular record is removed from database

Operation9: update a record

Pre: the record with the information user want to modify was in the database.

Pos: the record with information modified by user is in the database.

Operation10: use drawChart bean(nameToshow, a property value, let program know will column will be shown as names in charts)

Pre: the nameToShow value of drawBean was 0 as default

Pos: set a value to nameToShow.

Operation11:use CopyFile bean

Pre: there are no input file at the beginning.

Pos: user specifies a file to be load.

3. Software quality assurance plan

Software quality assurance plan

Purpose

The purpose of Software Quality Assurance (SQA) Plan is to serve as a guideline to [ ensure the quality of the project. It [ provides a way to manage software quality for "Data Base Java Beans Application" project.

This plan will identify the SQA responsibilities of the project developer; define reviews and audits and how they will be conducted and list the activities, processes; and identify the SQA work products.

  • References

Software Management fifth edition Donald J.Reifer

IEEE Standard for Software Test Documentation, IEEE Std 829-1983

IEEE Standard for Software Quality Assurance Plans, ANSI/IEEE Std 730-1989

IEEE Guide for Software Quality Assurance Planning, DRAFT, P730.2/D4

  • Management

Organization:

Organization structure:

Committee: Drs. Bill Hankley, Daniel Andresen and Mitchell Neilsen

Major professor: Dr. Bill Hankley

Developer: Feng Chen

Responsibilities:

The developer will be responsible for project specification, design and implementation under the supervision of the major professor and report to all the committee members in the form of three presentations with one at end of each phase.

The major professor suggests the topic of the project and general requirements, supervises and audits the whole development process of the project.

The committee will oversee and review the work performed by the developer, provide feedback and advice, and audit the whole developement process during the three presentations of the project.

Tasks:

In phase I, the developer must finish a) project overview b) cost estimate c) project plan.

In Phase II, the developer must finish a) object model and sequence diagram b) SQA plan c) test plan d) formal technical review e) formal specification.

In Phase III, the developer must finish a) source code b) testing c) evaluation d) references, user manual

(including installation instructions and user manual)

Documentations

The following documents will be provided at the end of each phase:

Phase 1: Software Requirement

  • Project Overview
  • Project plan
  • Cost Analysis
  • System Requirements Specification (SRS)

Phase 2: Software Design

  • Software Quality Assurance (SQA) Plan
  • System diagrams: Use case model, Object Model, sequence diagram, database snowflake schemas
  • Formal Specifications (in OCL)
  • Test Plan
  • Formal Technical Review (checklist)

Phase 3: Software Implementation