本次作业聚焦于“流媒体战争(Streaming Wars)”系统的设计与实现。目标是将您的架构设计转化为可运行的 Java 代码,建模所需的类、属性、方法及其关系,以模拟流媒体服务之间的交互。

Submission Guidelines
- Individual submission is mandatory; group submissions are not allowed.
Upload the following to Canvas:
2025-06-A3.zip
containing all Java source code files.class_diagram.pdf
: Updated UML Class Diagram incorporating new requirements.sequence_diagram.pdf
: UML Sequence Diagram capturing the behavior of key system operations.
- Notify instructors through Canvas or Ed Discussion before the deadline if you experience technical difficulties. Late alerts will not be accepted.
- Canvas uploads may be delayed; submit early and often. Multiple submissions are permitted.
Project Objectives
In earlier phases, you proposed a class structure for simulating the Streaming Wars environment. In this stage, you are expected to implement a working version in Java, adhering to object-oriented principles. The design should reflect clear class separation and reasonable modularization.
If modifications to your original design become necessary during implementation, document them clearly within your code. Also update the associated UML diagrams to reflect your final solution.
Your code will be evaluated based on functionality, structure, and adherence to specifications. Sample inputs and outputs will be provided; your submission must include source code that compiles and executes without modification.
System Requirements
Implement the following core features:
- Initialize the system with October 2020 as the starting month and year.
Enable creation of the following entities:
- Demographic groups
- Streaming services
- Movies
- Pay-Per-View (PPV) events
- Studios
- Allow streaming services to offer movies and PPV events.
- Support viewership of offerings by a portion of a demographic group.
- Enable time advancement to the next calendar month.
Calculate and display financial data for each demographic group, streaming service, and studio:
- For the current month
- For the previous month
- Cumulatively since the start of the program
A graphical interface is not required; output will be evaluated through the console.
Additional Design Requirements
Accounts and Demographic Groups
- The system tracks accounts rather than individual users.
- Accounts may represent families and are grouped into demographic categories (e.g., “age_40_50”).
Each demographic group has:
- A short name (identifier)
- A long name (description)
- A mutable number of accounts
- Spending data must be tracked per demographic group and must support reporting over the current, previous, and total time periods.
Watching Content and Transactions
When a demographic group watches content:
For movies: users pay the streaming service’s subscription fee.
- Subsequent views on the same service within the same month are free.
- For PPV events: users pay the event fee per view.
- Rewatching content is always free.
Track financial transactions for each demographic group and streaming service for:
- Current month
- Previous month
- Total duration of the simulation
Evaluation Criteria
Submissions will be assessed in four categories:
Code Submission
- Source code must compile and run in the designated environment (e.g., Docker).
- Avoid formatting errors and diagnostic output unrelated to specification.
Functional Correctness
- The application must execute the designated scenarios correctly using provided test files.
Code Structure
- Use a modular design with appropriate class separation.
- Avoid monolithic or unstructured implementations.
- Demonstrate application of object-oriented principles.
UML Artifacts
- Submit updated Class and Sequence Diagrams that reflect the final implementation and new requirements.
Your sequence diagram must illustrate the interactions for:
create_event
offer_event
watch_event
display_events
- Include enough placeholder objects to demonstrate relevant message flows.
Final Thoughts
This assignment is not only about functional correctness but also about applying clean design principles. Focus on distributing responsibilities appropriately across classes and documenting your design evolution. A thoughtful structure will serve as a strong foundation for upcoming group-based enhancements and GUI implementation phases.