preliminary object-oriented design clickermatic software clicker
TRANSCRIPT
![Page 1: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/1.jpg)
Preliminary Object-Oriented Design
Clickermatic Software Clicker
![Page 2: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/2.jpg)
Client Software
![Page 3: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/3.jpg)
Summary View of Client Architectural Design
ClientController Timer
UserInterface
Historian
NetworkInterface
DefaultProtocol
Question
ConnectionManager
Protocol <<interface>>
Historian.Record
TimerListener <<interface>>
1
1
1
1
1
1
1
1
1
1
1
1
1
0..n
1
1
1
1
![Page 4: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/4.jpg)
Question
- number: int- text: string- reference: string- timeToAnswer: int+ QUESTION_TYPE_MULTIPLE_CHOICE: int+ QUESTION_TYPE_NUMERIC: int+ QUESTION_TYPE_SHORT_ANSWER: int
Detail View: Question Class Diagram
![Page 5: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/5.jpg)
Historian
- NUMBER_OF_QUESTIONS_TO_TRACK: int- numberOfQuestionsAnsweredCorrectly: int- numberOfQuestionsAnsweredIncorrectly: int- records: list<Historian.Record>
+ resetTallies(): void+ addQuestionAnswerRecord(questionNumber: int, clientAnswer:
string, answerIsCorrect: boolean, timeTakenToAnswerQuestion: int, correctAnswer: string)
Detail View: Historian Class Diagram
![Page 6: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/6.jpg)
Historian.Record
- questionNumber: int- clientAnswer: Answer- answerIsCorrect: boolean- timeTakenToAnswerQuestion: int- correctAnswer: Answer
Detail View: Historian.Record Class Diagram
![Page 7: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/7.jpg)
Detail View: Connection State Diagram
Connecting ConnectedNot
Connected
Connection receives user’s name and
server’s IP address
connection attempt fails (for example,
times out)
connection ends
Connection sends or receives data
server forms TCP connection with
Connection
![Page 8: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/8.jpg)
ConnectionManager
- networkInterface: NetworkInterface- protocol: Protocol- serverIPAddress: string- serverPortNumber: int
+ logIn(name: string): void+ sendAnswerChoice(questionNumber: int, answer: string)+ close(): boolean+ isOpen(): boolean
Detail View: ConnectionManager Class Diagram
![Page 9: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/9.jpg)
NetworkInterface
Attributes are implementation-dependent.
+ openConnection(name: String, address: string, portNumber: int): void
+ sendBytes(bytesToSend: byte[]): void+ closeConnection(): void+ connectionIsOpen(): boolean
Detail View: NetworkInterface Class Diagram
![Page 10: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/10.jpg)
Protocol <<interface>>
+ toNetworkBytes(questionNumber: int, answer: string): byte[]+ getQuestionNumberFromNetworkBytes(bytes: byte[]): int+ getQuestionTypeFromNetworkBytes(bytes: byte[]): int+ getAnswerChoicesFromNetworkBytes(bytes: byte[]): list<string>+ getTimeLimitFromNetworkBytes(bytes: byte[]): int
Detail View: Protocol Class Diagram
![Page 11: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/11.jpg)
DefaultProtocol
+ toNetworkBytes(questionNumber: int, answer: string): byte[]+ getQuestionNumberFromNetworkBytes(bytes: byte[]): int+ getQuestionTypeFromNetworkBytes(bytes: byte[]): int+ getAnswerChoicesFromNetworkBytes(bytes: byte[]): list<string>+ getTimeLimitFromNetworkBytes(bytes: byte[]): int
Detail View: DefaultProtocol Class Diagram
![Page 12: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/12.jpg)
Detail View: Timer State Diagram
Counting Down
ExpiredNot
Running
time limit set
timer started
countdown stopped
timer reset
time = zero
![Page 13: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/13.jpg)
Timer
- time: int- running: boolean- timerListeners: set<TimerListener>
+ expired(): boolean+ addTimerListener(newListener: TimerListener): void+ updateTimerListeners(): void
Detail View: Timer Class Diagram
![Page 14: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/14.jpg)
TimerListener <<interface>>
+ setTimeRemaining(time: int): void
Detail View: TimerListener Class Diagram
![Page 15: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/15.jpg)
ConnectionManager
Get Answer Choice for Question
Detail View: ClientController Inter-Class Use-Case Diagram
Timer
Update Time Remaining
UserInterface
Inform of Answer Choice
Update User Interface
UserInterface
Log In
ConnectionManagerSubmit Answer
Choice
![Page 16: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/16.jpg)
ClientController
- connection: Connection- userInterface: UserInterface- timer: Timer- inTallyMode: boolean- currentQuestion: Question
+ askQuestion(question: Question): void+ setTimeRemaining(time: int): void+ submitAnswerChoice(string): void+ main(args: string[]): void
Detail View: ClientController Class Diagram
![Page 17: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/17.jpg)
UserInterface
- clientController: ClientController
Operations have yet to be determined. They will likely be only update-UI-with-data-from-the-ClientController operations.
Detail View: UserInterface Class Diagram
![Page 18: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/18.jpg)
Server Software
![Page 19: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/19.jpg)
Summary View of Server Architectural Design
0..500Controller
Timer
UserInterface
QuestionSet
Question
Connection
Protocol
Server
Statistics
SetStatistics
ConnectionHandler1 1
1
QuestionHandler1
1
1
1
1
1
0..n
1
1
1
1
1
1
1
1
1
![Page 20: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/20.jpg)
Server
- main()
Detail View: Question Class Diagram
![Page 21: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/21.jpg)
Controller
- connection: Connection- userInterface: UserInterface- timer: Timer- questionSet: QuestionSet
-establishConnections();-loadQuestions();
Detail View: Controller Class Diagram
![Page 22: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/22.jpg)
QuestionSet
-questions[] Question
Detail View: QuestionSet Class Diagram
![Page 23: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/23.jpg)
UserInterface
-questions[] Question
-getInstanceOf-displayIntroScreen-displayX-displayY-update
Detail View: UserInterface Class Diagram
![Page 24: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/24.jpg)
UserInterface
-runningTotal
Detail View: Statistics Class Diagram
![Page 25: Preliminary Object-Oriented Design Clickermatic Software Clicker](https://reader030.vdocuments.site/reader030/viewer/2022032806/56649eff5503460f94c156cb/html5/thumbnails/25.jpg)
Detail View: Controller State Diagram
Determining Detials
Showing Question
Waiting forQuestion Set
User load’s a Question Set
User or Timer requests a switch to a different Question (aka: Question ends)
User starts server
Editing Question Set
User opens Question Editor
User exits Question Editor
User closes serverUser closes current Question Set
Question Set Ends With Set Statistic Disabled
Showing Set Statistics
Question Set Ends With Set Statistic Enabled
User exits set statisticsController called by
main()
User exits Server
Program
Question ends with Question
Statistic Enabled
Showing Question and
Statistics
User Exits Statistics (and it is not a Poll)
User starts a Live Poll
User exits Live Poll
(Version 2)