public class Rating
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Rating()
The constructor
|
Rating(float rating,
int numberOfVotes)
The constructor used to create a instance of the rating class
|
Modifier and Type | Method and Description |
---|---|
int |
getNumberOfVotes()
Used to get the number of votes the thing been rated had
|
float |
getRating()
Used to get the rating value
|
void |
setNumberOfVotes(int numberOfVotes)
Used to set the number of votes
|
void |
setRating(float rating)
Used to set the rating
|
public Rating()
public Rating(float rating, int numberOfVotes)
rating
- The value of the ratingnumberOfVotes
- the number of votes the thing been rated hadpublic void setRating(float rating)
rating
- The ratingpublic void setNumberOfVotes(int numberOfVotes)
numberOfVotes
- The number of votespublic float getRating()
public int getNumberOfVotes()