Datasets:

ArXiv:
License:
File size: 1,863 Bytes
c574d3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package model;

public class Exercise {

    public String name;
    public double caloriesBurned; //calories burned per hour
    public double time;


    /**
     * Default constructor
     */
    public Exercise(){}

    /**
     * The constructor for a single Exercise
     * @param name - A String for the exercise name
     * @param caloriesBurned - a double for the number of calories burned per hour
     */
    public Exercise(String name, double caloriesBurned){
        this.name = name;
        this.caloriesBurned = caloriesBurned;
    }

    /**
     * Sets the name of the exercise
     * @param name - The new String name of the exercise
     */
    public void setName(String name){
        this.name = name;
    }

    /**
     * Gets the current name of the exercise
     * @return - String name
     */
    public String getName(){
        return name;
    }

    /**
     * Sets the calories burned per hours for this exercise
     * @param caloriesBurned - The new double value
     */
    public void setCaloriesBurned(double caloriesBurned){
        this.caloriesBurned = caloriesBurned;
    }

    /**
     * Get's the current value for calories burned per hour
     * @return - Double value
     */
    public double getCaloriesBurned(){
        return caloriesBurned;
    }

    public void setTime(double time) {
        this.time = time;
    }

    public double getTime() {
        return time;
    }

    /**
     * Function to make the object into a string formatted for the csv
     * @return A string formatted for the csv representing the exercise object
     */
    public String buildCSVFormat() {
        return "e," + name + "," + caloriesBurned;
    }

    public Exercise copy() {
        Exercise exerciseCopy = new Exercise(name, caloriesBurned);
        exerciseCopy.time = time;
        return exerciseCopy;
    }


}