CSC223 2004F, Class 8: The UML 2: Interfaces Admin: * Homework (Friday): Bug World Diagram / Groups of Three * Homework (Wednesday): Finish Fowler * Apologies for Friday * Homework 1 due! * Office hours switched to 1:30-2:30 (approx) this week. * Quiz! "CS223, Quiz 2: YOUR NAME HERE" 1. What is the name for "<<" and ">>"? (NOT Shift left, shift right) Guillemets 2. What is the notational difference between "<<...>>" and "{...}"? * Guillemets indicate *keywords* (what's a keyword?) * Part of the programming language? * Like a reserved word: The language uses it so you shouldn't. * FIXED, RESERVED, MEANING * Curly braces indicate *keywords* * The difference is too subtle for most of us to understand 3. What is the notational difference between words surround by <<>> or {} and "plain words" (words surrounded by nothing)? * Things that are not keywords should probably not be in angle braces Overview: * Why give quizzes? * Review * Interfaces /Why do faculty give quizzes?/ * To gauge whether or not students bothered to do the homework. * To remind students that they should be prepared for class. * To assess whether or not students understand the reading/work. * To enforce attendance. * It's Monday. * Tradition. * Highlight key parts of the reading. * Didn't bother to prepare class. * Pure, unadultered, cruelty. * To give students the opportunity to demonstrate all that they have learned and mastered /Review/ * The UML is a mostly-graphical language for showing information about object-oriented programs. * Can notate static and dynamic aspects of programs. * Basic static notation: The class * Three parts: Name, Fields, Methods * Some fields are implicit, shown by relationship * Central static notation: Class relationships * Containment (form of association): Solid line, open head * Extension/Generalization: Solid line, hollow head * Dependency: Dashed line, open head * When do you ever use a solid head? * Communication! /Introduce Interfaces/ * Show implementation: dashed line, hollow head * Keyword <> before name shows that it's an interface * Show extension of interfaces: solid line, hollow head * Given that linear structures contains "add, get, isEmpty", what are stacks and queues but extensions of linear structures that add meaning to those methods? * What does the ball and socket do? Show "provide and require interfaces"