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

 

srp4379@lausd.net 2-logic1regular > museumTour
prev  |  next  |  chance

public boolean museumTour(int numberPeople, boolean isWeekend)

During the week, a museum tour is allowed if the number of people in a tour is 10 or larger.
However, on the weekend, a tour must have at least 20 participants.

Given:
An integer value representing the # of tour participants, and
A boolean value indicating whether it's the weekend or not.
Return true if the museum tour is allowed, false if it's not.


museumTour(5, false) → false
museumTour(10, false) → true
museumTour(20, true) → true

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

public boolean museumTour(int numberPeople, boolean isWeekend) { }

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

Copyright Nick Parlante 2017 - privacy