/Users/johnr/Desktop/IA pdf Downloads/Criteria__P__-_Coding_Project_Upload_all_2022-05-03/Motto_CSIA_04_25/src/main/java/com/mycompany/motto_csia/exerciseHistory.java |
1
2 nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
3 nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
4
5 package com.mycompany.motto_csia;
6
7 import java.util.ArrayList;
8 import java.util.LinkedList;
9
10
11
12 @author
13
14 public class exerciseHistory {
15 private String exerciseHistoryName = "";
16
17
18
19 private ArrayList<String> exerciseDates = new ArrayList<String>();
20 private ArrayList<String> weightUnits = new ArrayList<String>();
21 private ArrayList<Integer> reps = new ArrayList<Integer>();
22 private ArrayList<Double> weight = new ArrayList<Double>();
23
24
25 public exerciseHistory(String exerciseHistoryName){
26 this.exerciseHistoryName = exerciseHistoryName;
27 }
28
29 public String getExerciseHistoryName(){
30 return exerciseHistoryName;
31 }
32
33 public void addSet(String inputDate, String inputWeightUnit, int inputReps, double inputWeight){
34 exerciseDates.add(inputDate);
35 weightUnits.add(inputWeightUnit);
36 reps.add(inputReps);
37 weight.add(inputWeight);
38 }
39
40 public void removeSet(int index){
41 exerciseDates.remove(index);
42 weightUnits.remove(index);
43 reps.remove(index);
44 weight.remove(index);
45 }
46
47 public ArrayList getExerciseDates(){
48 return exerciseDates;
49 }
50
51 public ArrayList getWeightUnits(){
52 return weightUnits;
53 }
54
55 public ArrayList getReps(){
56 return reps;
57 }
58
59 public ArrayList getWeight(){
60 return weight;
61 }
62
63 public void getExerciseHistory(int index){
64 System.out.println(exerciseDates.get(index));
65 System.out.println(weightUnits.get(index));
66 System.out.println(reps.get(index));
67 System.out.println(weight.get(index));
68 }
69
70
71 }
72