-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataRangeItem.java
More file actions
72 lines (65 loc) · 1.4 KB
/
DataRangeItem.java
File metadata and controls
72 lines (65 loc) · 1.4 KB
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
/**
* DataRangeItem.java created by wenxiyang on MacBook Pro in a2
*
* Author: Wenxi Yang(wyang235@wisc.edu)
* Date: @date
*
* Course: CS400
* Semester: Spring 2020
* Lecture: 001
*
* IDE: Eclipse IDE for Java Developers
* Version: 2019-12 (4.14.0)
* Build id: 20191212-1212
*
* Device: Wenxi’s MacBook Pro
* OS: MacOS Mojave
* Version: 10.14.4
* OS Build: 18E226
*
* List Collaboratons: Name, email@wisc.edu, lecture number
*
* Other Credits: describe other sources(web sites or people)
*
* Known bugs: describe known unsolved bugs here
*/
/**
* DataRangeItem - TODO Describe purpose of this user-defined type
* @author Wenxi Yang (2020)
*
*/
public class DataRangeItem extends MilkItem{
/** The percent. */
private int percent;
/**
* @param date
* @param farmID
* @param weight
*/
public DataRangeItem(String date, String farmID, int weight, int percent) {
super(date, farmID, weight);
this.percent = percent;
}
/**
* Gets the percent.
*
* @return the percent
*/
public int getPercent() {
return percent;
}
/**
* Sets the percent.
*
* @param percent the new percent
*/
public void setPercent(int percent) {
this.percent = percent;
}
public static String getTitles() {
return "farmID, weight, percentage";
}
public String getValueString() {
return this.getFarmID() + "," + this.getWeight() + "," + percent;
}
}