faiaz-halim

Class diagram

Mar 18th, 2024
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1.  
  2. User
  3. ☐ credentials: UserCredentials
  4. actions: UserActions
  5. location: UserLocation
  6. ⚫ login(username, password): bool logout(): None
  7. ⚫ updateProfile(newDetails): None
  8. • searchForPath(criteria): Path
  9. • markFavoritePath(path): None
  10. • viewPathDetails(path): None
  11. • getRecommendedPaths(): List[Path> • findRestroom(): Restroom .findFoodPlace(): Food Place
  12. C) UserCredentials
  13. ☐ userID: int
  14. username: String
  15. □ password: String
  16. email: String
  17. ⚫ login(username, password): bool logout(): None
  18. ☐ age: int
  19. C) UserActions
  20. ☐ skiLevel: String
  21. ☐ preferredDifficulty: String favoritePaths: List[Path>
  22. ⚫ updateProfile(newDetails): None • searchForPath(criteria): Path
  23. • markFavoritePath(path): None
  24. • viewPathDetails(path): None
  25. • getRecommended Paths(): List[Path>
  26. • findRestroom(): Restroom
  27. ⚫ findFoodPlace(): Food Place
  28. C PathFinder
  29. p: SkiResortMap
  30. • findBestPath(start, end): Path
  31. ⚫ collaborateWithMap(map): None
  32. C PathFilter
  33. □ skiResortMap: SkiResortMap
  34. • filterPaths(difficulty Level): List[Path]
  35. ⚫ collaborateWithMap(map): None
  36. C) UserLocation
  37. lastKnownLocation: Waypoint
  38. ⚫ updateLocation(newLocation): None
  39. FoodPlace
  40. ☐ cuisineType: String seatingCapacity: int hasOutdoorSeating: boolean
  41. ⚫ getCuisineType(): String .getSeatingCapacity(): int
  42. ⚫ hasOutdoorSeating(): boolean
  43. C Restroom
  44. ☐ cleanlinessRating: int hasBabyChangingStation: boolean
  45. • getCleanlinessRating(): int
  46. O hasBabyChangingStation(): boolean
  47. A Amenity
  48. location: Waypoint
  49. ☐ name: String
  50. ⚫ getLocation(): Waypoint
  51. ⚫ getName(): String
  52. c) SkiResort Map
  53. paths: List[Path] amenities: List[Amenity]
  54. ⚫ findRoute(start Waypoint, endWaypoint): Path
  55. • filterPathsByDifficulty(difficultyLevel): List[Path]
  56. • searchForAmenity(type, location): Amenity
  57. decomposes
  58. C) Path
  59. □ waypoints: List[Waypoint>
  60. ☐ slope: Slope
  61. difficultyLevel: String
  62. ☐ length: float
  63. ☐ additionalAttributes: ...
  64. ⚫ calculate Distance(); float
  65. ⚫ getDifficultyLevel(): String O getSlope Details(): Slope
  66. ☐ liftID: int
  67. □ name: str
  68. Lift
  69. ☐ type: str
  70. □ capacity: int
  71. □ status: str
  72. schedule: dict
  73. ⚫ getStatus(): str
  74. • getSchedule(): dict
  75. ⚫ updateStatus(newStatus: str): None
  76. ⚫ calculateWaitTime(): float
  77. ⚫ getDistanceToLift(userLocation: Waypoint): float
  78. • boardLift(user: User): None
  79. ⚫ unloadPassengers(): None
  80. C) Slope difficultyLevel: String length: float
  81. incline: float
  82. additionalAttributes: ...
  83. ⚫ calculateIncline(): float
  84. • getDifficultyLevel(): String
  85. ⚫ getLength(): float
  86. C Waypoint
  87. ☐ coordinates: Tuple[float, float]
  88. name: String
  89. ⚫ getCoordinates(): Tuple[float, float]
  90. ⚫ getName(): String
Advertisement
Add Comment
Please, Sign In to add comment