method specification section in chapter 14 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Method Specification Section in Chapter 14 PowerPoint Presentation
Download Presentation
Method Specification Section in Chapter 14

Loading in 2 Seconds...

  share
play fullscreen
1 / 11
primo

Method Specification Section in Chapter 14 - PowerPoint PPT Presentation

148 Views
Download Presentation
Method Specification Section in Chapter 14
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Method Specification Section in Chapter 14 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon Negash

  2. Method Specification • A transition between analysts and programmers: • Analysts describe individual classes and methods in detail • Programmers take over and begin writing code • Written documents that include explicit instructions on how to write the code to implement the method

  3. Method Specification Components • Typical method specifications contain four components: • General information • Events • Message Passing • Algorithm Specification

  4. General Information • Name of the method • Name of the class in which the method reside • ID number • Contract ID that identifies the contract associated with this method implementation • Programmer assigned • Date due • Target programming language

  5. Events • An event is a thing that happens or takes place. • Example: clicking the mouse generates a mouse event. • After initializing a system waits for an event to occur • When a method is fired it carries out the appropriate task • Event-driven programming instructions like behavioral state machines can be used.

  6. Message passing • Message passing to and from the method • Message passing is identified in the sequence diagram (or collaboration diagram) • Programmers need to understand what arguments are being passed into, from, and returned by the method.

  7. Algorithm Specification • Algorithm specifications can be written in Structured English, some form of pseudocode • Structured English is like a simple programming language. • Many versions of Structured English exist because there are no formal standards.

  8. Structured English

  9. (Get CD-info module) Accept (CD_title) {Required} Accept (CD_artist) {Required} Accept (CD_category) {Required} Accept (CD_length) Return Pseudocode Example

  10. Method Specification Form • Refer to Figure 14-1 in the text.