Lecture overview -- Keyboard shortcut: 'u'  Previous page: Contracts -- Keyboard shortcut: 'p'  Next page: Contracts: Obligations and Benefits -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 15 : 32
Object-oriented Programming in C#
Contracts and Assertions
Everyday Contracts

Contracts are all around us in our everyday life

  • Student and University

    • The student enrolls some course

    • The university offers a teacher, a room, supervision and other resources

  • Citizen and Tax office

    • The citizen does a tax return

    • The tax office calculates the taxes, and regulates the paid amount of money

  • Football player and Football club

    • The player promises to play 50 games per season

    • The football club pays 10.000.000 kroner to the player pr. month

  • Citizen and Insurance company

    • The insurance holder pays the insurance and promises to avoid insurance fraud

    • In case of a damage or accident, the insurance company pays compensation