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

 

abraskin@mbusd.org > darkKnightProtectsGotham
prev  |  next  |  chance

You are Bruce Wayne. You have to decide if you should be out patrolling Gotham as Batman or be seen publicly as Bruce Wayne.


If the Bat Signal is lit by Commissioner Gordon then Batman must meet him right away - return "Go meet the Commissioner"

Otherwise, unless there is a party at Wayne Manor, if a super-villain has been loose in Gotham for more than 1 day, you should be out in the city as the Dark Knight! - return "Batman dawns his cape and cowl"

The rest of the time Bruce Wayne must show the world his "Party Boy image" so return "Bruce Wayne, Gotham's most eligible bachelor"

darkKnightProtectsGotham(5, false, false) → "Batman dawns his cape and cowl"
darkKnightProtectsGotham(0, false, false) → "Bruce Wayne, Gotham's most eligible bachelor"
darkKnightProtectsGotham(2, false, false) → "Batman dawns his cape and cowl"

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

public String darkKnightProtectsGotham(int superVillainLooseDays, boolean batSignalLit, boolean partyAtWayneManor) { }

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

Copyright Nick Parlante 2017 - privacy