Target class Pursuer class Attributes Number of Xs Number of Ys Probability of Xs Probability of Ys Methods Initialization constructor Ability to determine Targets behavior during an interaction ID: 497598
Download Presentation The PPT/PDF document "Assignment Overview" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Assignment Overview
Target
class
Pursuer
class
Attributes:
Number of “X’s”
Number of “Y’s”Probability of “X’s”Probability of “Y’s”Methods:Initialization constructorAbility to determine Target’s behavior during an interaction
Attributes:Number of “X’s”Number of “Y’s”Probability of “X’s”Probability of “Y’s”Tally of successful interactionsMethods:Initialization constructorAbility to determine Pursuer’s behavior during an interactionDisplay report: after each interactionDisplay report: at very end
Manager
(functions)
Responsibilities:
Gets required information from the user (number interactions, probability of X-behavior).
Creates the Pursuer and Target
Runs the Pursuer’s and Target’s methods at the appropriate time.
Runs the simulated date for the specified number of interactions.Slide2
Each Round Of Interaction
Pursuer and the Target each determine the type of behavior exhibited (‘X’ or ‘Y’)
No. success!
Match = success
Mismatch = failureSlide3
Role Of The Manger
Creates Pursuer and Target
Runs the specified number of interactions
For each interaction round:
The Manager tells the Pursuer and Target to run appropriate behaviors for an interaction
Near the end of the simulation (interactions finished) the manager tells the Pursuer to generate the final report
Prompts the user for the required information (# interactions, probability of ‘X-behaviors’ (Target)