123456789101112131415161718192021222324252627282930 |
-
- /**
- * Write a description of class FizzBuzz here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class FizzBuzz
- {
- public Integer input;
-
- public FizzBuzz(Integer input)
- {
- this.input = input;
- }
-
- public boolean getFizzBuzz(){
- return (input%15 == 0);
- }
-
- public boolean getFizz(){
- return (input%3 == 0);
- }
-
- public boolean getBuzz(){
-
- return (input%5 == 0);
- }
- }
|