Skip to content

Commit 78e23e1

Browse files
authored
updated and renamed project sol code
1 parent 6808881 commit 78e23e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

8-structures/Structured Exercise Regimen/ExerciseRegimen.swift 8-structures/Structured Exercise Regimen/Exercise.swift

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Write your code below 💪
2+
13
struct Exercise {
24
var name: String
35
var muscleGroups: [String]
@@ -14,7 +16,7 @@ struct Exercise {
1416
}
1517
}
1618

17-
var pushUp = Exercise(name: "Push Up", muscleGroups: ["Triceps", "Chest", "Shoulders"], reps: 10, sets: 3)
19+
var pushUp = Exercise(name: "Push up", muscleGroups: ["Triceps", "Chest", "Shoulders"], reps: 10, sets: 3)
1820

1921
struct Regimen {
2022
var dayOfWeek: String
@@ -25,7 +27,7 @@ struct Regimen {
2527
self.exercises = exercises
2628
}
2729

28-
func exercisePlan() {
30+
func printExercisePlan() {
2931
print("Today is \(self.dayOfWeek) and you're going to:")
3032
for exercise in self.exercises {
3133
print("Do \(exercise.sets) sets of \(exercise.reps) \(exercise.name)s")
@@ -36,5 +38,5 @@ struct Regimen {
3638

3739
var mondayRegimen = Regimen(dayOfWeek: "Monday", exercises:[pushUp])
3840

39-
mondayRegimen.exercisePlan()
41+
mondayRegimen.printExercisePlan()
4042

0 commit comments

Comments
 (0)