For this second video, Reynald continues reviewing the code example of traversing through a collection of reporters from two companies. Here the student should get a good understanding of the Iterator and the concrete iterator and how they work together using implementations such as First, Next, IsDone & CurrentItem. Lastly, Reynald reviews the code of the client that executes the demo.
So we just reviewed the code that's in our Aggregate folder.…Let's take a look at the code within the Iterator…folder now.…First, I'd like to open up the file IIterator.…Within here we simply have an interface called IIterator,…and the signatures consist of First which returns a void,…Next which returns a string, a boolean called IsDone,…and a CurrentItem which will be returning a string.…First simply sets the current element to the first element.…
Next advances a current element to the next one.…IsDone basically checks to see if the collection is at the…end,…and CurrentItem returns the existing element.…The current element that has a focus.…Let's open up LA Paper Iterator.…LA Paper Iterator inherits from IIterator,…and you'll notice we have a couple of private variables.…One for reporters, and one that keeps track of the…current element.…
Then we have a few methods;…LA Paper Iterator, CurrentItem,…First, IsDone,…Next.…These are the implementations for what we just saw in the…iterator.…Here is where the differences come in because the way that…
In this course, developer and technologist Reynald Adolphe explains the purpose and effective use of eight design patterns, including six Gang of Four design patterns and two .NET patterns. Gang of Four patterns fall under three categories: structural, creational, and behavioral. Reynald helps you learn about select patterns from each category. He describes each pattern and demonstrates how programmers can leverage them in real-world applications.
- Factory Method
- Abstract Factory
- Singleton pattern
- Decorator pattern
- Iterator pattern
- Observer pattern
- Repository pattern
- Unit of Work pattern
Skill Level Intermediate
2. Factory Method
3. Abstract Factory
4. Singleton Pattern
5. Decorator Pattern
6. Iterator Pattern
7. Observer Pattern
8. Repository Pattern
9. Unit of Work Pattern
Convert to Unit of Work3m 53s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.