From abcc56163443bc05905a1498307359ca665b771f Mon Sep 17 00:00:00 2001 From: Nahum Gessesse <99192972+nahumguess@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:44:27 -0600 Subject: [PATCH 1/8] README initial commit. Will be updated as code gets pushed --- README.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ac5a299..3d56840 100644 --- a/README.md +++ b/README.md @@ -1 +1,40 @@ -# softeng-health-club-app \ No newline at end of file +# SoftEng Health Club Membership Management System + +## Table of Contents +- [About the App](#about-the-app) +- [Technologies Used](#technologies-used) +- [Implementation Details](#implementation-details) +- [Testing Details](#testing-details) +- [Known Bugs](#known-bugs) +- [About the Team](#about-the-team) +- [Contact Information](#contact-information) +- [License](#license) + +## About the App +The SoftEng Health Club is known for its commitment to member satisfaction. It aims to enhance its services with a new membership management system. As the club grows, it seeks to streamline operations and improve communication with its members. This system will help SoftEng efficiently manage memberships, handle renewals, and support better member engagement. With a focus on maintaining its reputation for excellent service. This new system will ensure both staff and members enjoy a smooth experience. The system will be designed to handle various membership durations, notify members of upcoming renewals, and allow for on-the-spot membership renewals and sign-up. Additionally, it will offer tools for the club’s management to monitor member activity and generate reports for operational decisions. The following document outlines the complete design needed to meet these objectives and ensure smooth operation for both members and staff. The SoftEng Health Club's suggested membership management system is made to specifically address the demands of both the club and its customers. This solution will increase membership satisfaction by emphasizing automation, user experience, and data insights through specialized latent tasks. + +## Technologies Used +- **Java**: Primary programming language for backend development. +- **MySQL**: Database management system for storing and retrieving all membership data. + +## Implementation Details +[To be completed] + +## Testing Details +[To be completed] + +## Known Bugs +[To be noted] + +## About the Team +This project is developed by a dedicated team of software engineering students from the COMP330 course. The team has embraced the challenge of developing a robust membership management system and has shown exceptional commitment to continuous improvement and clear communication. + +## Contact Information +For more details about the project, or to reach out with questions or suggestions, please contact the following team members: +- **Nahum Gessesse** - Developer +- **Xander Estevez** - Developer +- **Manali Deb** - QA/Technical Writer +- **Alina Zacaria** - Tech Lead +- **Andrew Do** - Developer +- **Nick Calhoun** - Developer +- **Jai Fischer** - Developer From b199f6fbf5a1328c046441b240ae1b6a3810435f Mon Sep 17 00:00:00 2001 From: Nahum Gessesse <99192972+nahumguess@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:44:48 -0600 Subject: [PATCH 2/8] Update README.md - remove license section --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 3d56840..c9fcb89 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ - [Known Bugs](#known-bugs) - [About the Team](#about-the-team) - [Contact Information](#contact-information) -- [License](#license) ## About the App The SoftEng Health Club is known for its commitment to member satisfaction. It aims to enhance its services with a new membership management system. As the club grows, it seeks to streamline operations and improve communication with its members. This system will help SoftEng efficiently manage memberships, handle renewals, and support better member engagement. With a focus on maintaining its reputation for excellent service. This new system will ensure both staff and members enjoy a smooth experience. The system will be designed to handle various membership durations, notify members of upcoming renewals, and allow for on-the-spot membership renewals and sign-up. Additionally, it will offer tools for the club’s management to monitor member activity and generate reports for operational decisions. The following document outlines the complete design needed to meet these objectives and ensure smooth operation for both members and staff. The SoftEng Health Club's suggested membership management system is made to specifically address the demands of both the club and its customers. This solution will increase membership satisfaction by emphasizing automation, user experience, and data insights through specialized latent tasks. From a93466daa1064b952291ee2dc600f45e06b3ae71 Mon Sep 17 00:00:00 2001 From: Alina Zacaria Date: Fri, 29 Nov 2024 14:20:35 -0600 Subject: [PATCH 3/8] refined line count metrics --- .github/workflows/ci.yml | 77 ++++++++++++---------------------------- 1 file changed, 23 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be95f50..ccd3913 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,5 @@ -name: Java Swing CI with MySQL +name: Java CI with LOC Counting -# Trigger the workflow on pushes to main and pull requests to main on: push: branches: @@ -10,64 +9,34 @@ on: - main jobs: - ci: + build: runs-on: ubuntu-latest - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: root_password - MYSQL_DATABASE: test_db - MYSQL_USER: user - MYSQL_PASSWORD: user_password - ports: - - 3306:3306 - options: >- - --health-cmd="mysqladmin ping --silent" - --health-interval=30s - --health-timeout=5s - --health-retries=3 - steps: - # Step 1: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v3 - - # Step 2: Set up Java Development Kit (JDK) - - name: Set up JDK 11 - uses: actions/setup-java@v3 + # Checkout the code + - name: Checkout code + uses: actions/checkout@v2 + + # Cache Maven dependencies + - name: Cache Maven dependencies + uses: actions/cache@v2 with: - java-version: '11' - distribution: 'adoptopenjdk' - - # Step 3: Install MySQL client (if needed for testing connection) - - name: Install MySQL client - run: sudo apt-get install mysql-client + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/*.java') }} + restore-keys: | + ${{ runner.os }}-maven- - # Step 4: Build the Java application with Maven or Gradle + # Build with Maven (check for compilation errors) - name: Build with Maven run: mvn clean install + + # Run Checkstyle (static code analysis) + - name: Run Checkstyle + run: mvn checkstyle:check - # Step 5: Run tests (unit tests and integration tests) - - name: Run tests - run: mvn test - - # Step 6: (Optional) Package your app into a JAR file - - name: Package application - run: mvn package - - # Step 7: Run integration tests with MySQL - - name: Run integration tests with MySQL + # Count Lines of Code using cloc + - name: Count Lines of Code run: | - echo "Waiting for MySQL to be ready..." - sleep 30 # Wait for MySQL to be ready (or use a better method for health check) - mvn verify -P integration-tests - - # Secrets can be used for sensitive data like MySQL password and username. - env: - MYSQL_HOST: 127.0.0.1 - MYSQL_PORT: 3306 - MYSQL_USER: user - MYSQL_PASSWORD: user_password - MYSQL_DB: test_db + sudo apt-get update + sudo apt-get install -y cloc + cloc --exclude-dir=target --quiet . # Exclude 'target' directory to avoid counting compiled files From b3a33b3950a091c30951b31b94def034eea685b5 Mon Sep 17 00:00:00 2001 From: Alina Zacaria Date: Fri, 29 Nov 2024 14:28:12 -0600 Subject: [PATCH 4/8] maven file --- pom.xml | 64 ++++++++++ target/checkstyle-cachefile | 2 + target/checkstyle-checker.xml | 177 +++++++++++++++++++++++++++ target/checkstyle-result.xml | 3 + target/maven-archiver/pom.properties | 3 + 5 files changed, 249 insertions(+) create mode 100644 pom.xml create mode 100644 target/checkstyle-cachefile create mode 100644 target/checkstyle-checker.xml create mode 100644 target/checkstyle-result.xml create mode 100644 target/maven-archiver/pom.properties diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..5e0aeca --- /dev/null +++ b/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + com.example + loc-counting + 1.0-SNAPSHOT + jar + + Java LOC Counting + Project to count Lines of Code and run static analysis + http://example.com + + + + com.puppycrawl.tools + checkstyle + 8.45 + plugin + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.1.0 + + + + check + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.1.0 + + + + + + 1.8 + 1.8 + + diff --git a/target/checkstyle-cachefile b/target/checkstyle-cachefile new file mode 100644 index 0000000..8e17bf1 --- /dev/null +++ b/target/checkstyle-cachefile @@ -0,0 +1,2 @@ +#Fri Nov 29 14:27:34 CST 2024 +configuration*?=2A3257BC3DFCB9863B7B6609A03404712ED001EA diff --git a/target/checkstyle-checker.xml b/target/checkstyle-checker.xml new file mode 100644 index 0000000..35826d1 --- /dev/null +++ b/target/checkstyle-checker.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/target/checkstyle-result.xml b/target/checkstyle-result.xml new file mode 100644 index 0000000..7e142e4 --- /dev/null +++ b/target/checkstyle-result.xml @@ -0,0 +1,3 @@ + + + diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..e8b507f --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +artifactId=loc-counting +groupId=com.example +version=1.0-SNAPSHOT From 6b12ef58c14891c8cbc4c3bdd57e8ab96389e6b9 Mon Sep 17 00:00:00 2001 From: Nick Calhoun Date: Tue, 26 Nov 2024 17:51:41 -0600 Subject: [PATCH 5/8] initial commit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c9fcb89..03ba0fa 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,4 @@ For more details about the project, or to reach out with questions or suggestion - **Alina Zacaria** - Tech Lead - **Andrew Do** - Developer - **Nick Calhoun** - Developer -- **Jai Fischer** - Developer +- **Jai Fischer** - Developer From 3c59dd9939282fd2b393b84a093f2bb118640192 Mon Sep 17 00:00:00 2001 From: Nick Calhoun Date: Fri, 22 Nov 2024 12:01:44 -0600 Subject: [PATCH 6/8] people class created --- People.java | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 People.java diff --git a/People.java b/People.java new file mode 100644 index 0000000..9c783b5 --- /dev/null +++ b/People.java @@ -0,0 +1,32 @@ +import java.time.LocalDate; + +public class Person { + public String first_name; + public String last_name; + public String email_address; + public LocalDate date_of_birth; + public long phone_number; + + public Person(){} + public Person(String firstName, String lastName, String emailAddress, LocalDate birthDate, long phoneNumber) { + first_name = firstName.toLowerCase(); + last_name = lastName.toLowerCase(); + email_address = emailAddress.toLowerCase(); + date_of_birth = birthDate; + phone_number = phoneNumber; + } + + public String getFirstName(){return first_name;} + public String getLastName(){return last_name;} + public String getName(){return first_name.toUpperCase().charAt(0)+first_name.substring(1) + " " + last_name.toUpperCase().charAt(0)+last_name.substring(1);} + public String getEmailAddress(){return email_address;} + public LocalDate getBirthDate(){return date_of_birth;} + public long getPhoneNumber(){return phone_number;} + + public String toString(){ + return getName() + " -> {\n\t" + + date_of_birth.toString() + "\n\t" + + "Email: " + email_address + "\n\t" + + "Phone Number" + phone_number + "\n}"; + } +} \ No newline at end of file From 6eba4ae7c2952c7d40c5fd739e53fb308a84aa67 Mon Sep 17 00:00:00 2001 From: andrewdo Date: Fri, 29 Nov 2024 14:59:09 -0600 Subject: [PATCH 7/8] added member class --- Member.java | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Member.java diff --git a/Member.java b/Member.java new file mode 100644 index 0000000..bd5d664 --- /dev/null +++ b/Member.java @@ -0,0 +1,33 @@ +import java.time.LocalDate; + +public class Member extends Person { + + public Long id_number; + public LocalDate creation_date; + public LocalDate expiration_date; + public LocalDate last_checked_in; + + public Member(){super();} + public Member(String firstName, String lastName, String emailAddress, LocalDate birthDate, long phoneNumber) { + super(firstName, lastName, emailAddress, birthDate, phoneNumber); + } + + public void setIdNumber(long number) {id_number = number;} + public void setCreationDate(LocalDate date) {creation_date = date;} + public void updateLastCheckedIn() {last_checked_in = LocalDate.now();} + public void updateExpirationDate(LocalDate date) {expiration_date = date;} + + public long getIDNumber() {return id_number;} + public LocalDate getCreationDate(){return creation_date;} + public LocalDate getExpirationDate(){return expiration_date;} + public LocalDate getLastCheckedInDate(){return last_checked_in;} + + public String toString(){ + return "MEMBER: " + getName() + " -> {\n\t" + + "Id Number: " + id_number + "\n\t" + + "Membership Created on: " + creation_date.toString() + "\n\t" + + "Membership Expires on: " + expiration_date.toString() + "\n\t" + + "Last Checked in on: " + last_checked_in.toString() + "\n\t" + + "Email: " + id_number + "\n}"; + } +} \ No newline at end of file From 146c440afa7890fe46028c4ac8e1e266305fc2f5 Mon Sep 17 00:00:00 2001 From: Alina Zacaria <120036218+alina-z7@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:20:57 -0600 Subject: [PATCH 8/8] Revert "added member class" This reverts commit 6eba4ae7c2952c7d40c5fd739e53fb308a84aa67. --- Member.java | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 Member.java diff --git a/Member.java b/Member.java deleted file mode 100644 index bd5d664..0000000 --- a/Member.java +++ /dev/null @@ -1,33 +0,0 @@ -import java.time.LocalDate; - -public class Member extends Person { - - public Long id_number; - public LocalDate creation_date; - public LocalDate expiration_date; - public LocalDate last_checked_in; - - public Member(){super();} - public Member(String firstName, String lastName, String emailAddress, LocalDate birthDate, long phoneNumber) { - super(firstName, lastName, emailAddress, birthDate, phoneNumber); - } - - public void setIdNumber(long number) {id_number = number;} - public void setCreationDate(LocalDate date) {creation_date = date;} - public void updateLastCheckedIn() {last_checked_in = LocalDate.now();} - public void updateExpirationDate(LocalDate date) {expiration_date = date;} - - public long getIDNumber() {return id_number;} - public LocalDate getCreationDate(){return creation_date;} - public LocalDate getExpirationDate(){return expiration_date;} - public LocalDate getLastCheckedInDate(){return last_checked_in;} - - public String toString(){ - return "MEMBER: " + getName() + " -> {\n\t" - + "Id Number: " + id_number + "\n\t" - + "Membership Created on: " + creation_date.toString() + "\n\t" - + "Membership Expires on: " + expiration_date.toString() + "\n\t" - + "Last Checked in on: " + last_checked_in.toString() + "\n\t" - + "Email: " + id_number + "\n}"; - } -} \ No newline at end of file