Created
December 12, 2023 15:39
-
-
Save acgerhold/734e010dc63d07cd8b11006bef409aa3 to your computer and use it in GitHub Desktop.
KindleClassDiagram
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
'https://plantuml.com/class-diagram | |
class Users { | |
- name : String | |
- address : String | |
- email : String | |
} | |
class UserAccount { | |
- userId : String | |
- ownedBooks : List<Book> | |
- recentlyViewed : List<Book> | |
-- | |
- updateUserInfo() : void | |
} | |
enum MobileDevice { | |
- smartPhone | |
- Tablet | |
- Laptop | |
} | |
class Book { | |
- userRating : Double | |
- sampleBook : boolean | |
- paidBook : boolean | |
-- | |
+ getPaymentClient : Payment | |
+ downloadBook : Book | |
} | |
class Payment { | |
- paymentId : String | |
- amount : Double | |
-- | |
- processPayments() : void | |
- verifyMainUser(userId : String) : boolean | |
} | |
enum PaymentTypes { | |
- creditCard | |
- paypal | |
} | |
class Recommender { | |
- getRecommendedBooks(recentlyViewed : List<Book>) : List<Book> | |
- recommendToUser() : Book | |
} | |
Users *-- UserAccount | |
UserAccount o-- MobileDevice | |
MobileDevice o-- Book | |
UserAccount o-- Payment | |
UserAccount o-- Recommender | |
PaymentTypes o-- Payment | |
@enduml |
gcziprusz
commented
Dec 12, 2023
The relationship between PaymentTypes and Payment should be drawn the other way around PaymentTypes --o Payment
showing that Payment has-a PaymentTypes or Payment is composed of PaymentTypes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment