Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/2015 11:05 PM 0 COSC3311 – Software Design.

Slides:



Advertisements
Similar presentations
Context Diagram Yong Choi BPA CSUB.
Advertisements

Design by Contract.
6 th Annual Focus Users’ Conference 6 th Annual Focus Users’ Conference Accounts Receivable Presented by: Robert Myers Presented by: Robert Myers.
Assignment I, part 1. Groups of three students. Specify one as group leader. group names to TA and me. Create an object-oriented conceptualization.
Shaoying Liu Department of Computer Science
© Prentice Hall CHAPTER 9 Application Development by Information Systems Professionals.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 10: Project Presentation Ilinca.
CMSC 132: Object-Oriented Programming II
Chair of Software Engineering 1 Introduction to Programming Bertrand Meyer Exercise Session 3 29 September 2008.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Java Development Tools project.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 5: Project and EiffelStudio Presentation.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 14: Presentation of EiffelStudio.
Chair of Software Engineering ATOT - Lecture 2, 2 April Advanced Topics in Object Technology Bertrand Meyer.
Using MyMathLab Features You must already be registered or enrolled in a current MyMathLab class in order to use MyMathLab. If you are not registered or.
Introduction to SAP R/3.
Chair of Software Engineering ATOT - Lecture 1, 31 March Advanced Topics in Object Technology Bertrand Meyer.
20 February Detailed Design Implementation. Software Engineering Elaborated Steps Concept Requirements Architecture Design Implementation Unit test Integration.
Data Structures and Programming.  John Edgar2.
McGraw-Hill/Irwin Introduction to QuickBooks Pro, 2004 © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved. Chapter 4 Bank Reconciliation.
2013.  Reconcile your checking account  Create bank reconciliation reports  Find errors during reconciliation  Correct errors found during reconciliation.
BETTER MANAGING OUR TIME KRONOS TIMEKEEPER SCHEDULING TRAINING YMCA OF METROPOLITAN DALLAS August 30, 2015.
From Problem Statement to Design
Use Cases 2 ENGR ♯10 Peter Andreae
Rational Unified Process (Part 1) CS3300 Fall 2015.
SE-308 Software Engineering-II 7th Term SE University of Engineering & Technology Taxila, Pakistan Software Engineering Department.
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang.
Glenn David Blank Computer Science & Engineering Department Lehigh University, Bethlehem, PA, USA With support from the National Science Foundation (Grants.
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview Bong-Soo Sohn Associate Professor School of Computer Science and Engineering Chung-Ang.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Message Analysis Table.
New Form Approval Process. Background New Process is effective April 1, 2014 Changes Chapter 4 in the Library Manual (the reissued 2014 manual will be.
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
Faculty of Computer & Information Software Engineering Third year
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
SuccessMaker. Where are they? Math: Intranet On a server at Vanhoose Reading Web-based.
Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 3. Defining the System 4. Managing Scope 5.
Faculty of Computer & Information
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview Bong-Soo Sohn Associate Professor School of Computer Science and Engineering Chung-Ang.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
EDExpress Training Presented by Doug Baldwin – CPS/SAIG Technical Support Bob Berry – U.S Department of Education/FSA.
Using MyMathLab Features of MyMathLab You must already be registered or enrolled in a current MyMathLab class in order to use MyMathLab. If you are not.
© 2010 Pearson Education, Inc. | Publishing as Prentice Hall1 Computer Literacy for IC 3 Unit 2: Using Productivity Software Chapter 1: Starting with Microsoft.
ICS202 Data Structures King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
January Ron McFadyen1 January 2004 Assignment 1 Due: Friday Jan 23, Implement the ProductSpecification and Payment classes in any OO.
OSes: 0. Prelim 1 Operating Systems v Objectives –to give some background on this subject Certificate Program in Software Development CSE-TC and CSIM,
Web deposits replace the Clemson University Receipt Transmittal, used only for CU deposits, funds With web department deposits, you can now enter.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Class Design I Class Contracts Readings: 2 nd Ed: Section 9.5, Advanced Topic nd Ed: Section 8.5, Advanced Topic 8.2 Some ideas come from: “Practical.
Software Reuse Course: # The Johns-Hopkins University Montgomery County Campus Fall 2000 Session 4 Lecture # 3 - September 28, 2004.
COMP2110 Software Design in 2003 ● a(nother) framework for Software Engineering ● the Software Engineering ideas and concepts in comp2110 ● Organisation.
Administrative Information SC/CSE SU10 -- Software Design.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
The Hashemite University Computer Engineering Department
Software Engineering (CSI 321) Introduction. Introduction Course Title: Software Engineering Course Code: CSI-321 Credit Hours: 3 Section: 1 2.
DE?!GN software. COMP2110 Software Design in 2004 Chris Johnson 1.Software Requirements and Software Design in a framework for Software Engineering 2.The.
Lecture Outline Monday 23 rd February (Week 4) 3 – 3:10pm Review of Requirements Eng. and use cases 3:10 – 3:40pm Exercise on Use Case 3:40-4:40 Class.
VA Primavera P6: Creating a Project and Work Breakdown Structure (WBS) Department of Veterans Affairs Office of Information and Technology IT Workforce.
421 Review Questions 1.Does software engineering add documentation that slows down the project? 2.Is there one software process that is better than the.
Bank Reconciliation Chapter 4. PAGE REF #CHAPTER 4: Bank Reconciliation SLIDE # 2 Objectives Reconcile your checking Create bank reconciliation reports.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
Proctor Caching and System Check September 4, 2014 Becky Hoeft Conference Number: (877) Conference Pin:
CMPE 280 Web UI Design and Development August 29 Class Meeting
Recall The Team Skills Refining the Use cases
MyStatLab Student help/instructions MTH/233
Using MyMathLab Features
Week 1 Gates Introduction to Information Technology cosc 010 Week 1 Gates
Payments & Collections
Presentation transcript:

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 0 COSC3311 – Software Design Section P Vassilios Tzerpos

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 1 Course Details   Slides and other resources:  Case studies:  Eiffel Help:  Office hours: WF 2:30 – 3:30  Read newsgroup  Lab hours next week:  Monday, January  Wednesday, January  Friday, January 163-4

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 2 Grading  Assignment 1: 7%  Assignment 2: 10%  Assignment 3: 13%  Test: 25%  Exam: 45%

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 3 Textbook  Bertrand Meyer: Object-Oriented Software Construction, 2 nd edition. Prentice Hall,  Suggested reading:  Pete Thomas, Ray Weedon, Object-Oriented Programming in Eiffel, second edition, Addison-Wesley,  Kent Beck, Test-driven development : by example. Addison-Wesley, Boston,  J.M. Jezequel and C. Mingins. Design patterns and contracts. Addison-Wesley,  Erich Gamma et al.: Design Patterns. Addison-Wesley, 1995.

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 4 Advice – Course strategy  Don’t fall behind: First two weeks especially!  Attend lectures: material is not all in textbook  Do the readings on time

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 5 Week 1 – Readings  January 5  Software Quality & Engineering -- The context for design; what is design; Eiffel programming; classes.  Readings Required: Chapter 7  Static Structure  Classes  Class POINT …  Readings Background: Chapters 1, 2  External Quality  Internal Quality – Modularity  Read about, install and use EiffelStudio

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 6 The goal: Software quality  REUSABILITY  EXTENDIBILITY  RELIABILITY (Correctness + Robustness)  PORTABILITY  EFFICIENCY  …  Correctness:  The ability of a software system to perform according to specification, in cases defined by the specification.  Robustness:  The ability of a software system to react in a reasonable manner to cases not covered by the specification. Robustness SPECIFICATION

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 7 Case Study 1– Bank example  Requirements & Use Cases  Design – How? Plan-driven: Identify the Classes Agile: Test Driven Development  EiffelStudio Clusters and Classes Tests and ETester Project Configuration/Ace files Debugger Documentation  Design Constructs BON Contracts Object equality: equal Genericity Agents and Tuples Design Patterns (Singleton)

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 8 Requirements – Bank example  Requirements  Open an account for a customer (savings or chequing)  Deposit  Withdraw  Display details of an account  Change LOC  Produce monthly statements  Print a list of customers  …  Ambiguities  What is the difference between savings and chequing?  Many others …

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 9 Case Study 1 – Bank example  How should we go from Requirements to Code?  Two basic approaches  Plan-driven (waterfall type models)  Agile (incremental approaches)

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 10 Requirements to Code?

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 11 The waterfall model of the lifecycle FEASIBILITY STUDY REQUIREMENTS ANALYSIS SPECIFICATION GLOBAL DESIGN DETAILED DESIGN IMPLEMENTATION DISTRIBUTION VALIDATION & VERIFICATION PROJECT PROGRESS

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 12 Problems with the waterfall  Late appearance of actual code.  Lack of support for requirements change — and more generally for extendibility and reusability.  Lack of support for the maintenance activity (70% of software costs?).  Division of labor hampering Total Quality Management.  Impedance mismatches.  Highly synchronous model.

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 13 Impedance mismatches As Management requested it.As the Project Leader defined it.As Systems designed it. As Programming developed it.As Operations installed it.What the user wanted. (Pre-1970 cartoon; origin unknown)

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 14 How to think about requirements?  Use Cases

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 15 Bank Requirements – Use Cases System boundary Use Case Actors

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 16 Bank Use Cases  Challenge question:  What would the Use Case diagram look like if the bank supplies ATMs in addition to tellers?

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 17 Use Case – Open Account  Actors: Customer (initiator), Teller  Overview: the customer applies for and is granted a new bank account with some initial approved line of credit. The teller logs on to the system, selects open account, and supplies the new account details. The system prints a copy of the contents of the new account with the date, which the teller hands to the customer.

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 18 Design of Bank – Identify Classes  TELLER  CUSTOMER  SAVINGS_ACCOUNT  CHEQUING_ACCOUNT  MAIN_MENU  BALANCE_INQUIRY  INTEREST_RATE ………  Where do we start?

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 19 Test Driven Development 1.Write a little Test  Test will not work initially (there is no code)  Might not even compile 2.Make the Test work quickly  Commit whatever sins are necessary in the process (e.g. duplication in the code) 3.Refactor  Eliminate the duplication created in merely getting the test to work

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 20 EiffelStudio – create a new project

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 21 Call the new project bank

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 22 Compile and Run print(“hello world!”)

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 23 Compile often!  Always start with a compiled system  New project wizard  Copy an existing system  A compiled system is needed for browsing  Compile often!

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 24 ETester – Create a tests cluster Click here

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 25 Create class ACCOUNT_TEST Click here

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 26 Clusters and Classes

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 27 Ace file – Directory Structure

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 28 Ace File – Ace.ace system "bank“ root root_class: make default precompiled ("C:\Eiffel53\precomp\spec\windows\base") assertion (check) assertion (require) … cluster root_cluster:"." all tests:".\tests" library base:"$ISE_EIFFEL\library\base" exclude "table_eiffel3"; "desc"; end … end

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 29 Project Configuration (Ace file) Root Class All contracts ACCOUNT_TEST turned on Click here

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 30 Write Test test_create_account: BOOLEAN is local c: CUSTOMER do comment("test_create_account") create c.make("Archie Fox") Result := equal(c.name, "Archie Fox") end Error code: VTCT Error: type is based on unknown class. What to do: use an identifier that is the name of a class in the universe. Class: ACCOUNT_TEST Unknown class name: CUSTOMER

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 31 The Test specifies a Design

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 32 customer.e indexing description: "A bank customer“ class CUSTOMER create set_name feature -- Element change make (a_name: STRING) is -- Create a customer. Set `name' to `a_name'. require a_name_not_void: a_name /= Void do name := a_name ensure name_assigned: name = a_name end feature -- Access name: STRING -- of customer invariant name_not_void: name /= Void end

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 33 ETester GUI – Green bar

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 34 Test: A customer with a savings account test_create_customer_with_account: BOOLEAN is local a1,a2: SAVINGS_ACCOUNT c: CUSTOMER initial_deposit: REAL do initial_deposit := 500 create a1.make(initial_deposit) check a1.balance = initial_deposit end create c.make(a1, "Archie Fox") a2 := c.account Result := equal(c.name, "Archie Fox") and a2 = a1 and a2.balance = initial_deposit end

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 35 Red bar

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 36 Use debugger to find problem

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 37 EiffelStudio – BON tool

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 38 Client-Supplier relationship

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 39 Open Account Use case (revisited)  Actors: Customer (initiator), Teller  Overview: the customer applies for and is granted a new bank account with some initial approved line of credit. The teller logs on to the system, selects open account, and supplies the new account details. The system prints a copy of the contents of the new account with the date, which the teller hands to the customer.  We have not yet dealt with the LOC, system menu and the receipt. We leave this as an exercise.

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 40 Withdraw Use Case  Actors: Customer (initiator) and Teller  Overview: The customer provides the teller with an account number and a withdrawal amount. The teller selects `withdraw-request’ from the system menu, and enters the data. The System debits the account by the requested withdrawal amount, and prints a receipt with the date and the amount, which the teller gives to the customer.  Question: What happens if there is not enough money in the account to withdraw?

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 41 test_withdraw test_withdraw: BOOLEAN is local sa1, sa2: SAVINGS_ACCOUNT initial_deposit: REAL do comment("test_withdraw") initial_deposit := 500 create sa1.make(initial_deposit) create sa2.make(200) sa1.withdraw(300) Result := equal(sa1, sa2) end

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 42 Bank design (BON static diagram)

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 43 EiffelStudio feature tool – withdraw

Department of Computer Science, York University Slides based on Object Oriented Software Construction 12/09/ :05 PM 44 Run tests