-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added git ignore to avoid pointless configs
- Loading branch information
AdrianBalunan
committed
Feb 19, 2026
1 parent
6bb96d8
commit 8a45611
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Adrian | ||
| /vscode |
74 changes: 74 additions & 0 deletions
74
helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java
This file contains 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,78 @@ | ||
| /** | ||
| * This class represents a charity organization. It contains information about the charity such as its name, description, total donations, verification status, and category. | ||
| * | ||
| * @author Adrian Balunan | ||
| */ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| abstract class Charity { | ||
| /* UUID for uniquely identifying each charity */ | ||
| private UUID id; | ||
|
|
||
| /* Name of the charity */ | ||
| private String name; | ||
|
|
||
| /* Description of the charity's mission and activities */ | ||
| private String description; | ||
|
|
||
| /* Total Donations received */ | ||
| private int totalDonations; | ||
|
|
||
| /* Is the charity verified? */ | ||
| private boolean isVerified; | ||
|
|
||
| /* Category for the charity */ | ||
| private String category; | ||
|
|
||
| /** | ||
| * Konstructor for creating a new charity. | ||
| * The ID is generated automatically using UUID. | ||
| * Total donations are initialized to 0. | ||
| * The charity is unverified by default. | ||
| * | ||
| * @param name | ||
| * @param description | ||
| * @param category | ||
| */ | ||
| public Charity(String name, String description, String category) { | ||
| this.id = UUID.randomUUID(); | ||
| this.name = name; | ||
| this.description = description; | ||
| this.totalDonations = 0; | ||
| this.isVerified = false; | ||
| this.category = category; | ||
| } | ||
|
|
||
| /** | ||
| * Getters for the charity's attributes. | ||
| * | ||
| * @return | ||
| */ | ||
| public UUID getId() { | ||
| return id; | ||
| } | ||
| public String getCategory() { | ||
| return category; | ||
| } | ||
| public String getName() { | ||
| return name; | ||
| } | ||
| public String getDescription() { | ||
| return description; | ||
| } | ||
| public int getTotalDonations() { | ||
| return totalDonations; | ||
| } | ||
| public boolean isVerified() { | ||
| return isVerified; | ||
| } | ||
|
|
||
| public void setVerified() { | ||
| this.isVerified = true; | ||
| } | ||
| public void setUnverified() { | ||
| this.isVerified = false; | ||
| } | ||
| } |
Binary file modified
BIN
+1.04 KB
(440%)
helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class
Binary file not shown.