/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  * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 3  * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 4  */
 5 package com.mycompany.motto_csia;
 6 
 7 import java.util.ArrayList;
 8 import java.util.LinkedList;
 9 
10 /**
11  *
12  * @author 15245
13  */
14 public class exerciseHistory  {
15     private String exerciseHistoryName = "";
16     
17     //Arraylists are created to store lists of data for each instance of an exercise
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){ //Method to simplify adding sets to an exercsie
34         exerciseDates.add(inputDate);
35         weightUnits.add(inputWeightUnit);
36         reps.add(inputReps);
37         weight.add(inputWeight);
38     }
39     
40     public void removeSet(int index){ //Method to simplify removing sets from an extercise
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){ //Method used for testing
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