docs: update business delegate

This commit is contained in:
Ilkka Seppälä
2024-05-24 21:03:49 +03:00
parent 3a38e2be6b
commit 3812d22392
+12 -12
View File
@@ -116,20 +116,20 @@ public class MobileClient {
Finally, we can demonstrate the complete example in action.
```java
public static void main(String[]args){
public static void main(String[] args) {
// prepare the objects
var businessDelegate=new BusinessDelegate();
var businessLookup=new BusinessLookup();
businessLookup.setNetflixService(new NetflixService());
businessLookup.setYouTubeService(new YouTubeService());
businessDelegate.setLookupService(businessLookup);
// prepare the objects
var businessDelegate = new BusinessDelegate();
var businessLookup = new BusinessLookup();
businessLookup.setNetflixService(new NetflixService());
businessLookup.setYouTubeService(new YouTubeService());
businessDelegate.setLookupService(businessLookup);
// create the client and use the Business Delegate
var client=new MobileClient(businessDelegate);
client.playbackMovie("Die Hard 2");
client.playbackMovie("Maradona: The Greatest Ever");
}
// create the client and use the business delegate
var client = new MobileClient(businessDelegate);
client.playbackMovie("Die Hard 2");
client.playbackMovie("Maradona: The Greatest Ever");
}
```
Here is the console output.