6.4.14

Outlines for introduction of USE OCL tool

  • Where to Download?
  • Installation steps
    • JDK / JRE
    • Unzip the USE package
  • Starting the USE tool (use.bat)
  • Basics Screen Layout
  • Loading USE specification file (.use file) via the UI
    • Test a USE file with invalid syntax problem
  • Class diagram (UI)
    • Class name / Attributes / Methods / Associations (Role name, Multiplicities)
  • Object diagram (UI)
    • Create objects / Assign attributes / Adding associations / Removing associations
  • Structure checking (UI)
    • Create 6 Courses and 1 Student, link them up with “Taking” association via UI
    • Test the structure with State > Check structure now
    • Remove 1 Course from the Student
    • Check the structure again


  • Command prompt
    • !create - Create object
      • !create courseObj: Course
      • !create john: Student
    • !set - Assign object field value
      • !set john.name := ‘John Chan’
      • !set john.id := ‘12345678’
    • !insert - Link up objects with association
      • !insert (john, courseObj) into Taking
    • !delete - Remove objects link
      • !delete (john, courseObj) from Taking


  • Testing the pre-conditions and post-conditions of a method
    • !openter - Enter an operation and check the pre-conditions
      • !openter john enroll (courseObj)
      • !openter john drop (courseObj)
    • !opexit - Finish an operation and check the post-conditions


  • Further command prompt technique
    • Loading the USE specification (.use) file from command prompt
      • open C:\path_to_use_file\file.use
    • Running command file (.cmd file) file from command prompt
      • open C:\path_to_cmd_file\file.use
      • open C:\path_to_cmd_file\file.use

No comments: