id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

bBallWinner


Write a method that accepts information about two Basketball teams including their names and the scores they had on a recent game they played against each other. Return the appropriate string that reports the results of the game. Look at the test data for further information.


bBallWinner("Bulldogs", 59, "Pterodactyls", 32) → "The Bulldogs won!"
bBallWinner("Unicorns", 70, "Polar Bears", 71) → "The Polar Bears won!"
bBallWinner("Kiwis", 84, "Tazmanian Devils", 84) → "It was a tie game!"

...Save, Compile, Run (ctrl-enter)

public String bBallWinner(String teamName1, int teamScore1, String teamName2, int teamScore2) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 290

Copyright Nick Parlante 2017 - privacy