Skip to content

Commit

Permalink
Fix function name case in SleepIn assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Jun 15, 2024
1 parent 445b198 commit e2ce88d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/src/main/java/assignments/booleans1/SleepIn.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ private static boolean sleepIn(boolean weekday, boolean vacation) {
return false; // return whether you should sleep in today.
}

private static void TestSleepIn(boolean weekday, boolean vacation, boolean expected) {
private static void testSleepIn(boolean weekday, boolean vacation, boolean expected) {
boolean result = sleepIn(weekday, vacation);
boolean pass = result == expected;
System.out.printf(
"SleepIn(%b, %b) -> %b | %b | %s \n",
"sleepIn(%b, %b) -> %b | %b | %s \n",
weekday, vacation, expected, result, pass ? "OK " : "X ");
}

public static void main(String[] args) {
System.out.println("Function Call -> Expected | Yours | Pass?\n");
TestSleepIn(false, false, true);
TestSleepIn(true, false, false);
TestSleepIn(false, true, true);
TestSleepIn(true, true, true);
testSleepIn(false, false, true);
testSleepIn(true, false, false);
testSleepIn(false, true, true);
testSleepIn(true, true, true);
}
}

0 comments on commit e2ce88d

Please sign in to comment.