-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCategory.java
More file actions
30 lines (23 loc) · 747 Bytes
/
Category.java
File metadata and controls
30 lines (23 loc) · 747 Bytes
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
public class Category {
private int categoryID;
private String categoryName;
// No default; I don't want the ability to create a non-specific category
public Category(int categoryID, String categoryName) {
this.categoryID = categoryID;
this.categoryName = categoryName;
}
// Getter and Setter for categoryID
public int getCategoryID() {
return this.categoryID;
}
public void setCategoryID(int categoryID) {
this.categoryID = categoryID;
}
// Getter and Setter for categoryName
public String getCategoryName() {
return this.categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
}