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

 

jebbert@volusia.k12.fl.us > StarWarsRatings
prev  |  next  |  chance

Write a method that returns Mr. Ebbert's rating of the various Star Wars movies, given their episode number. For non-existant episodes return zero. My ratings on a scale of 1-10 are as follows: Ep1=4, Ep2=6, Ep3=8, Ep4=11, Ep5=10, Ep6=9. All other episodes do not exist and should return zero.


StarWarsRatings(5) → 10
StarWarsRatings(4) → 11
StarWarsRatings(6) → 9

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

public int StarWarsRatings(int episodeNumber) { }

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: 250

Copyright Nick Parlante 2017 - privacy