1 / 20

Database Java Beans

Database Java Beans. Feng Chen. Outline. Design (diagrams) Formal specification (OCL model) Software quality assurance plan Test plan Formal technical inspection. Design. Use case diagram Class diagram Sequence diagram. Design – Use case diagram. Design – Class diagram.

Télécharger la présentation

Database Java Beans

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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] Username : String Default[null] Password : String Default[null] Tablename : String Default[null] Control : connectionButton : JButton Properties : connectToTable : Boolean Default[false] connectToFile : Boolean Default[false] connectToChart : Boolean Default[false] inv correctInput : valid(username, password) & valid( DBUrl) implies isopen(connection) inv unique username: 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 post: self.connection-> exist & self.connection = connectionClass.getConnection()

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

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

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

  16. SQA plan • Purpose • References • Management • Documentations • 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 • DatabaseURL • DatabaseDriver • Logon • 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 • “NASA Software Formal Inspections Guidebook”, NASA,1993, 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 • 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?

More Related