Skip to content

Commit

Permalink
Merge Conflict Solved?
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Mar 5, 2026
2 parents 04558b2 + ca87572 commit 1b3bf7e
Show file tree
Hide file tree
Showing 53 changed files with 1,502 additions and 31 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "25"
cache: maven

- run: mvn -B test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
.vscode/
.idea/
helpmehelpapplication/target
.target/
.helpmehelpapplication\target/
.helpmehelpapplication\.idea/
9 changes: 0 additions & 9 deletions .idea/Prosjekt-Repo.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "interactive",
"java.compile.nullAnalysis.mode": "disabled"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Planned core functionalities (3–4 will be fully implemented):


## Technology Stack
- **Programming Language:** Java
- **Programming Language:** Java 25
- **Application Type:** Desktop application
- **UI:** JavaFX
- **Database:** Relational database
Expand Down
Binary file added docs/Møtedokumenter/Team Meeting 1.pdf
Binary file not shown.
Binary file added docs/Use_Case/Organization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Use_Case/Use_Case_uml.docx
Binary file not shown.
File renamed without changes
Binary file added docs/sequence_diagram/Org_Onboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sequence_diagram/Organization_message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions helpmehelpapplication/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ci

on:
push:
branches: main
pull_request:
branches: main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribition: temurin
java-version: "25"
cache: maven
- run:
mvn -B test
2 changes: 2 additions & 0 deletions helpmehelpapplication/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
target/
File renamed without changes.
15 changes: 15 additions & 0 deletions helpmehelpapplication/.idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
7 changes: 7 additions & 0 deletions helpmehelpapplication/.idea/dictionaries/project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
6 changes: 2 additions & 4 deletions .idea/misc.xml → helpmehelpapplication/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml → helpmehelpapplication/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions helpmehelpapplication/helpmehelpapplication.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="CheckStyle-IDEA-Module" serialisationVersion="2">
<option name="activeLocationsIds" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package ntnu.sytemutvikling.team6;

public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/**
* 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.ArrayList;
import java.util.List;
import java.util.UUID;

public 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;

/* List that contains the charity's Feedbacks */
private List<Feedback> feedbacks;

/**
* 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.feedbacks = new ArrayList<>();
this.category = category;
}

/** Getters for the charity's attributes. */
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;
}

/** Setter for verification status. This one sets the charity as verified. */
public void setVerified() {
this.isVerified = true;
}

/** Setter for verification status. This one sets the charity as unverified. */
public void setUnverified() {
this.isVerified = false;
}

/**
* Setter for total donations. This method is used to update the total donations when a new
* donation is made.
*/
public void setTotalDonations(int amount) {
this.totalDonations += amount;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package ntnu.sytemutvikling.team6.models;

import java.util.*;

public class CharityRegistry {
private final List<Charity> charities;

public CharityRegistry() {
this.charities = new ArrayList<>();
}

public List<Charity> getAllCharities() {
return Collections.unmodifiableList(charities);
}

public Optional<Charity> findCharityById(UUID charityId) {
if (charityId == null) {
throw new IllegalArgumentException("CharityId can not be null.");
}
return charities.stream().filter(charity -> charityId.equals(charity.getId())).findFirst();
}

public void addCharity(Charity charity) {
if (charity == null) {
throw new IllegalArgumentException("Charity can not be null.");
}
charities.add(charity);
}

public boolean removeCharity(UUID charityId) {
if (charityId == null) {
throw new IllegalArgumentException("CharityId can not be null.");
}
return charities.removeIf(charity -> charityId.equals(charity.getId()));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package ntnu.sytemutvikling.team6.models;

import java.time.LocalDateTime;
import java.util.UUID;
import ntnu.sytemutvikling.team6.models.user.User;

public class Donation {
/* UUID for uniquely identifying each donation */
private UUID charityId;

/* Ammount of money donated */
private double amount;

/* Date and time of the donation */
private LocalDateTime date;

/* The charity that received the donation */
private Charity charity;

/* The user/donor that made the donation */
private User donor;

/** Is the donation made anonymously? This can be null if the donation was made anonymously. */
private boolean isAnonymous;

/**
* Constructor for creating a new donation. The charityId is generated automatically using UUID.
* If the donation is made anonymously, the isAnonymous parameter is set to true.
*
* @param amount
* @param date
* @param charity
* @param donor
*/
public Donation(double amount, LocalDateTime date, Charity charity, User donor) {
this.charityId = UUID.randomUUID();
this.amount = amount;
this.date = date;
this.charity = charity;
this.donor = donor;
this.isAnonymous = donor.getSettings().isAnonymous();
}

/* Getters for the donation's attributes */
public boolean isAnonymous() {
return isAnonymous;
}

public UUID getCharityId() {
return charityId;
}

public double getAmount() {
return amount;
}

public LocalDateTime getDate() {
return date;
}

public Charity getCharity() {
return charity;
}

public User getDonor() {
return donor;
}
}
Loading

0 comments on commit 1b3bf7e

Please sign in to comment.