CPlusOOP
SiteMap
OO Analysis
Problem Analysis
Model Refinement
«Prev
Next»
OO-Design
Problem Analysis
Review PLC
Purpose Scope Analysis
Problem Domain Classes
Identify Classes Objects
Class Diagram Notation
Diagram Associations
Basic Object Modeling
Multiplicity OO Modeling
Define Constraints
Modeling Aggregation
Modeling Composition
Modeling Generalization
Advanced Associations
Qualifiers Reduce Multiplicity
Many to ManyAssociations
Problem Analysis Conclusion
Sequence Diagrams
Sequence Diagram Notation
Applying Sequence Diagram
Applying Sequence Diagram-Quiz
Modeling Sequences Scenarios
Mapping Events Objects
Interfaces, events ,operations
Discover Attribute Information
Sequence Diagram - Conclusion
Interaction Diagram - Quiz
Model Reconciliation
Reconcile Sequence Diagrams
Test Interfaces
Model Refinement
Refactoring Patterns
Encapsulation Principles
Cohesion Coupling Defined
Attribute Responsibility Allocation
Class Description Operations
Refining Object Conclusion
Cohesion and coupling - Exercise
Cohesion and coupling revisited
Course project: improving cohesion and reducing coupling
Objective:
Refactor a design to improve cohesion and coupling.
Exercise scoring
This exercise is worth a total of 20 points.
Background/overview
This is the 12th exercise in the course project.
Download files
No downloadable files are required to complete this exercise.
Instructions
Below you will find definitions for the Show and Promotion objects. Included in both of these definitions is the purpose for the object, as well as a list of the responsibilities assigned to that object. Reassign the responsibilities to support the best reuse and divisio labor among the objects. It may require you to create new classes or simply redistribute responsibilities. Remember to apply the principles of cohesion and coupling to arrive at the best configuration.
Initial Definition Show
Purpose:
Define a single presentation of an event.
Responsibility:
Set th date and time of the performance.
Show promotion
Purpose:
Define the pricing strategy for a show.
Responsibility:
Define the price tiers that will be offered in the show. Set the minimum and maximum number of seats that should be assigned to each price tier.
Define the discounts that will be offered. Set the maximum number of seats that an individual customer can purchase (prevent ticket scalping).
Terminology
Price tier:
A set of price types and prices applied to a section of seats. For example, good seats might go for $50 for adults and $25 for children (one price tier), while balcony seats might sell for $20 for adults and $10 for children (another price tier).
Discount:
A percentage reduction in the sale price based on either the number of tickets purchased or the total value of the tickets purchased.
Submitting your exercise
Enter your response in the text box below.
Submit