-
Notifications
You must be signed in to change notification settings - Fork 0
Class diagram
Fredrik Jonathan Marjoni edited this page Feb 19, 2026
·
9 revisions
@startuml
' ===== HmH Domain Model (aligned with wireframe search page) =====
abstract class User {
- int userId
- Boolean status
- String name
- String email
- String passwordHash
+ getUserId() : int
+ getStatus() : Boolean
+ getName() : String
+ getEmail() : String
+ getPasswordHash() : String
+ register()
+ login()
+ logout()
+ updateProfile()
{abstract} + makeDonation() : Donation
+ {redefines} toString() : String
}
class Admin {
- {inherited} super User
+ addOrganization(orgNumber : int) : boolean
+ removeOrganization(orgNumber : int) : boolean
+ removeCustomer(userId : int) : boolean
}
class Customer {
- {inherited} super User
- List<orgNumber> preferredCauses
- Hashmap<Localdate, Donation> donationLog
+ getPreferredCauses() : List<orgNumber>
+ getDonationLog() : Hashmap<Localdate, Donation>
}
class Organization {
- int orgNumber
- String name
- boolean trusted
- String websiteURL
- boolean isPreApproved
+ getOrgNumber() : int
+ getName() : String
+ isTrusted() : boolean
+ getWebsiteURL() : String
+ isPreApproved() : boolean
+ {redefines} toString() : String
}
class OrganizationRegister {
- Hashmap<orgNumber, Organization> searchPage
+ getAllOrganizations() : List<Organization>
+ getOrganization(orgNumber : int) : Organization
+ searchOrganizationByName(name : String) : Organization
+ filterByVerificationStatus(isTrusted : boolean) : List<Organization>
}
class Donation {
-int donationId
-User user
-Organization organization
-BigDecimal amount
-Date date
-String paymentMethod
+ getDonationId() : int
+ getUser() : User
+ getOrganization() : Organization
+ getAmount() : BigDecimal
+ getDate() : Date
+ getPaymentMethod() : String
}
class IKVerification {
-int verificationId
-String status
-Date lastChecked
-String source ' API or CSV
}
' ===== Relationships =====
User <|-- Customer : inherits
Customer <.. Donation : uses
Donation ..> Organization : uses
Organization ..> Customer : uses (maybe)
Customer <.. OrganizationRegister : uses (maybe)
Admin --|> User : inherits
Admin <.. OrganizationRegister : uses
Admin <.. Donation : uses (maybe)
Admin <.. IKVerification : uses (maybe)
Admin <.. Organization : uses (maybe)
OrganizationRegister *-- Organization : composition
OrganizationRegister <.. IKVerification : uses
@enduml
📘 Project Wiki
Last updated: April 2026
Maintained by (BIDATA) Team 5 in the course IDATT1005