Headline

Implement logging my means of the observer pattern in Language:Java

Characteristics

The present implementation can be viewed as a variation on Contribution:javaInheritance. The observer pattern is applied to implement the logging of salary cutting.

Illustration

The data model is implemented with class inheritance. For example Departments:

Fragment not found

Feature:Total and Feature:Cut are implemented as in Contribution:javaInheritance:

Fragment not found

In addition the Employee class extends the "Observerable" class, implements methods for adding and notifying observers, and notifies them when salaries are cut:

Fragment not found

The actual Feature:Logging happens in the "EmployeeObserver":

Fragment not found

The "update" method is called one anyone notifies the observer, leading to a logging of the new salary.

Relationships

For basic OO with inheritance see Contribution:javaInheritance.

Architecture

The contribution follows a standardized structure:

  • src/main/java contains the following packages:

Usage

This contribution uses Technology:Gradle for building. Technology:Eclipse is supported.

See https://github.com/101companies/101simplejava/blob/master/README.md

Metadata


There are no revisions for this page.

User contributions

    This user never has never made submissions.

    User edits

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.