Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 3 #134

Closed
wants to merge 16 commits into from
Closed

3 3 #134

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Java CI

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 22
uses: actions/setup-java@v3
with:
java-version: '22'
distribution: 'temurin'

- name: Build with Maven
run: mvn clean install

- name: Run tests
run: mvn test
16 changes: 0 additions & 16 deletions .github/workflows/close-pr.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .idea/.gitignore

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

9 changes: 9 additions & 0 deletions .idea/4156-Miniproject-2024-Students-Java.iml

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

27 changes: 27 additions & 0 deletions .idea/checkstyle-idea.xml

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

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

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

18 changes: 18 additions & 0 deletions .idea/compiler.xml

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

6 changes: 6 additions & 0 deletions .idea/encodings.xml

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

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

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

17 changes: 17 additions & 0 deletions .idea/misc.xml

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

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

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

29 changes: 29 additions & 0 deletions IndividualProject/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Java CI

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'

- name: Build with Maven
run: mvn clean install

- name: Run tests
run: mvn test

1 change: 1 addition & 0 deletions IndividualProject/Citations.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.blog/enterprise-software/ci-cd/build-ci-cd-pipeline-github-actions-four-steps/
33 changes: 33 additions & 0 deletions IndividualProject/bugs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
** Bug 1~4 are found during testing, therefore no names identified by a static analyzer.
** The rest are found by running PMD

Bug 1
# Location: Course.java
# Problem: getCourseLocation() and getInstructorName() return the wrong String.
Exchanged the two strings.

Bug 2
# Location: Course.java
# Problem: enrollStudent() always returns False.
Fixed by adding a conditional statement.

Bug 3
# Location: Course.java
# Problem: dropStudent() always returns False.
Fixed by adding a conditional statement.

Bug 4
# Location: Course.java
# Problem: isCourseFull() has wrong logic.

Bug 5
# Name: ConstructionCallsOverridableMethod
# Location: MyFileDatabase.java
# Problem: caused by deSerializeObjectFromFile() which is overridable
Fixed by changing it from Public to Private

Bug 6
# Name: ReturnEmptyCollectionRatherThanNull
# Location: MyFileDatabase.java
# Problem: deSerializeObjectFromFile() returns Null which could makes NullPointerException
Fixed by changing Return null to returning an empty hashmap
Binary file added IndividualProject/data.txt
Binary file not shown.
15 changes: 15 additions & 0 deletions IndividualProject/honesty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
I, <Jeremy Qu (jq2406)>, have read and understood the following:

1. CS department's Policies and Procedures on Academic Honesty
2. The Course Specific Academic Honesty Policies
3. The assignment specs outlining the consequences of not submitting this pledge and other aspects of the policy

I affirm that I will abide by all the policies stated in the relevant materials from above. I understand that the relevant policies apply to: individual assignments, group projects, and individual examinations.

I also affirm that I understand that all course materials, with the exception of the individual/group project, are subject to the appropriate copyrights and thus will not post them on any public forum or publicly hosted repository, this includes but is not limited to: GitHub, stackoverflow, chegg etc.

I also affirm that I will be 100% honest when evaluating the performance of myself and my teammates when prompted by an assignment or member of the teaching staff.

Finally I affirm that I will not attempt to find any loopholes in these policies for the benefit of myself or others enrolled in the course presently or possibly in the future.

Signed: <Jeremy Qu(jq2406)> <09/26/2024>
Loading
Loading