From 8a45611c901d192d19fe62e76e902c352c0146e0 Mon Sep 17 00:00:00 2001 From: AdrianBalunan Date: Thu, 19 Feb 2026 10:45:15 +0100 Subject: [PATCH] Added git ignore to avoid pointless configs --- .gitignore | 2 + .../sytemutvikling/team6/models/Charity.java | 74 ++++++++++++++++++ .../sytemutvikling/team6/models/Charity.class | Bin 312 -> 1381 bytes 3 files changed, 76 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eafe2b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Adrian +/vscode diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java index 92ebbf1..cf86734 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java @@ -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; + } } diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class index 42f6e49d3e7e7a6647f5bf83abc35ab08a6f11ea..63dc161740a3f9d7bdd47a1a0657e0018a23056c 100644 GIT binary patch literal 1381 zcma)4%Tg0T6g{1U1d`z?_yCc&B*SBTAQmO1RRUJUinsu>a5p3)G)`u$Nrx&v!GCd~ zRi?CD_yK;D<>^l3G0uWb-`ltQoWA#*{{83YF917unnOyU7^tA-G|!aRXsJ{A!I#02 zqdd2=Qo|LV>goOEQgH1(20BMI=;(0Zx2trni5FKI_nj4&{EQO4i3uO&jd1o z+wcTNIwuCQry{cRtWfuwwMc$cG7JO;RH$5kI}BXCZwiRAKwdVhUL@a3kM!c5KyS@e z-ccBx31l~AAk}k$jpG08*Qu1M>~D+X<&nk>3xgOHNEb`hJZ|E44!79U)qyPB!8p5$ z+@Kyd^oSg-Sc;F`2Z6g5dXUxGJqtPX>TKFVUniTjkViq+<}Fz0*V%mw1LzePtjNII zZ8Z+PXx}~bje23t^{X^M@4Ll}I+j$)u3XnTD&BMCsWO!;Fm9a-Ir?vctM=r0Y1gj`QF&P2*)B1L1=3Jzk3>o9kph|4f8*xxZ?|G-!q6ZTRYllF2OQ+B$I z8NJNeD{U-%H8hJ{XARXNp+!DYBAtyfEMXkWn8FI?vC0#$YRGxR=8n&pCWXm#n<?DGx;@}sF;0Jh^(Duyd*vu~z!4@7Rfal`iokZ|sjCR3mlvk^rwKKH(!sWd2r_2xb b`VvF-T=KO92K`y$3>7lGNo06p#$5jkSrOlA delta 132 zcmaFLwS$T4)W2Q(7#J8_83ZPBxyiBFWaed-*fBCNYiNcsGO#%3r=)T*Ff(xSFt9SP zO`gdZJGq8Q*^7aJ5vT_!0;Ji2EPWsi7SYBtg;)K;7Ixk_VyyNb>@D Mj0}80l8J#I06cUMEC2ui