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

Total Page:16

File Type:pdf, Size:1020Kb

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

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]http://www.borland.com/ [2] http://java.sun.com/products/javabeans/ [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

 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?

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 ( www.borland.com)

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 . Enter the new Library name – Oracle in the Name field and add the path for classes12_g.zip( which can be downloaded at http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html or some other websites) in the Class section, as shown in Figure 1.2. 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 Figure1.3.1 Figure1.3.2 Figure1.3.3 Figure1.3.4 Figure1.3.5

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.

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 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

4.Click the Selected Library button to display the Browser for Class dialog, as shown in Figure 1.7.

Figure 1.7 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

6)Click OK in the Browser for Class dialog box to display a dialog box , as shown below:

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 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: 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 Figure2.1 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 Figure2.3

10. Check Center frame on screen. Click Finish.

11.The new project should looks like this in JBuilder. 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: 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 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 Figure2.5.2 Figure2.5.3 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); 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: 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.

To insert a new record To delete a record, select a record first, then delete it.

To change information of records:

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. Date Activity Start Finish Interruption Delta Complete (min.) (min.) (%) 08/1 Topic searching: 9:00 12:00 0 180 100

08/2 Talk with Dr. Hankley on 14:00 14:40 0 40 100 topic 08/6 Search reference for Jbuilder 19:30 22:00 0 150 100 08/16 Talk with Dr. Hankley to 16:00 17:00 0 hammer down topic. 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 21:00 23:00 0 120 be created in this project 08/28 try to go over the material 9:00 12:00 30 150 been used for cis501 Date Activity Start Finish Interruption Delta Comments (min.) (min.) 09/1 Write project 8:30 12 :00 30 180 it’s time to overview decide which (purpose and way to go goals) 09/4 Write project 19:30 23:00 30 180 overview (purpose and goals) 09/8 Write project 13:30 15:30 0 120 Need to overview decide what (project kind of description) project will be done 09/10 Write project 14:00 15:30 90 overview (project description) 09/16 Project plan 19:00 24:00 30 270 Decide what (set up kind of work milestones) need to be done in each phase 09/19 Project plan 12:30 14:00 10 80 (Break down project into more details) 09/23 Cost 14:00 15:00 10 50 About 2200 estimation + lines code (Estimate size)

09/27 Cost 8:00 12:00 30 210 Adjusted FP estimation = 127.2 (COCOMO). 10/1 Have a look at 15:00 16:00 0 60 Think about somebody what else else’s MSE need to be presentation done materals 10/4 Talk with 9:30 11:00 0 90 The first committee presentation members about will be on the time 10/16/02 schedule for first presentation

Date Activity Start Finish Interruption Delta Comments (min.) (min.) 10/18 Talk with Dr. 15:30 16 :30 0 60 Have some Hankley about ideas about the phase II, the requirements for Phase II 10/20 Prepare for 10:00 12 :00 20 100 Try to go drawing the over the system model stuffs learned (read docs for before USE case, sequence diagram &…)

10/24 Draw scenario 16:00 19 :00 30 150 The speed of diagram TogetherJ is (install quite slow. Together6.0 control center)

10/25 Read read 10:30 12 :30 0 120 Figure out TogetherJ6.0 that there tutorial; should be (see how to some code draw diagrams there before on it) draw the diagrams 10/28 Write come 13:30 17 :00 30 180 code (basically just create some classes for drawing Class and Scenario diagrams) 11/1 Draw class 20:00 22 :30 30 120 Need 4 diagram diagrams(coz we have 4 beans for this project) 11/05 Draw class 10:00 12 :00 0 120 diagram

Date Activity Start Finish Interruption Delta Comments (min.) (min.) 11/6 Draw class 8:00 10 :00 0 120 diagram

11/10 Draw scenarion 14:00 15 :00 0 60 Diagram 11/13 Draw scenarion 19:00 20 :20 10 70 Diagram Diagram drwan by TogetherJ looks pretty good, 11/16 Draw Use Case 20:20 22 :00 0 100 11/20 Develop SQA 8:00 11 :00 0 180 Spend lots plan to ensure of time the quality of trying to the project recall what is SQA

11/20 Develop SQA 10:00 12 :00 0 120 At least plan to ensure made the quality of something the project done

11/25 Generate test 17:00 19 :00 0 120 cases 11/28 Generate test 300 cases

12/1 Write Formal 19:30 15 165 Almost specification 22 :30 forget how and prototyping to write OCL expression, go back to look at 771 lecture slides

Date Activity Start Finish Interruption Delta Comments (min.) (min.) 12/3 Talk with Dr. 3:00 4 :15 0 75 It’s hard to Hankley about find any how to write example this thing about how to write OCL for java beans. We got troubles here. 12/5 Write OCL for 19:00 21 :00 0 120 Finally, we beans with Dr work this Hankley thing out. 12/8 Write slides 19:00 23 :00 5 235 for prenstation II 12/15 Have 3:30 4 :30 0 60 preensation 12/20- Winter break Go back to 1/15 NJ,stay with my wife

Date Activity Start Finish Interruption Delta Comments (min.) 1/16- Write code for 1/16 1/26 11 Try to make 1/26 conection bean Days sure the bean can be used to connect to different DB 2/1- Write code for 2/1 2/15 15days 2/15 drawChart bean Write code for 2/16 2/26 11 days 2/16- CopyFile bean 2/26

3/1- Write code for 3/1 3/10 10 days Try to 3/10 Database standard Table bean result from JDBC driver class12.zip Add some new 3/11 3/20 10 days This time, 3/11- features to we use 3/20 Table Bean scollable resultset From newr version of JDBC driver 3/23 Test project 19:00 22 :00 30 150 based on test cases designed in previous phase

3/24 Test project 19:00 22 :00 30 150 Find the based on test bug when cases designed try to delete in previous a record in phase database table 3/25 Test project 19:00 22 :00 30 150 Find new based on test bugs whne cases designed try to in previous update phase records in DB table 3/27 Test project 19:30 15 165 Find new based on test 22 :30 bug when cases designed using in previous CopyFile phase bean

3/29 Write test 8:00 11 :00 0 180 report

4/1 Write user 9:00 12 :00 15 165 manual 4/6 Write user 15:00 18 :30 15 195 manual

4/12 Write user 20:00 23 :15 5 190 manual 4/14 Write user 19:00 23 :20 10 190 manua 4/16 Write the final 19:00 22 :00 30 150 report for Phase III 4/19 Write the final 19:00 24:00 30 270 report for Phase III

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]http://www.borland.com/ [2] http://java.sun.com/products/javabeans/ [3] Oracle9iAS technical white paper (pdf) [4] Practical UML A Hands-On Introduction for Developers (TogetherSoft) [5] http://otn.oracle.com

Recommended publications