12.1. Combine conditional expressions.
12.1.1. In the Car class, add a private method that indicates whether passengers can be carried:
boolean canPassengersBeCarried(). The method should return true if
the driver is available (isDriverAvailable) and there is fuel.
Refactoring (part 12)
- 14
Locked
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
dnlklnhfr
23 July 2020, 17:26
Dear CodeGym-Team:
What is wrong with a ternary-Operator for Requirement #2?
The validator rejected this super simple solution. 0