MSE PROJECT .edu
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
[pic]
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
[pic]
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.
[pic]
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 ,
[pic]
[pic]
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.
[pic]
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.
[pic]
An instance of NewRecordDialog is displayed to let user enter a new record when user click the Insert button in CreateTable.
[pic]
[pic]
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.
[pic]
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.
[pic]
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.
[pic]
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.
[pic]
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.
[pic]
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
• Source Code, testing code.
• Web tutorials (general concepts) and user manual .
• Installation guidance: Detailed installation instructions fro Jbuilder.
• Testing and Reliable Evaluation (including testing code)
• Project Evaluation
Standard, Practices, Conventions, and Metrics
Standards
Document Standards – MSE portfolio
Coding Standards - Java 1.3 or later
Coding Documents - Java Documentation
Test Standards - IEEE Standard for Software Test Documentation
Metrics
Line of code(LOC) is used to measure the size of the software
Programmer-month is used as another measure of the software
• Review and Audits
There will be three formal presentations prepared by the developer and evaluated by the committee at the end of each phase.
• Test, Tools, Techniques, and Methodologies
Test:
As per Test Plan
Tools and techniques:
Jbuilder: development IDE
Together6.0 : UML model design
Oracle : Database Server
Problem Reporting and Corrective Action
N/A
Training
N/A
Risk Management
N/A
4 Test plan
Identifier
"chen001-testplan-v001"
Introduction
This test plan will provide test cases for testing “The database java Beans Applications”
project. The purpose of the plan is to ensure that proposed functionality of the project can be implemented properly as specification defined.
Test Items
Unit testing: test major functionalities of each bean
Integration testing: test if each bean work well when put all of them together.
Test cases
DatabaseURL:
Incorrect input: wrong database url selected—should not let user connect to database
Correct input :select the correct url for database —should let user connect to database
DatabaseDriver:
Incorrect input: wrong database driver selected—should not let user connect to database
Correct input :select the correct url for database —should let user connect to database
Logon:
Incorrect input: empty/wrong user name and/or empty/wrong password—should not let user logon
Correct input: right user name and password—should let user logon
Update the data information:
Incorrect input: empty required field(s)—should not update or tell user to fill in the required field(s)
Correct input: fill in all required field(s)—should update accordingly
Delete unwanted product from table:
Incorrect input: empty selection of item—should tell user to select certain item then press delete button
Correct input: select item(s)—should delete selected item(s) from purchase line items
Use database table bean:
Incorrect input: do not set the connecttoTable property of ConnectionPanle on the Properties tab of the Inspector or do not add connectionpanel1.setTable(createTable1) to the controller class— database table bean should not work correctly.
Correct input :set connecttoTable property to be true and add line “connectionpanel1.setTable(createTable1)” to the source—database table bean will work.
Use draw chart bean:
Incorrect input: do not set the drawChart property of ConnectionPanle on the Properties tab of the Inspector or do not add connectionpanel1.setChart(newChart1) to the controller class— draw chart bean should not work correctly.
Correct input :set drawChart property to be true and add line “connectionpanel1.setChart(newChart1)” to the source—draw chart bean will work.
Use Copy File bean:
Incorrect input: do not set the copyFile property of ConnectionPanle on the Properties tab of the Inspector or do not add
connectionpanel1.setCopy(newcopyfile1); to the controller class— copy file bean should not work correctly.
Correct input :set copyFile property to be true and add line “connectionpanel1.setCopy(newcopyfile1);” to the source—Copy File bean will work.
To use the Copy File bean:
Incorrect input: wrong input file format—could not read the file correctly
Correct input : change the format of input follow the instruction—could read information from file.
To use the Draw Chart bean:
Incorrect input: do not set nameTo and numbers property — charts will not show up
Correct input: set the correct value to these two properties charts will show up
Pass/fail criteria
Testing is finished when all tests have been successfully completed.
Suspension criteria
If any defects are found during testing, the code shall be fixed, then testing will be resumed. The defects will be tested
all over again.
Deliverables
Test plan
Test cases
Resolution of defects
Test input and test output data
Responsibilities
The developer is responsible for all the testing activities to be carried out.
Approvals
Approved by Committee members.
5 Develop a formal checklist and a formal report
10.1 Introduction
A formal technical inspection or formal technical review (FTR) is a quality assurance activity for software. It aims to
find and eliminate software defects. Formal inspections may be applied to any product or partial product of the
software development process, including requirements, design, and code. Formal inspections are embedded in the
process of developing products and are done in the early stages of each product's development.
10.2 Software requirement specification (SRS) checklist[4]
Completeness
Does this project include all user requirements (as defined in the concept phase)?
Is a user manual submitted at the end of this project?
Does code match the design?
Does the design reasonable?
Consistency
Is there any internal inconsistency between the software requirements?
Does this application work on all version of Jbuilder?
Is this project compatible with different hardware?
Is the database application platform-independent?
Correctness
Is there justification for the design/implementation constraints?
Feasibility
Will the design(models), operation( coding), and maintenance(manuals) of software be feasible?
Modifiability
Are different components organized to allow for modifications?
Is each unique bean easy to be reused?
Traceability
Does this database application completely cover the requirements defined by client?
Understandability
Is the language ambiguous?
Is the user manual understandable?
Maintainability
Does the documentation follow MSE portfolio?
Is the documentation clear and unambiguous?
Verifiability/Testability
Are the requirements verifiable (i.e., can the software package be checked to see whether requirements have been
fulfilled)?
Clarity
Are names indicative of their meaning?
➢ Is each concept defined only once, with one clear meaning?
Is each statement written as clearly as possible?
Functionality
Does the design implement the specifications and requirements?
Reliability
Are abnormal conditions considered?
Are the defect conditions/codes/messages specified completely and meaningfully?
[pic]
Phase III: Implementation, Testing and Documentation
• Coding
• Testing
• Documentations
• TimeLog
• Presentation III (.ppt) (.html) (May 12, 2003)
• Report (.doc)
3.1 Coding (LOC total:2261)
• ConnectionBean (subtotal: 300)
➢ connectionBean.zip
• DatabaseTableBean (Subtotal 1072)
➢ DatabaseBean.zip
• DrawChartBean (Subtotal 562)
➢ DrawChartBean.zip
• CopyFileBean (subtotal 327)
➢ CopyfileBean.zip
3.2 Testing
3.2.1 ConnectionBean:
o wrong database url selected: should not let user connect to database and show a error message
o wrong database driver selected: should not let user connect
o login with empty user id and/or password: showed error message
o login with invalid user id and/or password: showed error message
o login with correct user id and password: login success,
3.2.2 DatabaseTableBean:
• Select an item: User can select each record currently in the table. And move the cusor by using Fist,Last,Prior and Next Buttton.
• "Insert" button:
o If the new input in NewRecord dialog is empty or incorrect , an error message will show up.
• "delete" button:
o If there is no item being selected, nothing will be deleted.
• "updat" button:
o If there is no item being selected, a dialog with error message will come out.
o If the new input is incorrect or empty a error message will show up.
3.2.3 DrawChart:
• Set property value:
o If a wrong value being set to DrawChart’s properties, there will be an error message coming out.
3.2.4 CopyFile Bean:
• Wrong file path: If the path for input file is incorrect, a error message shows up
• Wrong format: If the input file’s format is not correct, user cann’t view the content of file and will not save it into database either.
3.3 Documentations
3.3.1 JBuilder tutorial ( )
3.3.2 Database Java Beans user manual:
Currently, we have 4 java beans in this project. They are Database connection bean, Database table bean, Draw chart bean,
and Copy file bean . All these beans were developed in JBuilder7 enterprise edition by using JDK1.4.
For using these beans you can follow the steps below.
1.To add components from current project in JBuilder, you have to create a library for the current project, then select this library from the Palette Properties .
2 To create a library, choose Tools, Configure Libraries to bring up a Library properties box. Click new to display the New Library wizard, as shown in Figure 1.1
Figure 1.1
[pic]
. Enter the new Library name – Oracle in the Name field and add the path for classes12_g.zip( which can be downloaded at
or some other websites) in the Class section,
as shown in Figure 1.2.
[pic]
Click OK to add the library. Then, you can go ahead to add another four Libraries (connecttionpanel, DatabaseTables, drawchart and copyfile). The installations for these two libraries are a little different from Oracle library, because these two are Jbuilder projects instead of JAR files. To do this, you have to specify the path of src and classes folder of ConnectionPanel DataBaseTable, DrawChart and CopyFile. as shown in Figure 1.3.
Figure 1.3
[pic]
Figure1.3.1
[pic]
Figure1.3.2
[pic]
Figure1.3.3
[pic]
Figure1.3.4
[pic]
Figure1.3.5
[pic]
3.1 All the classes from AWT and Swing are already beans. Some of them, such as JList, JButton ans JTable, are already added into the Swing page and Swing Containers group in the component palette.
[pic]
3.2 Suppose we want to use all the four beans, which we mentioned before, in the JBuilder visual environment. First we must add it to the component palette following the steps below.
1) Choose Tools, Configuration Palette or right-click anywhere in the component palette and choose Properties. The palette Properties dialog box appears, as shown in Figure1.4
Figure 1.4
[pic]
Figure 1.5
2)Select the Pages tab and choose the page on the component palette on which we want the component to appear. Optionally, we may create a new page by clicking the Add button and entering the page name in the Add Page dialog box.
3)Suppose we want to add new beans to the Other group. Select Other in the pages column and click the Add components tab to display the dialog box for adding components, as shown in Figure1.6
Figure1.6
[pic]
4.Click the Selected Library button to display the Browser for Class dialog, as shown in Figure 1.7.
Figure 1.7
[pic]
5).Then, click Add From Selected Library button to locate Connectionpanel ,CreateTable, DrawChart and CopyFile in the connectionpanel, databasetable, drawchart and copyfiles package, as shown in Figure 1.8
Figure1.8
[pic] [pic] [pic] [pic]
6)Click OK in the Browser for Class dialog box to display a dialog box , as shown below:
[pic] [pic] [pic] [pic]
7.
At this point of time, we are ready to test the beans you just added to the component palette. First of all, you need create a new project. Choose File, New Project to bring up the Project wizard dialog box, as shown in Figure 2.0
Figure2.0
[pic]
Because this is Database application. We are going to use the JDBC driver from Oracle library we just installed. Click next go to Project Wizard Step 2 of 3. Add Oracle9i into the Required libraries box as shown below:
[pic]
Then click Finish button to finish creating a new Project.
8. Next step, we need create a new application. To do this, choose File, New to display the Object Gallery. Click the Application icon to bring up the Application wizard, as shown Figure 2.1 and 2.2
[pic]
Figure2.1
[pic]
Figure2.2
9.Type BeanTest in the Class field of the Application wizard Step 1 of 2 and Next to display the Application wizard’s Step 2 of 2, as shown in Figure 2.3
[pic]
Figure2.3
10. Check Center frame on screen. Click Finish.
11.The new project should looks like this in JBuilder.
[pic]
11.With the Frame1.java selected in Project Pane, choose the Design tab in the content pane to start the UI designer. Then, select contentPane in the component tree. Select its layout property on the Properties tab of the Inspector. Click the drop-down arrow and select null from the list as follow:
[pic]
12.To use all the beans we just added in JBuilder, click the Connectionpanel ,CreateTable, DrawChart and CopyFile components from the Other tab in the component palette and drop them in the frame, as shown in Figure 2.4
[pic]
Figure2.4
13. select contentPane in the component tree. Select its connecttoTable property on the Properties tab of the Inspector. Set the value to True. In the meantime, also set the value of copyfile and drawchart to be true. as shown in Figure 2.5
Figure2.5.1
[pic]
Figure2.5.2
[pic]
Figure2.5.3
[pic]
14. After all these done, choose the Source tab in the content pane to go back source code page of Frame1.java. Add three more lines code in Frame1.java
connectionpanel1.setTable(tableEditor1);
connectionpanel1.setChart(drawChart1);
connectionpanel1.setCopy(copyfiles1);
[pic]
15. The next thing we need to do before we can run the program is set the properties of DrawChart bean.
To do this, select drawChart1 in the component tree. In the component inspector for drawChart1,set the value of nameTo property to 1 and the value of numbers to 3.
We do this because the following is what our testing database looks like:
Name Type
------------------------------- -------- -------------
F_NAME CHAR(10)
L_NAME CHAR(10)
AGE NUMBER(38)
The value of nameTo property tells the program which column of database will be used as a name showing up at the drawChart
bean . Here we set it as 1, which means the F_NAME will be there on the chart.
Changing numbers to 3 let program it should draw charts depends on each person’s age
15. At this point of time , we are ready to test our program.
After running, it should looks like this:
[pic]
16 To connect a database(Oracle 8i running on zaurak.cis.ksu.edu), select JDBC driver, and DataBase URL. Type your User Name , Password and the name of the table where you wan t to get information from. Click Connect button, all the items currently in the table will be list in the table. You can insert , delete, or update all these information.
[pic]
To insert a new record
[pic]
[pic]
To delete a record, select a record first, then delete it.
[pic]
[pic]
To change information of records:
[pic]
[pic]
3.4 Evaluation
Evaluation on Phase One
In phase one, Dr. Hankley and me, we talked what kind of project need to be done and why we want to do this project. Through these talks, the concepts of this project are formed. Tools and other approaches are determined. Project requirements as well as project plan are made.
Evaluation on Phase Two
The major task in Phase Two is to develop a detailed design guiding the implementation of project. It includes SQA, formal specification, object model, test plan, and formal technique inspection. Tutorials on models, IDE tools and quite a few books and articles are read or learnt in this phase.
The design diagrams form the major contribution of this project to future development.
Evaluation on Phase Three
Phase Three of the project focuses on the actual implementation including coding and testing of the source code, documenting what was done in the previous phases, writing testing report, and writing developer manuals as well as user manual.
In this phase, testing is basically performed simultaneously while coding. When the coding reaches the end, the system test and integration test are performed using the test cases designed in Phase Two.
The line of code of (LOC) this project is approximately 2400, which is also close to the empirical estimate provided in Chapter 1. The gap between actual LOC and that based on COCOMO is about 500 lines, and this is mainly due to the factor that tells how many lines of code per function points
Retrospect on Time
The project started from August 2002 and is finished in early April 2003. Some 8 months were consumed before the final report came out. All milestones are listed below:
1st presentation scheduled: 10/01/02 actual 10/16/02
2nd presentation scheduled: 12/01/ 02 actual: 12/15/ 02
3rd presentation scheduled: 03/25/03 actual: 05/12/ 02
Conclusion
The project is finished successfully according to the software requirement specification in Phase One. This project will have a positive impact in CIS 501 and CIS 560 teachings (GUI user beans for cis501 and database beans for 560). The student may well use the GUI and the source code to help them get a deeper understanding in database applications and software architecture principles. At same time, the developer, I had a better understanding how reusable software components works in a bigger project than we used to write. In the coding phase, I start to realize the power of combination of IDE builder tools and Java Bean Technology. It enables programmers to rapidly build application by assembling objects and testing them during design time.
Finally, this project achieves what it is supposed to do, and from three-month trial applications of the software developed, the product itself is durable in quality. The period for developing this project is really a good experience for my graduate study.
[pic]
Date |Activity |Start |Finish |Interruption
(min.) |Delta
(min.) |Complete
(%) |Comments | |08/1 |Topic searching:
|9:00 |12:00 |0 |180 |100 | | |08/2 |Talk with Dr. Hankley on topic |14:00 |14:40 |0 |40 |100 | | |08/6 |Search reference for Jbuilder |19:30 |22:00 |0 |150 |100 | | |08/16 |Talk with Dr. Hankley to hammer down topic. |16:00 |17:00 |0 | | | | |08/23 |searching |14:00 |16:00 |0 |120 |100 | | |08/23 |Read reference for JBuilder |19:00 |21:00 |0 |120 | | | |08/26 |Decide how many beans will be created in this project |21:00 |23:00 |0 |120 | |The project should have 4 beans | |08/28 |try to go over the material been used for cis501 |9:00 |12:00 |30 |150 | |Spend something running some examples | |
Date |Activity |Start |Finish |Interruption
(min.) |Delta
(min.) |Comments | |09/1 |Write project overview
(purpose and goals) |8:30 |12 :00 |30 |180 |it’s time to decide which way to go | |09/4 |Write project overview
(purpose and goals) |19:30 |23:00 |30 |180 | | |09/8 |Write project overview
(project description) |13:30 |15:30 |0 |120 |Need to decide what kind of project will be done | |09/10 |Write project overview
(project description) |14:00 |15:30 | |90 | | |09/16 |Project plan
(set up milestones) |19:00 |24:00 |30 |270 |Decide what kind of work need to be done in each phase | |09/19 |Project plan
(Break down project into more details) |12:30 |14:00 |10 |80 | | |09/23 |Cost estimation
(Estimate size)
|14:00 |15:00 |10 |50 |About 2200 + lines code | |09/27 |Cost estimation
(COCOMO). |8:00 |12:00 |30 |210 |Adjusted FP = 127.2 | |10/1 |Have a look at somebody else’s MSE presentation materals |15:00 |16:00 |0 |60 |Think about what else need to be done | |10/4 |Talk with committee members about the time schedule for first presentation |9:30 |11:00 |0 |90 |The first presentation will be on 10/16/02 | |
Date |Activity |Start |Finish |Interruption
(min.) |Delta
(min.) |Comments | |10/18 |Talk with Dr. Hankley about the phase II,
|15:30 |16 :30 |0 |60 |Have some ideas about the requirements for Phase II | |10/20 |Prepare for drawing the system model
(read docs for USE case, sequence diagram &…)
|10:00 |12 :00 |20 |100 |Try to go over the stuffs learned before | |10/24 |Draw scenario diagram
(install Together6.0 control center)
|16:00 |19 :00 |30 |150 |The speed of TogetherJ is quite slow. | |10/25 |Read read TogetherJ6.0 tutorial;
(see how to draw diagrams on it) |10:30 |12 :30 |0 |120 |Figure out that there should be some code there before draw the diagrams | |10/28 |Write come code (basically just create some classes for drawing Class and Scenario diagrams) |13:30 |17 :00 |30 |180 | | |11/1 |Draw class diagram
|20:00 |22 :30 |30 |120 |Need 4 diagrams(coz we have 4 beans for this project) | |11/05 |Draw class diagram
|10:00 |12 :00 |0 |120 | | |
Date |Activity |Start |Finish |Interruption
(min.) |Delta
(min.) |Comments | |11/6 |Draw class diagram
|8:00 |10 :00 |0 |120 | | |11/10 |Draw scenarion Diagram |14:00 |15 :00 |0 |60 | | |11/13 |Draw scenarion Diagram |19:00 |20 :20 |10 |70 |Diagram drwan by TogetherJ looks pretty good, | |11/16 |Draw Use Case
|20:20 |22 :00 |0 |100 | | |11/20 |Develop SQA plan to ensure the quality of the project
|8:00 |11 :00 |0 |180 |Spend lots of time trying to recall what is SQA | |11/20 |Develop SQA plan to ensure the quality of the project
|10:00 |12 :00 |0 |120 |At least made something done | |11/25 |Generate test cases |17:00 |19 :00 |0 |120 | | |11/28 |Generate test cases
| | | |300 | | |12/1 |Write Formal specification and prototyping
|19:30 | 22 :30 |15 |165 |Almost forget how to write OCL expression, go back to look at 771 lecture slides | |
Date |Activity |Start |Finish |Interruption
(min.) |Delta
(min.) |Comments | |12/3 |Talk with Dr. Hankley about how to write this thing |3:00 |4 :15 |0 |75 |It’s hard to find any example about how to write OCL for java beans. We got troubles here. | |12/5 |Write OCL for beans with Dr Hankley |19:00 |21 :00 |0 |120 | Finally, we work this thing out. | |12/8 |Write slides for prenstation II |19:00 |23 :00 |5 |235 | | |12/15 |Have preensation |3:30 |4 :30 |0 |60 |
| |12/20-
1/15 |Winter break | | | | |Go back to NJ,stay with my wife
| |
Date |Activity |Start |Finish |Interruption
(min.) |Delta
|Comments | |1/16-1/26 |Write code for conection bean
|1/16 |1/26 | |11 Days |Try to make sure the bean can be used to connect to different DB | | 2/1-
2/15
|Write code for drawChart bean |2/1 |2/15 | |15days | | | 2/16-
2/26
|Write code for CopyFile bean |2/16 |2/26 | |11 days | | | 3/1-
3/10 |Write code for Database Table bean
|3/1 |3/10 | |10 days | Try to standard result from JDBC driver class12.zip | | 3/11-
3/20 |Add some new features to Table Bean
| 3/11 |3/20 | |10 days |This time, we use scollable resultset
From newr version of JDBC driver | | 3/23 |Test project based on test cases designed in previous phase
|19:00 |22 :00 |30 |150 | | | 3/24 |Test project based on test cases designed in previous phase
|19:00 |22 :00 |30 |150 |Find the bug when try to delete a record in database table | | 3/25 |Test project based on test cases designed in previous phase
|19:00 |22 :00 |30 |150 | Find new bugs whne try to update records in DB table | |3/27 |Test project based on test cases designed in previous phase
|19:30 | 22 :30 |15 |165 |Find new bug when using CopyFile bean | |3/29
|Write test report |8:00 |11 :00 |0 |180 | | |4/1
|Write user manual | 9:00 |12 :00 |15 |165 | | |4/6 |Write user manual
|15:00 |18 :30 |15 |195 | | | 4/12 |Write user manual |20:00 |23 :15 |5
|190 | | |4/14
|Write user manua |19:00 |23 :20 |10 |190 | | |4/16
|Write the final report for Phase III |19:00 |22 :00 |30 |150 | | |4/19
|Write the final report for Phase III |19:00 |24:00 |30 |270 | | | | | | | | | | |
Acknowledgement:
I would like to sincerely thank my MSE project committee Drs. Bill Hankley, Dan Andresen, and Mitchell Neilsen for their time, ideas, instructions, guidance and comments on this project.
5. References
[1]
[2]
[3] Oracle9iAS technical white paper (pdf)
[4] Practical UML A Hands-On Introduction for Developers (TogetherSoft)
[5]
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.