From Iteration 1 to Iteration 2 - Lehigh CSE

From Iteration 1 to Iteration 2 - Lehigh CSE

(Further analysis and Refactoring) Larman, chapters 23 and 24 Glenn D. Blank, CSE432 End of iteration-1 (see Larman, p. 402): For a selected, high risk use case scenario, SSD, domain class diagrams and operation contracts (ADTs) were developed Software implemented and tested (unit, acceptance, usability) Customers have evaluated the partial system Are you there yet?

Decide what to work on next, resolve questions, identify major tasks: Reverse engineer from Iteration 1 source code to new class and interaction diagrams: how and why? Usability analysis for the user interface under way Database modeling and implementation under way Another requirements workshop occurs: Write more use cases in fully dressed format Decide which use case(s) will be analyzed, designed, implemented and tested in second iteration How and why should customer be involved in this

workshop? Iteration-2 will handle additional requirements: Support for third-party external services (i.e., different tax collectors) Complex pricing rules GUI window refreshes when sale total changes Constraint: only consider these requirements in context of Process Sale use case Process Sale Pay by Credit Scenario :NextGenPOS System actor

:TaxCalculator : Cashier actor :CreditAuthorization Service actor :Accounts makeNewSale enterItem(itemID, quantity) description, total

endSale taxLineItems = getTaxes( sale ) total with taxes makeCreditPayment (credNum, expiryDate) reply = requestApproval(request) postReceivable( receivable ) postSale( sale ) Fig. 24.1

Expand basic players moving around board scenario to handle some special square rules: Each player starts with $1500 When player lands of Go, player receives $200 When player lands on Go-To-Jail, move to Jail When player lands on Income-Tax, player pays minimum of $200 or 10% of worth What design pattern has been incorporated? Why is polymorphism a good idea here? Subclasses (of square) have additional attributes (state) Subclasses have additional operations

Refactoring changing a software system by improving its internal structure without changing its external behavior I.e., restructure code in a disciplined way Make code easier to understand and cheaper to modify Counteracts entropy of software by promoting more order Identify heavily used or time consuming code Refactoring leads to design patterns: why?

Smalltalk community used refactoring to develop the Model-View-Controller and other frameworks When you do a Code Review or Walkthrough I.e., in subsequent iterations (polymorphism in Monopoly) When you add a function Helps you to understand the code you are modifying Sometimes existing design does not allow you

to easily add the feature When you need to fix a bug A bug report is a sign code needs refactoring: Why? Code was not clear enough to see the bug in the first place Why does test-driven programming support refactoring?

Code to be refactored should already have tests that we can recheck to assure new design doesnt break anything! Begin refactoring by designing a solid test set for anything new in code under analysis

Recently Viewed Presentations

  • The Depression in Canada

    The Depression in Canada

    Became a legal party in Canada in 1924. Criticized as Un-Canadian because of its allegiance to Communist International (Comintern) operating out of Moscow. 1919, Red Scare, Section 98 of the Criminal Code outlaws the Communist Party. Party leaders were imprisoned...
  • Welcome to North Coast Institute Kingscliff Campus

    Welcome to North Coast Institute Kingscliff Campus

    Welcome to North Coast Institute Kingscliff Campus Semester I 2017 Introductions My Name is : Scott Martin Your Teachers will be: Az de Silva Steven Wigmore Urshula BEere Contact Details will be provided by your teachers or Refer to your...
  • CLIENT LOGO DRAKELOW SITE INDUCTION 02/29/2020 Health and

    CLIENT LOGO DRAKELOW SITE INDUCTION 02/29/2020 Health and

    Hi-visibility vests and safety shoes must be worn within the Warehouse and designated external areas. No Smoking except in the designated area. No food or drink within the warehouse. No unauthorised entry to the warehouse. Report all incidents / accidents...
  • Objectivism

    Objectivism

    "is as near to an autobiography as I will ever write. It is not an autobiography in the literal, but only in the intellectual sense. The plot is invented, the background is not..." Set in Soviet Russia- focuses on the...
  • The Scientific Method - Mesa Public Schools

    The Scientific Method - Mesa Public Schools

    The Scientific Method. ... This is what stays the same in your experiment to ensure that you will be fair and unbiased when conducting the tests . For example, for the mentioned experiment the controls would be the following: ......
  • 6.1.1 (p.) The Area Problem

    6.1.1 (p.) The Area Problem

    Fundamental Theorem of Calculus - Part I (Also called the Net Change Theorem in Stewart) Fundamental Theorem of Calculus - Part II 2. Evaluate 89.5 97.5 96.5 -89.5 Question 2 Integration Practice - Solutions at end of Slides 3. Find...
  • Missing Food: The Case of Post-Harvest Grain Losses in Sub ...

    Missing Food: The Case of Post-Harvest Grain Losses in Sub ...

    The Size of the Problem Losses are lower than previously estimated but still substantial. Average grain losses are estimated to range between 10-20% (depending on the grain and the season ) Based on estimates by APHLIS, the value of losses...
  • Testing These slides are derived from various sources,

    Testing These slides are derived from various sources,

    Functional testing started with the proposal that we treat a program as a function. To test it, we would feed it inputs and check its outputs. In functional testing, knowledge of the inner workings of the "function" is less important...