in Java Language Write the method dateFashion(). * * You and your date are trying to get a table at * a restaurant. The parameter "you" is the stylishness * of your clothes, in the range 0..10, and "date" is * the stylishness of your date's clothes. The result * getting the table is encoded as an int value with 0 = no, * 1 = maybe, and 2 = yes. * * If either of you is very stylish, (8 or more), then * the result is 2 (yes). With the exception that if * either of you has style of 2 or less, then the result * is 0 (no). Otherwise the result is 1 (maybe). * * Some examples: * dateFashion(5, 10) returns 2 * dateFashion(5, 2) returns 0 * dateFashion(5, 5) returns 1 * * @param you the style quotient for your clothes. * @param date the style quotient for your date's clothes. * @return chances of getting a table (0-no, 1-maybe, 2-yes).
in Java Language
Write the method dateFashion().
*
* You and your date are trying to get a table at
* a restaurant. The parameter "you" is the stylishness
* of your clothes, in the range 0..10, and "date" is
* the stylishness of your date's clothes. The result
* getting the table is encoded as an int value with 0 = no,
* 1 = maybe, and 2 = yes.
*
* If either of you is very stylish, (8 or more), then
* the result is 2 (yes). With the exception that if
* either of you has style of 2 or less, then the result
* is 0 (no). Otherwise the result is 1 (maybe).
*
* Some examples:
* dateFashion(5, 10) returns 2
* dateFashion(5, 2) returns 0
* dateFashion(5, 5) returns 1
*
* @param you the style quotient for your clothes.
* @param date the style quotient for your date's clothes.
* @return chances of getting a table (0-no, 1-maybe, 2-yes).

Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images









