Advertisement
squelch

UML CS100 ASS1

Aug 7th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. @startuml
  2. interface DisplayPrompt <<interface>> {
  3. string command
  4. string prompt
  5. string output
  6. __
  7. virtual void display()
  8. }
  9. class ParseCmd {
  10. string command
  11. vector <Command> parsed_commands
  12. __
  13. void parseCmd(command, parsed_commands)
  14. void runCmd(parsed_commands)
  15. }
  16. class Command {
  17. string verb
  18. vector <string> parameters
  19. __
  20. void thisTask()
  21. }
  22. class Command_Connector {
  23. type connector
  24. Command prevCmd
  25. Command nextCmd
  26. __
  27. runAnd(prevCmd, nextCmd)
  28. runOr(prevCmd, nextCmd)
  29. }
  30. class CommandMap {
  31. std::map <string, enum> verblist
  32. std::map <enum, functions> functions
  33. }
  34. class Print {
  35. string output
  36. __
  37. void display()
  38. }
  39. class ShowPrompt {
  40. string prompt
  41. __
  42. void display()
  43. }
  44. class ShowOutput {
  45. string output
  46. __
  47. void display()
  48. }
  49.  
  50.  
  51. CommandMap "1" *-- "many" Command : aggregates >
  52. DisplayPrompt --> ParseCmd
  53. Command --|> Command_Connector
  54. ParseCmd --> CommandMap
  55. Print --|> ShowPrompt
  56. Print --|> ShowOutput
  57. Command --> ShowOutput : displays output via >
  58. DisplayPrompt --> Print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement