Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Java Beans Feng Chen. Outline Design (diagrams) Formal specification (OCL model) Software quality assurance plan Test plan Formal technical inspection.

Similar presentations


Presentation on theme: "Database Java Beans Feng Chen. Outline Design (diagrams) Formal specification (OCL model) Software quality assurance plan Test plan Formal technical inspection."— Presentation transcript:

1 Database Java Beans Feng Chen

2 Outline Design (diagrams) Formal specification (OCL model) Software quality assurance plan Test plan Formal technical inspection

3 Design Use case diagram Class diagram Sequence diagram

4 Design – Use case diagram

5 Design – Class diagram DatabaseConnection Bean DatabaseTable Bean DrawChart Bean CopyFile Bean

6 Class diagram – Database Connection Bean

7 Class diagram – DatabaseTable Bean

8 Class diagram – DrawChart Bean

9 Class diagram – CopyFile Bean

10 Class diagram – total

11 Design – Sequence diagram

12 Formal specification -- OCL model Connection Bean extend JPanel Visualfields: JDBCDriver : String Default[oracle.jdbc.driver.OracleDriver] DatabaseURL : String Default[jdbc:oracle:thin:@oracle.cis.ksu.edu:1521:ORACLE] DatabaseURL : String Default[jdbc:oracle:thin:@oracle.cis.ksu.edu:1521:ORACLE] Username : String Default[null] Username : String Default[null] Password : String Default[null] Password : String Default[null] Tablename : String Default[null] Tablename : String Default[null] Control : connectionButton : JButton Properties : connectToTable : Boolean Default[false] connectToFile : Boolean Default[false] connectToFile : Boolean Default[false] connectToChart : Boolean Default[false] connectToChart : Boolean Default[false] inv correctInput : valid(username, password) & valid( DBUrl) implies isopen(connection) valid(username, password) & valid( DBUrl) implies isopen(connection) inv unique username: user.allInstances -> (forAll(c1, c2 | c1 <> c2 implies user.allInstances -> (forAll(c1, c2 | c1 <> c2 implies c1.username <> c2.username) Operations context ConnectionBean::setInputValue(DBUrl : String, Username : String, Password : String ) pre: true post: not valid(username, password, DBURL ) implies ErrorDialog context ConnectionBean::getConnect() pre : self.connection -> not exist pre : self.connection -> not exist post: self.connection-> exist & self.connection = connectionClass.getConnection() post: self.connection-> exist & self.connection = connectionClass.getConnection()

13 Formal specification --OCL model (cont’) DBtableBean : extends JTable Visual component: databaseTable : JTable default[empty] databaseTable : JTable default[empty] updateButtons : Jbutton default[not selected] updateButtons : Jbutton default[not selected] Control: insertButton : Jbutton insertButton : Jbutton deleteButton : Jbutton deleteButton : Jbutton UpdateButton : Jbutton UpdateButton : Jbutton Instance variables: Connection: Connection Connection: Connection tableModel: DafaultTableModel tableModel: DafaultTableModel rowVectors: Vector rowVectors: Vectorinv coonection = null implies table->empty coonection = null implies table->emptyoperations: context DBtableBean::usingTableBean(connection:Connection, tablename : String) pre: table->empty & tablename->empty pre: table->empty & tablename->empty post: (not tablename -> empty) & table = select * from tablename post: (not tablename -> empty) & table = select * from tablename context DBtableBean::insertNewRecord( newRecord:Record) pre: !table.include(newRecord)&!database.include(newRecord)& !newRecord->exist pre: !table.include(newRecord)&!database.include(newRecord)& !newRecord->exist pos: table.include(newRecord)& database.include(newRecord)& newRecord->exist pos: table.include(newRecord)& database.include(newRecord)& newRecord->exist context DBtableBean::deleteRecord() pre: table.include(oldRecord)&database.include(oldRecord)& oldRecord->exist pre: table.include(oldRecord)&database.include(oldRecord)& oldRecord->exist pos: !table.include(oldRecord)&!database.include(oldRecord)& !oldRecord->exist pos: !table.include(oldRecord)&!database.include(oldRecord)& !oldRecord->exist

14 Formal specification --OCL model (cont’) drawChartBean extend Jpanel visual component: BarChartPanel : Jpanel BarChartPanel : Jpanel PieChartPanel : Jpanel PieChartPanel : Jpanel DrawChartButton: JButton DrawChartButton: JButton Controls : DrawChartButton: Jbutton Descriptor : nameTo : Boolean : Default[1] nameTo : Boolean : Default[1] numbers : Boolean : Default[1] numbers : Boolean : Default[1] instance state variable: connection : Connection connection : Connection rowVector : Vector rowVector : Vectorinv: connection=null implies ChartPanels->empty connection=null implies ChartPanels->emptyoperation context drawChartBean::usingDrawChartBean(tableName:String) context drawChartBean::usingDrawChartBean(tableName:String) pre:true pre:true pos: PieChart = (select * from tableName) & BarChart= (select * from tableName) pos: PieChart = (select * from tableName) & BarChart= (select * from tableName)

15 Formal specification -- OCL model (cont’) CopyfileBean Visual component: Visual component: Filepath : JTexField Filepath : JTexField ViewFileArea : JTextArea ViewFileArea : JTextArea ViewButton : Jbutton ViewButton : Jbutton SaveButton : Jbutton SaveButton : JbuttonControl: ViewButton : Jbutton Default[not selected] ViewButton : Jbutton Default[not selected] SaveButton : Jbutton Default[not selected] SaveButton : Jbutton Default[not selected] Operation: context CopyFileBean::useingCopyFileBean(recordsfromfile:Record[]) context CopyFileBean::useingCopyFileBean(recordsfromfile:Record[]) pre: !database.include(recordsfromfile) & ! recordsfromfile->exist pre: !database.include(recordsfromfile) & ! recordsfromfile->exist pos: database.includ(recordsfromfile) & recordsfromfile->exist pos: database.includ(recordsfromfile) & recordsfromfile->exist

16 SQA plan PurposeReferencesManagementDocumentations Standard, Practices, Conventions, and Metrics Review and Audits Test, Tools, Techniques, and Methodologies Problem Reporting and Corrective Action Training Risk Management

17 SQA plan – Phase III documentation deliverables Web tutorials (general concepts) Installation guidance Reusable parts

18 Test plan – test cases DatabaseURLDatabaseDriverLogon Update the data information Delete unwanted product from table Use database table bean Use draw chart bean Use Copy File bean To use the Draw Chart bean

19 References “Software Formal Inspections”, Software Assurance Technology Center (SATC), 1997, http://satc.gsfc.nasa.gov/fi/fipage.html http://satc.gsfc.nasa.gov/fi/fipage.html “NASA Software Formal Inspections Guidebook”, NASA,1993, http://satc.gsfc.nasa.gov/Documents/fi/gdb/fitext.txt http://satc.gsfc.nasa.gov/Documents/fi/gdb/fitext.txt Weiss and Kimbrough Inspection Materials, A. R. Weiss and K. Kimbrough, 1995, http://www2.ics.hawaii.edu/~johnson/FTR/Weiss/weiss http://www2.ics.hawaii.edu/~johnson/FTR/Weiss/weiss 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

20 Questions? Questions?


Download ppt "Database Java Beans Feng Chen. Outline Design (diagrams) Formal specification (OCL model) Software quality assurance plan Test plan Formal technical inspection."

Similar presentations


Ads by Google