mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-06-05 04:13:49 +00:00
docs: updates to several patterns
This commit is contained in:
+3
-2
@@ -50,9 +50,10 @@ public class App {
|
||||
* @param args command line args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
var commands = new CommandServiceImpl();
|
||||
|
||||
// Create Authors and Books using CommandService
|
||||
var commands = new CommandServiceImpl();
|
||||
|
||||
commands.authorCreated(AppConstants.E_EVANS, "Eric Evans", "evans@email.com");
|
||||
commands.authorCreated(AppConstants.J_BLOCH, "Joshua Bloch", "jBloch@email.com");
|
||||
commands.authorCreated(AppConstants.M_FOWLER, "Martin Fowler", "mFowler@email.com");
|
||||
@@ -66,9 +67,9 @@ public class App {
|
||||
commands.bookAddedToAuthor("Domain Specific Languages", 48.89, AppConstants.M_FOWLER);
|
||||
commands.authorNameUpdated(AppConstants.E_EVANS, "Eric J. Evans");
|
||||
|
||||
// Query the database using QueryService
|
||||
var queries = new QueryServiceImpl();
|
||||
|
||||
// Query the database using QueryService
|
||||
var nullAuthor = queries.getAuthorByUsername("username");
|
||||
var evans = queries.getAuthorByUsername(AppConstants.E_EVANS);
|
||||
var blochBooksCount = queries.getAuthorBooksCount(AppConstants.J_BLOCH);
|
||||
|
||||
Reference in New Issue
Block a user