This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public boolean scheduleRomanticDinner(RomanticDinnerRequest request){ | |
| boolean isTableAvailable = isTableAvailableAtTime(request.table(), request.time()); | |
| if(isTableAvailable){ | |
| server.confirmSchedule(request); | |
| } else { | |
| //whatever | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public boolean scheduleRomanticDinner(String name1, String name2, int table, Date time){ | |
| boolean isTableAvailable = isTableAvailableAtTime(table, time); | |
| if(isTableAvailable){ | |
| server.confirmSchedule(name1, name2, table, time); | |
| } else { | |
| //whatever | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public boolean saveNote(String date, String text){ | |
| String finalText = text.append("\n").append(date); | |
| Note note = Note.from(finalText); | |
| return server.saveNote(note); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void loginFlow(String email, String password){ | |
| boolean isCorrectCredentials = validateCredentials(email, password); | |
| if(isCorrectCredentials){ | |
| login(); | |
| } else { | |
| // whatever | |
| } | |
| } | |
| public boolean validateCredentials(String email, String password){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public boolean validateCredentials(String email, String password){ | |
| boolean isCorrectCredentials = server.validadeCredentials(email, password); | |
| if(isCorrectCredentials){ | |
| login(); | |
| } | |
| return isCorrectCredentials; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<Event> fetchAllEvents(); | |
| List<Note> getAllNotes(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int timeInDays; | |
| int generatedTimestamp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int d; // time in days | |
| int gtmsp; |