Skip to content

O-Cube/Observer-Pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Observer-Pattern

  • application uses observer pattern to broadcast messages.
  • applications consist of Client and IphoneShop class. Both classes implements the Customer interface.
  • Manufacturer class represents iphone manufacturer and sends out information to customer objects concerning the release of iphone.
  • IphoneInfo dispatcher acts as the broadcaster. It gets information from the Manufacturer class and broadcast the information to customer objects subscribed to it

Procedure

  • clone application and in the source directory run; make -f Makefile to build the application
  • make -f Makefile Run to execute the application
  • make -f Makefile to clean objects files and executables

Application output looks thus: image

Test application

  • test requires gtest, gmock, gcov, lcov and genhtml packages
  • in test folder, run make -f Makefile to build test application
  • make -f Makefile Run to execute test application
  • make -f Makefile clean to delete object files, executable, test output directory, .gcda and .gcno files

Test application output looks as follows:

image

extract of test coverage data looks thus:

image

About

Using observer pattern to monitor changes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published