-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalphabetRow.java
More file actions
executable file
·81 lines (70 loc) · 1.41 KB
/
alphabetRow.java
File metadata and controls
executable file
·81 lines (70 loc) · 1.41 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
73
74
75
76
77
78
79
80
81
/**
*
* @author Jude Murphy
*
*/
public class alphabetRow
{
private int leaf;
private char charFromFile;
private String code;
private double totalNum;
private double weightedFrequency;
public alphabetRow()
{
leaf = 0;
charFromFile = 'a';
totalNum = 1.0;
weightedFrequency = 0.0;
code = "00000000";
}
public alphabetRow(char charFromFile, double totalNum, double weightedFrequency, int leaf, String code)
{
this.leaf = leaf;
this.charFromFile = charFromFile;
this.totalNum = totalNum;
this.weightedFrequency = weightedFrequency;
this.code = code;
}
public char getcharFromFile()
{
return charFromFile;
}
public void setcharFromFile(char charFromFile)
{
this.charFromFile = charFromFile;
}
public double gettotalNum()
{
return totalNum;
}
public void settotalNum(double totalNum)
{
this.totalNum = totalNum;
}
public double getweightedFrequency()
{
return weightedFrequency;
}
public void setweightedFrequency(double weightedFrequency)
{
this.weightedFrequency = weightedFrequency;
}
public int getLeaf() {
return leaf;
}
public void setLeaf(int leaf) {
this.leaf = leaf;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
@Override
public String toString()
{
return charFromFile + " " + code + " " + leaf;
}
}