-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor imports and enhance logging and error handling
Consolidate imports in UsePerson and refactor equals method in Person class. Add comprehensive logging and specific error handling in LazyStreams to manage exceptional cases. Introduce new CompanyEmployee class implementing multiple interfaces and update relevant test cases.
- Loading branch information
Showing
6 changed files
with
65 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package interfaces; | ||
|
||
public class CompanyEmployee implements Company, Employee { | ||
private final String first; | ||
private final String last; | ||
|
||
public CompanyEmployee(String first, String last) { | ||
this.first = first; | ||
this.last = last; | ||
} | ||
|
||
@Override | ||
public String getFirst() { | ||
return first; | ||
} | ||
|
||
@Override | ||
public String getLast() { | ||
return last; | ||
} | ||
|
||
@Override | ||
public void doWork() { | ||
System.out.println("Converting caffeine into code for $$$."); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return Employee.super.getName() + " works for " + Company.super.getName(); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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