-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWord.java
More file actions
60 lines (50 loc) · 1.56 KB
/
Word.java
File metadata and controls
60 lines (50 loc) · 1.56 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
package com.simpleapps22.dholuo;
public class Word {
/**
* {@link Word} represents a vocabulary word that the user wants to learn.
* It contains resource IDs for the default translation, Dholuo translation, and audio file.
*/
/**
* Default translation for the word
*/
private final String mDefaultTranslation;
/**
* Dholuo translation for the word
*/
private final String mDholuoTranslation;
/**
* Audio resource ID for the word
*/
private final int mAudioResorceId;
/**
* Create a new Word object.
*
* @param defaultTranslation is the word in a language that the user is already familiar with
* (such as English)
* @param dholuoTranslation is the word in the Dholuo language
* @param audioResourceId is the resource ID for the audio file associated with this word
*/
public Word(String defaultTranslation, String dholuoTranslation, int audioResourceId) {
mDefaultTranslation = defaultTranslation;
mDholuoTranslation = dholuoTranslation;
mAudioResorceId = audioResourceId;
}
/**
* Get the default translation of the word.
*/
public String getDefaultTranslation() {
return mDefaultTranslation;
}
/**
* Get the Dholuo translation of the word.
*/
public String getDholuoTranslation() {
return mDholuoTranslation;
}
/**
* Return the audio resource ID of the word.
*/
public int getAudioResourceId() {
return mAudioResorceId;
}
}