public class Category extends Object implements Serializable
| Constructor and Description |
|---|
Category() |
Category(String name)
Creates a new instance of Category with a given name.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a copy of this category.
|
String |
getName()
Returns the name of the category
|
Subcategory |
getSubcategory()
Returns the Subcategory object for this category
|
void |
setName(String name)
Sets the name of the category
|
void |
setSubcategory(Subcategory subcategory)
Sets the Subcategory object for this category
|
String |
toString() |
public Category()
public Category(String name)
name - Name of the category.public String getName()
public void setName(String name)
name - Sets the name of the categorypublic Subcategory getSubcategory()
public void setSubcategory(Subcategory subcategory)
subcategory - Sets the Subcategory object for this categorypublic Object clone()
Copyright © 2025. All rights reserved.