Question: 7 AFIZZY PROBLEM Write a method named fizzBuzz. Given an int n, return the number followed by !. So the int 6 returns 6!. Except

 7 AFIZZY PROBLEM Write a method named fizzBuzz. Given an int

7 AFIZZY PROBLEM Write a method named fizzBuzz. Given an int n, return the number followed by "!". So the int 6 returns "6!". Except if the number is divisible by 3 use "Fizz" instead of the number, and if the number is divisible by 5 use "Buzz", and if divisible by both 3 and 5, use "FizzBuzz". Do not put the quotes around your result . input of 1"1!" input of 2 "2!" . input of 3 "Fizz!" 8 ANOTHER FIZZY PROBLEM Write a method named fizzBuzz. Given an input string str, if the string starts with "f" (either upper or lowercase), return "Fizz". If the string ends with "b" (either upper or lowercase), return " Buzz". If both the "f" and "b" conditions are true, return "FizzBuzz". In all other cases, return the string unchanged. Do not put the quotes around your result . input of "fig" + "Fizz" . input of "dib""Buzz" input of "fib" "FizzBuzz" 9 THE PARTY PROBLEM Write a method named partyOn. We are having a party with amounts of tea and crumpets Return the outcome of the party as "sad", "pleasing" or "brilliant". A party is pleasing if both tea and crumpets are at least 5. However, if either tea or crumpets is at least double the amount of the other one, the party is brilliant. However, in all cases, if either tea or crumpets is less than 5, the party is always sad. Do not put the quotes around your result . input of 6, 8 "pleasing" . input of 3, 8"sad" . input of 20, 6"brillliant" 10 THE SPECIAL SUM PROBLEM Write a method named specialSum. Return the sum of the two int arguments, a and b However, "teen" values in the range 13. .19 inclusive, are extra lucky. So if either value is a teen, just return 19 . input of 3, 47 . input of 10, 1319 . input of 13, 219

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!