Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
32b4e52
Feat: added uml diagram
Bferg2002 Mar 6, 2026
6f63126
Initial commit
jayden-andrews Mar 6, 2026
a26e548
Implemented Enum
jayden-andrews Mar 6, 2026
1d7bbf4
Implemented Person Class
jayden-andrews Mar 6, 2026
973aabb
Feat: created workout class
Bferg2002 Mar 6, 2026
62ea84d
Feat: created workout class
Bferg2002 Mar 6, 2026
a9e7673
Resolved merge conflicts
Bferg2002 Mar 6, 2026
023e724
Feat: Added displayWorkoutInfo method to Workout class
Bferg2002 Mar 6, 2026
c6a0299
Feat: Added displayExerciseInfo method to Exercise class
Bferg2002 Mar 6, 2026
35e35be
Implemented signup
jayden-andrews Mar 6, 2026
4bdcb40
Merge remote-tracking branch 'origin/bryant-branch' into jayden-branch
jayden-andrews Mar 6, 2026
a2bb6bc
Finished most of initial fitness app implementation
jayden-andrews Mar 6, 2026
27aa312
Added helper methods for displaying the leaderboard
Bferg2002 Mar 6, 2026
f4be7b1
Added comments
jayden-andrews Mar 6, 2026
0f4af3b
Resolved all merge conflicts
jayden-andrews Mar 6, 2026
f969103
Feat: fixed password and add exercise bugs
Bferg2002 Mar 6, 2026
a2b5a49
Feat: Added a case to display all workouts, removed date field, fixed…
Bferg2002 Mar 7, 2026
e6ca2d6
Merge pull request #1 from Bferg2002/bryant-branch
Bferg2002 Mar 7, 2026
018eada
Feat: Added README.md to explain our Sprint Documentation
Bferg2002 Mar 10, 2026
e7272fc
Merge pull request #2 from Bferg2002/bryant-branch
Bferg2002 Mar 10, 2026
38282c6
Fixed typo in the README
Bferg2002 Mar 10, 2026
11f6d23
Merge pull request #3 from Bferg2002/bryant-branch
Bferg2002 Mar 10, 2026
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
77 changes: 77 additions & 0 deletions src/main/java/diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
@startuml

Class FitnessApp{
+ startApp(): void
}

Class Person{
- name: String
- email: String
- workouts: ArrayList<Workout>

+ getName(): String
+ setName(name: String): void

+ getEmail(): String
+ setEmail(email: String): void

+ getWorkouts(): ArrayList<Workout>
+ setWorkouts(workouts: ArrayList<Workout>): void
}

Class Workout{
- duration: String
- date: Date
- completed: boolean
- exercise: ArrayList<Exercise>

+ getDuration(): String
+ setDuration(duration: String): void

+ getDate(): Date
+ setDate(date: Date): void

+ getCompleted(): boolean
+ setCompleted(completed: boolean): void

+ getExercise(): ArrayList<Exercise>
+ setExercise(exercise: ArrayList<Exercise>): void

+ displayWorkoutInfo(): void
}

Class Exercise{
- type: WorkoutType
- name: String
- caloriesBurned: double

+ getType(): WorkoutType
+ setType(type: WorkoutType): void

+ getCaloriesBurned(): double
+ setCaloriesBurned(caloriesBurned: double): void
}

enum WorkoutType{
CHEST
BACK
SHOULDER
ARMS
CARDIO
LEGS
}

' Relationships
FitnessApp "1" --> "*" Person : manages users
' One fitness app can contain multiple people

Person "1" --> "*" Workout : performs
' A person can complete many workouts

Workout "1" --> "*" Exercise : contains
' A workout is made up of multiple exercises

Exercise --> WorkoutType : categorized by
' Each exercise belongs to one workout type

@enduml
61 changes: 61 additions & 0 deletions src/main/java/org/codedifferently/Exercise.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package org.codedifferently;

// Class that represents a single exercise
public class Exercise {

// The type of exercise (ex: cardio, strength, etc.)
private ExerciseType type;

// Name of the exercise (ex: Pushups, Running)
private String name;

// Number of calories burned during the exercise
private int caloriesBurned;

// Constructor used to create a new Exercise object
public Exercise(ExerciseType type, String name, int caloriesBurned) {
this.type = type; // set exercise type
this.name = name; // set exercise name
this.caloriesBurned = caloriesBurned; // set calories burned
}

// Returns the exercise type
public ExerciseType getType() {
return type;
}

// Updates the exercise type
public void setType(ExerciseType type) {
this.type = type;
}

// Returns the name of the exercise
public String getName() {
return name;
}

// Updates the name of the exercise
public void setName(String name) {
this.name = name;
}

// Returns the number of calories burned
public int getCaloriesBurned() {
return caloriesBurned;
}

// Updates the number of calories burned
public void setCaloriesBurned(int caloriesBurned) {
this.caloriesBurned = caloriesBurned;
}

// Displays the exercise information to the console
public void displayExerciseInfo() {
System.out.println("--------------------");
System.out.println("Exercise Information");
System.out.println("Name: " + name); // print exercise name
System.out.println("Type: " + type); // print exercise type
System.out.println("Calories Burned: " + caloriesBurned); // print calories burned
System.out.println();
}
}
23 changes: 23 additions & 0 deletions src/main/java/org/codedifferently/ExerciseType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.codedifferently;

// Enum representing the different categories of exercises a workout can include
public enum ExerciseType {

// Exercises that target chest muscles
CHEST,

// Exercises that target back muscles
BACK,

// Exercises that target shoulder muscles
SHOULDERS,

// Exercises that target arm muscles
ARMS,

// Exercises focused on cardiovascular endurance
CARDIO,

// Exercises that target leg muscles
LEGS
}
Loading