<<

Final Exam

• Friday, December 14, 11AM • Closed book, closed notes, clean desk • Content: Final Exam Review ✦Textbook: Chapters 1, 2, 4-10

CS 4354 ✦Java Lectures, GRASP + JUnit Fall 2012 • 35% of your final grade Jill Seaman • I recommend using a pencil (and eraser) • I will bring extra paper and stapler, in case they are needed.

1 2

Ch 1: Introduction: Exam Format Object-oriented analysis, design, implementation

• 150 points total • Object-oriented analysis: finding+describing domain objects ✦Multiple choice questions ✦concepts ✦Drawing UML diagrams • Object-oriented design: design software objects to fulfill system ✦Writing programs/functions/code requirements ✦Tracing code (what is the output) ✦class diagram ✦Short answer (like Assignments 1 and 4) • Object-oriented programming/implementation ✦Java classes

• Each question will indicate how many points it is worth

3 4 Ch 2: Modeling with UML: Ch 2: Modeling with UML: Modeling concepts UML diagrams

• System model: set of all models built during development • Use Case Diagrams ✦Actors, relationships: communication, inclusion, extension, inheritance • Three models of a software system: ✦Functional Model: functionality from users point of view (use case • Class Diagrams diagrams) ✦Classes, attributes, operations, objects, links/associations ✦Object Model: structure of the system (class diagrams) ✦unidirectional, bidirectional associations, roles, multiplicity ✦Dynamic Model: behavior of the system (sequence diagrams, state ✦Aggregation, composition, qualification, inheritance diagrams, activity diagrams) • Interaction Diagrams • application domain: all aspects of customer’s “problem” ✦Sequence diagrams (and communication/collaboration diagrams) ✦object-oriented analysis: models this domain • Activity Diagrams • solution domain: modeling space of all possible solutions ✦Activities, control flow, decisions, forks and joins, swimlanes ✦object-oriented design: models this domain • State Machine Diagrams

5 ✦State is a node, event is a directed edge labeled: Event[Guard] / Action 6

Java: Introduction Java: Input/Output

• Compilation, execution (byte code) • Reading from the keyboard • Features ✦use EasyIn or scanner ✦Object-oriented, inheritance, polymorphism, garbage collection • Writing to the screen (formatting) ✦Exception handling, concurrency, Persistence, platform independence • Object serialization • Objects are references (pointers) ✦ObjectInputStream, ObjectOutputStream • Types: ✦readObject, writeObject ✦Primitive types ✦arrays ✦classes, methods • Operators, assignment, control flow ✦Similar to ++

7 8 Java: Inheritance Java: Exceptions and Threads

• Composition • Exceptions • Inheritance ✦Semantics (how exceptions are thrown/caught), syntax ✦hierarchy, superclass, subclass, ✦Catch or specify requirement ✦overriding methods, upcasting, constructors ✦finally block • Polymorphism ✦Runtime exceptions ✦upcasting, extensibility • Threads • Abstract methods and classes ✦Thread class, Runnable interface • Interfaces ✦Using the above to implement multi-threading ✦ ✦Multiple inheritance Thread methods ✦Sorting: implementing Comparable ✦Extending an interface

9 10

Ch 4-5: OO Software Development: Ch 6: System design: Requirements elicitation and analysis Decomposing the system

• Requirements Elicitation • Concepts ✦Functional vs Nonfunctional requirements, quality ✦Subsystems, subsystem interfaces ✦Activities: Identifying actors, scenarios, use cases, relationships ✦Coupling and cohesion, layers+partitions (no architectural styles!) • Analysis Activities (from use cases to objects) • System Design Activities ✦Identifying Entity Objects, Boundary Objects, Control Objects ✦Identifying Design Goals: five groups of criteria: ✦Mapping Use Cases to Objects with Sequence Diagrams - Performance - Dependability ✦Identifying Associations, Aggregations, Attributes - Cost ✦Modeling Inheritance Relationships - Maintenance ✦Modeling State-Dependent Behavior of Individual Objects - End user criteria. ✦Reviewing the Analysis Model ✦Identifying Subsystems

11 12 Ch 7: System design: Ch 8: Object design: Addressing design goals Reusing pattern solutions

• Concepts • Concepts ✦Deployment diagrams ✦Specification Inheritance vs Implementation Inheritance, Delegation • System Design Activities • Design Patterns ✦Mapping subsystems to processors and components ✦Bridge Pattern ✦Composite Pattern ✦Identifying and storing persistent data ✦Adapter Pattern ✦Observer Pattern ✦Providing access control ✦Strategy Pattern ✦Proxy Pattern ✦Designing global control flow ✦Abstract Factory Pattern ✦Facade Pattern ✦Identifying boundary conditions ✦Command Pattern ✦Reviewing system design

13 14

Ch 9: Object design: Specifying Interfaces Ch 10: Mapping models to code

• Concepts • Concepts ✦Class implementor, user, extender (developer roles) ✦Four types of transformations: ✦Invariants, preconditions, postconditions (contracts) ✦Model transformations, refactoring, forward engineering, reverse engineering ✦Object Constraint Language (OCL) • Activities • Activities ✦Mapping associations to collections ✦Specifying pre and post-conditions - Unidirectional one-to-one associations ✦Specifying invariants - Bidirectional one-to-one associations. ✦Inheriting contracts: when you can weaken or strengthen the conditions in - Bidirectional one-to-many associations the subclasses. - Bidirectional many-to-many associations ✦Mapping contracts to exceptions (implementing pre-post-conditions, invariants)

15 16 Extra topics Office Hours

• GRASP ✦Deciding which classes should perform which operations Day Date Time ✦Information Expert, Creator, Low Coupling, High Cohesion, Controller M 12/10 None (or by appt) • JUnit ✦Framework for writing and running unit tests T 12/11 2:30-4pm ✦ Provides automation W 12/12 1-2:30pm ✦Be able to write a simple test case, using assertEquals() or assertTrue(), etc. Th 12/13 1-2:30pm

F 12/14 None (exams)

17 18