MCPcopy Create free account
hub / github.com/Anchals24/Low-Level-Design / Client

Class Client

IteratorDesignPattern/Client.java:6–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import java.util.List;
5
6public class Client {
7 public static void main(String[] args) {
8 List <Book> booksList = Arrays.asList(
9 new Book(300, "Maths"),
10 new Book (1000, "System Designs"),
11 new Book(560, "DSA"),
12 new Book(345, "UPSC MAINS")
13 );
14
15 LibraryAggregator lib = new LibraryAggregator(booksList);
16 Iterator iterator = lib.createIterator();
17
18 while (iterator.hasNext()){
19 Book book = (Book) iterator.next();
20 System.out.println(book.getBookName());
21 }
22 }
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected