Содержание
- 2. 4/1/05 Readings Any Java text on packages E.g. Just Java 1, in Chapter 5
- 3. 4/1/05 Packages in Java A collection of related classes that form a library Also, packages in
- 4. 4/1/05 Packages in Java (reminders) Putting classes into packages. At top of file: package edu.virginia.cs494 No
- 5. 4/1/05 Compiling and Running To compile: javac Example: javac edu\uva\cs494\Foo.java To run: java Run-time starts looking
- 6. 4/1/05 jar files Bundles package directory structure(s) into one file Like a zip file Easier to
- 7. 4/1/05 UML and Packages UML supports a way to group model elements Calls this a package.
- 8. 4/1/05 UML Packages and Java For Java, want to show: What packages exist What’s in them
- 9. 4/1/05 Drawing Packages in UML Symbol looks like folder icon Name in tab or in “body”
- 10. 4/1/05 UML Component Diagrams UML also has a diagram to show components And also deployment diagrams:
- 11. 4/1/05 Principles of Package Design How to group classes? How to analyze a package? General principles
- 12. 4/1/05 REP: Release/Reuse Equivalency Princple We reuse packages not individual classes One reason to create a
- 13. 4/1/05 CCP: Common Closure Principle Classes in a package should be closed against the same kind
- 14. 4/1/05 CRP: Common Reuse Principle Classes in a package are reused together. If you reuse one
- 15. 4/1/05 ADP: Acyclic Dependencies Princple Allow no cycles in the package dependency graph. When cycles exist
- 16. 4/1/05 SDP: Stable Dependencies Principle Depend in the direction of stability. A package should not depend
- 17. 4/1/05 SAP: Stable Abstractions Principle A package should be as abstract as it is stable How
- 18. 4/1/05 Package Metrics Tool: JDepend Tool that processes Java packages and provides package-level metrics Benefits (from
- 19. 4/1/05 JDepend Metrics (1) Number of Classes and Interfaces number of concrete and abstract classes (and
- 20. 4/1/05 JDepend Metrics (2) Abstractness (A) ratio of the number of abstract classes (and interfaces) to
- 21. 4/1/05 JDepend Metrics (3) Instability (I) ratio of efferent coupling (Ce) to total coupling (Ce +
- 22. 4/1/05 JDepend Metrics (4) Distance from the Main Sequence (D) perpendicular distance of a package from
- 24. Скачать презентацию