Home Assignment 4 OCL

Size: px
Start display at page:

Download "Home Assignment 4 OCL"

Transcription

1 Home Assignment 4 OCL This home assignment is about writing formal specifications using the Object Constraint Language. You will exercise formulating conditions/invariants on domain models that go beyond the expressiveness of UML class diagrams. Then, you will use OCL for writing contracts for methods, i.e., to specify behaviour. The main purpose of doing that is to get a feeling for textual formal specification languages like OCL, JML or Alloy, which can be used, amongst others, to provide better more precise documentation of software systems. Comments for the Corrector This week, we have added comments about how to correct only to some of the questions. Generally, when correcting you should not care too much about purely syntactic issues. It is more important that the constraints are logically correct, e.g., that the right collection operations are used (in the right way). Give comments when you subtract points, because the person that wrote the solution will not have the opportunity to ask you for comments personally. Exercise 1 (4p) This question is about strengthening the given domain model by formulating further properties in the Object Constraint Language. Order - sum:double - fee:double - orderedbooks Book - price:double - idnumber:int a) (1p) Give an OCL invariant that specifies that the sum attribute cannot be negative. context Order inv: sum >= 0 b) (1p) 1

2 Give an OCL invariant that specifies that the sum attribute will be zero if no books are ordered. context Order inv: orderedbooks->isempty() implies sum = 0 c) (1p) Give an OCL invariant that specifies that the sum attribute really describes the price of the books ordered. context Order inv: sum = orderedbooks->collect(price)->sum() using short-h notation: context Order inv: sum = orderedbooks.price->sum() d) (1p) Give an OCL invariant that specifies that different instances of Book have different idnumbers. A number of different solutions here: context Book inv: Book.allInstances()->forAll(b1, b2 b1 <> b2 implies b1.idnumber <> b2.idnumber) context Book inv: Book.allInstances()->forAll(b1, b2 b1.idnumber = b2.idnumber implies b1 = b2) context Book inv: Book.allInstances()->forAll(b b <> self implies 2

3 context Book inv: Book.allInstances()->isUnique(idNumber) b.idnumber <> self.idnumber) You can make use of the following OCL operations: OclType: allinstances() OclAny: object<>(object2) String: = Integer: <> Real: +, >=, Boolean: b1 implies b2, b1 b2 (b1,b2:boolean) Collection, Set, Bag, Sequence: collection-> sum() collection-> size() collection->collect(element:type <expr>) collection-> select (element:type <expr>) collection-> forall(element:type <expr>) collection-> exists(element:type <expr>) collection->isunique(element:type <expr>) collection-> iterate(element:typ1; result:type2 = <expr> <expr-with-element--result>) Exercise 2 (12p) This question continues exercise 3 4 from the first home assignment. The context is the following domain model, which is one possible solution to exercise 3 of that assignment: 3

4 One possible solution: Bank name 1.. Account balance interest PaymentRemarks date info remarks customer account 1 Customer status name associate warrantor Address SteetName StreetNumber city country address 1 Income amount date income loan Loan amount interest payment 0..1 security own 0..1 House taxvalue loanfor 0..1 With help of the multiplicity one can constrain the domain model. But there are other conditions, business rules, which cannot be described by only a domain model using multiplicities. Such rules can be written in a precise manner using OCL. a) Invariants (1) (2p) Write the following constraint as an OCL invariant of concept Loan: If a loan has a warrantor, then the warrantor is an associate of the customer who has the loan. context Loan inv: warrantor->notempty() implies customer.associate->includes(warrantor) b) Invariants (2) (2p) 4

5 Write the following constraint as an OCL invariant of concept Loan: If a Loan has a House as security, then the Customer having the Loan must own that House. context Loan inv: security->notempty() implies security.customer = customer or context Loan inv: security->notempty() implies customer.own->includes(self.security) c) Invariants (3) (2p) Write the following constraint as an OCL invariant of concept Loan: If a Loan has a House as security, then that House must have a taxvalue (assessed value) of at least 20% of the amount of the Loan. context Loan inv: security->notempty() implies (security.taxvalue / amount) 100 >= 20 d) Pre-/Postconditions: Customer::getLoan() (2p) In order to simplify the following question, we assume that the number of instances of concept Income that are related with a customer shows how many times during the last 12 months the person got a salary. If there are, for example, 9 instances of Income related to a customer, then the customer got a salary in 9 out of 12 months. We start with refining the domain model into a class diagram. Therefore, an operation getloan():boolean is added to class Customer. 1 This operation is supposed to return whether a customer can be given a loan (true) or not (false). As a business decision, a customer can be given a loan if only if the following conditions hold (unless houses as securities or warrantors are involved, in this case the whole situation gets more complicated): 1 Whether this is good design is questionable, but this is not the point of this exercise... 5

6 The customer got a salary in each of the last 12 months. In each of the last 12 months, the salary was more than kr. Give an OCL specification of Customer::getLoan() that expresses these conditions. context Customer::getLoan():Boolean post: result = (income->size() = 12 income->forall(amount>14000)) e) Pre-/Postconditions: Customer::addLoan() (4p) The following question is a difficult one... Good luck! As the next step, we create an operation addloan(amount:real, interest:real, payment:real):loan[0..1] for really adding a loan. The operation will again be added to class Customer. The result of the operation is either the loan instance that was created (if adding the loan was successful) or the empty set (otherwise). The preconditions of the operation have to express that the arguments have reasonable values. Decide yourself about what is reasonable, but also give a short justification for the conditions that you came up with. The effect of the operation is supposed to be the following: If the customer is directly allowed to get a loan (i.e., the conditions from d) are satisfied): A Loan object has been created, its attributes have the values that were given as arguments of addloan(), the object has been related with the customer. Otherwise: If the customer has an associate customer that is allowed to get a loan (again according to the conditions from d)): A Loan object has been created like in the first case, but in addition the associate has been added as a warrantor. Otherwise: No loan is added. Give an OCL specification of Customer::addLoan() that expresses all these conditions. Hint: Note that you can use the query Customer::getLoan() in OCL expressions. We consider the following values of the arguments as reasonable: 6

7 amount is positive. interest must not be negative, because the bank does not want to pay its customers for taking loans. The value 0 is possible might occur for very special customers... The monthly/yearly payment (whatever) must not be negative, must not be greater than the amount. context Customer::addLoan(p_amount:Real, p_interest:real, p_payment:real):loan[0..1] pre: p_amount > 0 p_interest >= 0 p_payment >= 0 p_payment <= p_amount post: (loan - loan@pre)->forall(amount = p_amount interest = p_interest payment = p_payment security->isempty() loanfor->isempty()) if getloan() then result->notempty() result.oclisnew() loan = loan@pre->including(result) result.warrantor->isempty() else if associate->exists(getloan()) then result->notempty() result.oclisnew() loan = loan@pre->including(result) associate->exists (war war.getloan() result.warrantor = war) else loan = loan@pre result->isempty() endif endif Comments for the Corrector Give up to 1p for reasonable pre-conditions that are correctly formalised (which must not exactly be the pre-conditions given as solution here). Give up to 1p for correctly distinguishing the different possible cases (warrantor, no warrantor, no loan at all). 7

8 Give up to 1p for correctly creating a Loan object, for assigning the attributes/associations amount, interest, payment, security, loanfor, for adding it to self.loan. Give up to 1p for correctly setting up the warrantor field of the newly created Loan object. (total 16p) 8

Appendix... B. The Object Constraint

Appendix... B. The Object Constraint UML 2.0 in a Nutshell Appendix B. The Object Constraint Pub Date: June 2005 Language The Object Constraint Language 2.0 (OCL) is an addition to the UML 2.0 specification that provides you with a way to

More information

Model Driven Security: Foundations, Tools, and Practice

Model Driven Security: Foundations, Tools, and Practice Model Driven Security: Foundations, Tools, and Practice David Basin, Manuel Clavel, and ETH Zurich, IMDEA Software Institute Thursday 1st, 2011 Outline I 1 Models Analysis. Types. 2 The Object Constraint

More information

UML TUTORIALS THE USE CASE MODEL

UML TUTORIALS THE USE CASE MODEL UML TUTORIALS THE USE CASE MODEL www.sparxsystems.com.au Sparx Systems 2004 Page 1/5 describes the proposed functionality of the new system. A Use Case represents a discrete unit of interaction between

More information

Design by Contract beyond class modelling

Design by Contract beyond class modelling Design by Contract beyond class modelling Introduction Design by Contract (DbC) or Programming by Contract is an approach to designing software. It says that designers should define precise and verifiable

More information

Execution of A Requirement Model in Software Development

Execution of A Requirement Model in Software Development Execution of A Requirement Model in Software Development Wuwei Shen, Mohsen Guizani and Zijiang Yang Dept of Computer Science, Western Michigan University {wwshen,mguizani,zijiang}@cs.wmich.edu Kevin Compton

More information

Structure of Presentation. Stages in Teaching Formal Methods. Motivation (1) Motivation (2) The Scope of Formal Methods (1)

Structure of Presentation. Stages in Teaching Formal Methods. Motivation (1) Motivation (2) The Scope of Formal Methods (1) Stages in Teaching Formal Methods A. J. Cowling Structure of Presentation Introduction to Issues Motivation for this work. Analysis of the Role of Formal Methods Define their scope; Review their treatment

More information

A Production Planning Problem

A Production Planning Problem A Production Planning Problem Suppose a production manager is responsible for scheduling the monthly production levels of a certain product for a planning horizon of twelve months. For planning purposes,

More information

[Refer Slide Time: 05:10]

[Refer Slide Time: 05:10] Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture

More information

Etudes de cas en OCL avec l outil USE 2

Etudes de cas en OCL avec l outil USE 2 Etudes de cas en OCL avec l outil USE 2 1 2 UML-based Specification Environment 3 1ère étude de cas : invariants Classes en notation textuelle model Company 4 class Employee attributes name : String salary

More information

Software Specification and Testing

Software Specification and Testing Software Specification and Testing Using UML and OCL Jonathan Milley Faculty of Engineering and Applied Science MUN St. John s, Newfoundland Email: jmilley@engr.mun.ca Dr. Dennis K. Peters Faculty of Engineering

More information

Software Component Specification Using Design by Contract

Software Component Specification Using Design by Contract Software Component Specification Using Design by Contract Yi Liu and H. Conrad Cunningham Department of Computer and Information Science University of Mississippi 237 Kinard Hall University, MS 38677 USA

More information

Math Workshop October 2010 Fractions and Repeating Decimals

Math Workshop October 2010 Fractions and Repeating Decimals Math Workshop October 2010 Fractions and Repeating Decimals This evening we will investigate the patterns that arise when converting fractions to decimals. As an example of what we will be looking at,

More information

Sofware Requirements Engineeing

Sofware Requirements Engineeing Sofware Requirements Engineeing Three main tasks in RE: 1 Elicit find out what the customers really want. Identify stakeholders, their goals and viewpoints. 2 Document write it down (). Understandable

More information

Use Cases. Massimo Felici. Massimo Felici Use Cases c 2004 2011

Use Cases. Massimo Felici. Massimo Felici Use Cases c 2004 2011 Use Cases Massimo Felici Use Cases 1 Support requirements engineering activities and the requirement process Capture what a system is supposed to do, i.e., systems functional requirements Describe sequences

More information

A UML 2 Profile for Business Process Modelling *

A UML 2 Profile for Business Process Modelling * A UML 2 Profile for Business Process Modelling * Beate List and Birgit Korherr Women s Postgraduate College for Internet Technologies Institute of Software Technology and Interactive Systems Vienna University

More information

The design recipe. Programs as communication. Some goals for software design. Readings: HtDP, sections 1-5

The design recipe. Programs as communication. Some goals for software design. Readings: HtDP, sections 1-5 The design recipe Readings: HtDP, sections 1-5 (ordering of topics is different in lectures, different examples will be used) Survival and Style Guides CS 135 Winter 2016 02: The design recipe 1 Programs

More information

Use of OCL in a Model Assessment Framework: An experience report

Use of OCL in a Model Assessment Framework: An experience report Use of OCL in a Model Assessment Framework: An experience report Joanna Chimiak Opoka, Chris Lenz Quality Engineering Research Group Institute of Computer Science, University of Innsbruck Technikerstrasse

More information

Programming by Contract. Programming by Contract: Motivation. Programming by Contract: Preconditions and Postconditions

Programming by Contract. Programming by Contract: Motivation. Programming by Contract: Preconditions and Postconditions COMP209 Object Oriented Programming Designing Classes 2 Mark Hall Programming by Contract (adapted from slides by Mark Utting) Preconditions Postconditions Class invariants Programming by Contract An agreement

More information

Proceedings of the Sixth OCL Workshop OCL for (Meta-)Models in Multiple Application Domains (OCLApps 2006)

Proceedings of the Sixth OCL Workshop OCL for (Meta-)Models in Multiple Application Domains (OCLApps 2006) Electronic Communications of the EASST Volume 5 (2006) Proceedings of the Sixth OCL Workshop OCL for (Meta-)Models in Multiple Application Domains (OCLApps 2006) Use of OCL in a Model Assessment Framework:

More information

A Meeting Room Scheduling Problem

A Meeting Room Scheduling Problem A Scheduling Problem Objective Engineering, Inc. 699 Windsong Trail Austin, Texas 78746 512-328-9658 FAX: 512-328-9661 ooinfo@oeng.com http://www.oeng.com Objective Engineering, Inc., 1999-2007. Photocopying,

More information

3. Mathematical Induction

3. Mathematical Induction 3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

More information

Rigorous Software Development CSCI-GA 3033-009

Rigorous Software Development CSCI-GA 3033-009 Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 11 Semantics of Programming Languages Denotational Semantics Meaning of a program is defined as the mathematical

More information

Integer Operations. Overview. Grade 7 Mathematics, Quarter 1, Unit 1.1. Number of Instructional Days: 15 (1 day = 45 minutes) Essential Questions

Integer Operations. Overview. Grade 7 Mathematics, Quarter 1, Unit 1.1. Number of Instructional Days: 15 (1 day = 45 minutes) Essential Questions Grade 7 Mathematics, Quarter 1, Unit 1.1 Integer Operations Overview Number of Instructional Days: 15 (1 day = 45 minutes) Content to Be Learned Describe situations in which opposites combine to make zero.

More information

CS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions

CS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions CS 2112 Spring 2014 Assignment 3 Data Structures and Web Filtering Due: March 4, 2014 11:59 PM Implementing spam blacklists and web filters requires matching candidate domain names and URLs very rapidly

More information

Indiana State Core Curriculum Standards updated 2009 Algebra I

Indiana State Core Curriculum Standards updated 2009 Algebra I Indiana State Core Curriculum Standards updated 2009 Algebra I Strand Description Boardworks High School Algebra presentations Operations With Real Numbers Linear Equations and A1.1 Students simplify and

More information

Software Engineering Techniques

Software Engineering Techniques Software Engineering Techniques Low level design issues for programming-in-the-large. Software Quality Design by contract Pre- and post conditions Class invariants Ten do Ten do nots Another type of summary

More information

Sudoku puzzles and how to solve them

Sudoku puzzles and how to solve them Sudoku puzzles and how to solve them Andries E. Brouwer 2006-05-31 1 Sudoku Figure 1: Two puzzles the second one is difficult A Sudoku puzzle (of classical type ) consists of a 9-by-9 matrix partitioned

More information

Introducing Formal Methods. Software Engineering and Formal Methods

Introducing Formal Methods. Software Engineering and Formal Methods Introducing Formal Methods Formal Methods for Software Specification and Analysis: An Overview 1 Software Engineering and Formal Methods Every Software engineering methodology is based on a recommended

More information

Formally speaking: How to apply OCL

Formally speaking: How to apply OCL Page 1 of 6 Copyright IBM Corporation 2004 http://www-106.ibm.com/developerworks/rational/library/5390.html Search for: within All of dw Use + - ( ) " " Search help IBM home Products & services Support

More information

Analysis of the Specifics for a Business Rules Engine Based Projects

Analysis of the Specifics for a Business Rules Engine Based Projects Analysis of the Specifics for a Business Rules Engine Based Projects By Dmitri Ilkaev and Dan Meenan Introduction In recent years business rules engines (BRE) have become a key component in almost every

More information

Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design

Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design I. Automated Banking System Case studies: Outline Requirements Engineering: OO and incremental software development 1. case study: withdraw money a. use cases b. identifying class/object (class diagram)

More information

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Outline Using High-Level Conceptual Data Models for

More information

Using Alloy and UML/OCL to Specify Run-Time Configuration Management: A Case Study

Using Alloy and UML/OCL to Specify Run-Time Configuration Management: A Case Study Using Alloy and UML/OCL to Specify Run-Time Configuration Management: A Case Study Geri Georg Agilent Laboratories, Agilent Technologies, 4380 Zeigler Road, Fort Collins, Colorado 80525 geri_georg@agilent.com

More information

Formal Reasoning about Fine-Grained Access Control Policies

Formal Reasoning about Fine-Grained Access Control Policies Formal Reasoning about Fine-Grained Access Control Policies Miguel A. García de Dios Carolina Dania Manuel Clavel IMDEA Software Institute, Spain {miguelangel.garcia,carolina.dania,manuel.clavel}@imdea.org

More information

UML TUTORIALS THE COMPONENT MODEL

UML TUTORIALS THE COMPONENT MODEL UML TUTORIALS THE COMPONENT MODEL www.sparxsystems.com.au Sparx Systems 2004 Page 1/5 The component model illustrates the software components that will be used to build the system. These may be built up

More information

Network Model APPENDIXD. D.1 Basic Concepts

Network Model APPENDIXD. D.1 Basic Concepts APPENDIXD Network Model In the relational model, the data and the relationships among data are represented by a collection of tables. The network model differs from the relational model in that data are

More information

Algorithms are the threads that tie together most of the subfields of computer science.

Algorithms are the threads that tie together most of the subfields of computer science. Algorithms Algorithms 1 Algorithms are the threads that tie together most of the subfields of computer science. Something magically beautiful happens when a sequence of commands and decisions is able to

More information

T-79.232 Safety Critical Systems Case Study 2: B Method - Basic Concepts

T-79.232 Safety Critical Systems Case Study 2: B Method - Basic Concepts T-79.232 Safety Critical Systems Case Study 2: B Method - Basic Concepts February 21, 2008 T-79.5303: Case Study 2: B Method - Basic Concepts 2-1 B method - what is it about? B method describes entities

More information

Department of Computer Science, Institute for Software and Multimedia Technology OCL. by Example

Department of Computer Science, Institute for Software and Multimedia Technology OCL. by Example Department of Computer Science, Institute for Software and Multimedia Technology OCL (Object Constraint Language) by Example Dr. Birgit Demuth In theory, there is no difference between theory and practice.

More information

Detecting Defects in Object-Oriented Designs: Using Reading Techniques to Increase Software Quality

Detecting Defects in Object-Oriented Designs: Using Reading Techniques to Increase Software Quality Detecting Defects in Object-Oriented Designs: Using Reading Techniques to Increase Software Quality Current Research Team: Prof. Victor R. Basili Forrest Shull, Ph.D. Guilherme H. Travassos, D.Sc. (1)

More information

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.

Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database. Physical Design Physical Database Design (Defined): Process of producing a description of the implementation of the database on secondary storage; it describes the base relations, file organizations, and

More information

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share. LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.

More information

South Carolina College- and Career-Ready (SCCCR) Algebra 1

South Carolina College- and Career-Ready (SCCCR) Algebra 1 South Carolina College- and Career-Ready (SCCCR) Algebra 1 South Carolina College- and Career-Ready Mathematical Process Standards The South Carolina College- and Career-Ready (SCCCR) Mathematical Process

More information

Categories and Subject Descriptors D.2.2 [Software Engineering]: Design tools and techniques. General Terms Performance, Design, Verification.

Categories and Subject Descriptors D.2.2 [Software Engineering]: Design tools and techniques. General Terms Performance, Design, Verification. ABSTRACT Since the Web is becoming a platform for implementing complex B2C and B2B applications instead of simple content publishing sites, the need arises of imposing constraints on the navigation and

More information

COORDINATION CONTRACTS AS CONNECTORS IN COMPONENT-BASED DEVELOPMENT

COORDINATION CONTRACTS AS CONNECTORS IN COMPONENT-BASED DEVELOPMENT Integrated Design and Process Technology, IDPT-2002 Printed in the United States of America, June, 2002 2002 Society for Design and Process Science COORDINATION CONTRACTS AS CONNECTORS IN COMPONENT-BASED

More information

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook. Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

More information

How To Write A Test Engine For A Microsoft Microsoft Web Browser (Php) For A Web Browser For A Non-Procedural Reason)

How To Write A Test Engine For A Microsoft Microsoft Web Browser (Php) For A Web Browser For A Non-Procedural Reason) Praspel: A Specification Language for Contract-Driven Testing in PHP Ivan Enderlin Frédéric Dadeau Alain Giorgetti Abdallah Ben Othman October 27th, 2011 Meetings: LTP MTVV Ivan Enderlin, Frédéric Dadeau,

More information

Roadmap. Software Engineering. Software Engineering. Project Life Cycle. Database. Project Lifecycle

Roadmap. Software Engineering. Software Engineering. Project Life Cycle. Database. Project Lifecycle Database Project Lifecycle Philippe Bonnet, 2006 2 Software Engineering The implementation of a database application is a significant engineering endeavor The project must complete On time On budget The

More information

FTS Real Time Client: Equity Portfolio Rebalancer

FTS Real Time Client: Equity Portfolio Rebalancer FTS Real Time Client: Equity Portfolio Rebalancer Many portfolio management exercises require rebalancing. Examples include Portfolio diversification and asset allocation Indexation Trading strategies

More information

Chapter 1: Key Concepts of Programming and Software Engineering

Chapter 1: Key Concepts of Programming and Software Engineering Chapter 1: Key Concepts of Programming and Software Engineering Software Engineering Coding without a solution design increases debugging time - known fact! A team of programmers for a large software development

More information

1) Testing of general knowledge 25%. Each right question counts 1. Each wrong counts 0.5. Empty

1) Testing of general knowledge 25%. Each right question counts 1. Each wrong counts 0.5. Empty Exam 2 The exam consists of four parts: 1) Testing of general knowledge 25%. Each right question counts 1. Each wrong counts 0.5. Empty counts zero 2) Planning 25%. All sub-questions count equally. 3)

More information

Instant SQL Programming

Instant SQL Programming Instant SQL Programming Joe Celko Wrox Press Ltd. INSTANT Table of Contents Introduction 1 What Can SQL Do for Me? 2 Who Should Use This Book? 2 How To Use This Book 3 What You Should Know 3 Conventions

More information

Visual Basic Programming. An Introduction

Visual Basic Programming. An Introduction Visual Basic Programming An Introduction Why Visual Basic? Programming for the Windows User Interface is extremely complicated. Other Graphical User Interfaces (GUI) are no better. Visual Basic provides

More information

Notes on Plagiarism: An Electrical Engineering and Computer Science Perspective

Notes on Plagiarism: An Electrical Engineering and Computer Science Perspective Notes on Plagiarism: An Electrical Engineering and Computer Science Perspective This document supplements the material provided by the Learning Resource Center, available at this URL: http://www.lmu.edu/asset388.aspx

More information

A Framework for the Semantics of Behavioral Contracts

A Framework for the Semantics of Behavioral Contracts A Framework for the Semantics of Behavioral Contracts Ashley McNeile Metamaxim Ltd, 48 Brunswick Gardens, London W8 4AN, UK ashley.mcneile@metamaxim.com Abstract. Contracts have proved a powerful concept

More information

CIS 771: Software Specifications. Lecture 1: Course Overview

CIS 771: Software Specifications. Lecture 1: Course Overview CIS 771: Software Specifications Lecture 1: Course Overview Copyright 2001, Matt Dwyer, John Hatcliff, and Rod Howell. The syllabus and all lectures for this course are copyrighted materials and may not

More information

III. Class and Object Diagrams

III. Class and Object Diagrams III. Class and Object Diagrams Classes, Attributes and Operations Objects and Multi-objects Generalization and Inheritance Associations and Multiplicity Aggregation and Composition Business Objects and

More information

Software Development Phases

Software Development Phases Software Development Phases Specification of the task Design of a solution Implementation of solution Analysis of solution Testing and debugging Maintenance and evolution of the system Obsolescence Specification

More information

Python Programming: An Introduction To Computer Science

Python Programming: An Introduction To Computer Science Python Programming: An Introduction To Computer Science Chapter 8 Booleans and Control Structures Python Programming, 2/e 1 Objectives æ To understand the concept of Boolean expressions and the bool data

More information

Mathematics. What to expect Resources Study Strategies Helpful Preparation Tips Problem Solving Strategies and Hints Test taking strategies

Mathematics. What to expect Resources Study Strategies Helpful Preparation Tips Problem Solving Strategies and Hints Test taking strategies Mathematics Before reading this section, make sure you have read the appropriate description of the mathematics section test (computerized or paper) to understand what is expected of you in the mathematics

More information

A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:

A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and: Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)

More information

CSC 221: Computer Programming I. Fall 2011

CSC 221: Computer Programming I. Fall 2011 CSC 221: Computer Programming I Fall 2011 Python control statements operator precedence importing modules random, math conditional execution: if, if-else, if-elif-else counter-driven repetition: for conditional

More information

The Set Data Model CHAPTER 7. 7.1 What This Chapter Is About

The Set Data Model CHAPTER 7. 7.1 What This Chapter Is About CHAPTER 7 The Set Data Model The set is the most fundamental data model of mathematics. Every concept in mathematics, from trees to real numbers, is expressible as a special kind of set. In this book,

More information

Mechanics 1: Vectors

Mechanics 1: Vectors Mechanics 1: Vectors roadly speaking, mechanical systems will be described by a combination of scalar and vector quantities. scalar is just a (real) number. For example, mass or weight is characterized

More information

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program. Software Testing Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program. Testing can only reveal the presence of errors and not the

More information

River Dell Regional School District. Computer Programming with Python Curriculum

River Dell Regional School District. Computer Programming with Python Curriculum River Dell Regional School District Computer Programming with Python Curriculum 2015 Mr. Patrick Fletcher Superintendent River Dell Regional Schools Ms. Lorraine Brooks Principal River Dell High School

More information

MAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push) -----------------------------------------

MAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push) ----------------------------------------- =============================================================================================================================== DATA STRUCTURE PSEUDO-CODE EXAMPLES (c) Mubashir N. Mir - www.mubashirnabi.com

More information

A SYSTEMATIC APPROACH FOR COMPONENT-BASED SOFTWARE DEVELOPMENT

A SYSTEMATIC APPROACH FOR COMPONENT-BASED SOFTWARE DEVELOPMENT A SYSTEMATIC APPROACH FOR COMPONENT-BASED SOFTWARE DEVELOPMENT Cléver Ricardo Guareis de Farias, Marten van Sinderen and Luís Ferreira Pires Centre for Telematics and Information Technology (CTIT) PO Box

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

Role-based Authorization Constraints Specification Using Object Constraint Language

Role-based Authorization Constraints Specification Using Object Constraint Language Role-based Authorization Constraints Specification Using Object Constraint Language Gail-Joon Ahn Department of Computer Science University of North Carolina at Charlotte gahn@uncc.edu Michael. E. Shin

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

QaTraq Pro Scripts Manual - Professional Test Scripts Module for QaTraq. QaTraq Pro Scripts. Professional Test Scripts Module for QaTraq

QaTraq Pro Scripts Manual - Professional Test Scripts Module for QaTraq. QaTraq Pro Scripts. Professional Test Scripts Module for QaTraq QaTraq Pro Scripts Professional Test Scripts Module for QaTraq QaTraq Professional Modules QaTraq Professional Modules are a range of plug in modules designed to give you even more visibility and control

More information

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following:

Classes and Objects in Java Constructors. In creating objects of the type Fraction, we have used statements similar to the following: In creating objects of the type, we have used statements similar to the following: f = new (); The parentheses in the expression () makes it look like a method, yet we never created such a method in our

More information

Grade 6 Mathematics Assessment. Eligible Texas Essential Knowledge and Skills

Grade 6 Mathematics Assessment. Eligible Texas Essential Knowledge and Skills Grade 6 Mathematics Assessment Eligible Texas Essential Knowledge and Skills STAAR Grade 6 Mathematics Assessment Mathematical Process Standards These student expectations will not be listed under a separate

More information

Structural Analysis - II Prof. P. Banerjee Department of Civil Engineering Indian Institute of Technology, Bombay. Lecture - 02

Structural Analysis - II Prof. P. Banerjee Department of Civil Engineering Indian Institute of Technology, Bombay. Lecture - 02 Structural Analysis - II Prof. P. Banerjee Department of Civil Engineering Indian Institute of Technology, Bombay Lecture - 02 Good morning. Today is the second lecture in the series of lectures on structural

More information

UML-based Test Generation and Execution

UML-based Test Generation and Execution UML-based Test Generation and Execution Jean Hartmann, Marlon Vieira, Herb Foster, Axel Ruder Siemens Corporate Research, Inc. 755 College Road East Princeton NJ 08540, USA jeanhartmann@siemens.com ABSTRACT

More information

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by SUBGROUPS OF CYCLIC GROUPS KEITH CONRAD 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by g = {g k : k Z}. If G = g, then G itself is cyclic, with g as a generator. Examples

More information

Chapter II. Controlling Cars on a Bridge

Chapter II. Controlling Cars on a Bridge Chapter II. Controlling Cars on a Bridge 1 Introduction The intent of this chapter is to introduce a complete example of a small system development. During this development, you will be made aware of the

More information

Precisely Target the Right Audience

Precisely Target the Right Audience Precisely Target the Right Audience With Upsight Segmentation, you can create custom user segments from any combination of the 11 dimensions where Upsight automatically collects data. These segments provide

More information

SECTION 10-2 Mathematical Induction

SECTION 10-2 Mathematical Induction 73 0 Sequences and Series 6. Approximate e 0. using the first five terms of the series. Compare this approximation with your calculator evaluation of e 0.. 6. Approximate e 0.5 using the first five terms

More information

Introduction to SQL for Data Scientists

Introduction to SQL for Data Scientists Introduction to SQL for Data Scientists Ben O. Smith College of Business Administration University of Nebraska at Omaha Learning Objectives By the end of this document you will learn: 1. How to perform

More information

Discrete Math in Computer Science Homework 7 Solutions (Max Points: 80)

Discrete Math in Computer Science Homework 7 Solutions (Max Points: 80) Discrete Math in Computer Science Homework 7 Solutions (Max Points: 80) CS 30, Winter 2016 by Prasad Jayanti 1. (10 points) Here is the famous Monty Hall Puzzle. Suppose you are on a game show, and you

More information

2. Basic Relational Data Model

2. Basic Relational Data Model 2. Basic Relational Data Model 2.1 Introduction Basic concepts of information models, their realisation in databases comprising data objects and object relationships, and their management by DBMS s that

More information

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Introduction to Programming (in C++) Loops Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Example Assume the following specification: Input: read a number N > 0 Output:

More information

Discrete Optimization

Discrete Optimization Discrete Optimization [Chen, Batson, Dang: Applied integer Programming] Chapter 3 and 4.1-4.3 by Johan Högdahl and Victoria Svedberg Seminar 2, 2015-03-31 Todays presentation Chapter 3 Transforms using

More information

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification:

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification: Example Introduction to Programming (in C++) Loops Assume the following specification: Input: read a number N > 0 Output: write the sequence 1 2 3 N (one number per line) Jordi Cortadella, Ricard Gavaldà,

More information

Project VIDE Challenges of Executable Modelling of Business Applications

Project VIDE Challenges of Executable Modelling of Business Applications Project VIDE Challenges of Executable Modelling of Business Applications Radoslaw Adamus *, Grzegorz Falda *, Piotr Habela *, Krzysztof Kaczmarski #*, Krzysztof Stencel *+, Kazimierz Subieta * * Polish-Japanese

More information

Organization of DSLE part. Overview of DSLE. Model driven software engineering. Engineering. Tooling. Topics:

Organization of DSLE part. Overview of DSLE. Model driven software engineering. Engineering. Tooling. Topics: Organization of DSLE part Domain Specific Language Engineering Tooling Eclipse plus EMF Xtext, Xtend, Xpand, QVTo and ATL Prof.dr. Mark van den Brand GLT 2010/11 Topics: Meta-modeling Model transformations

More information

Semantic Errors in SQL Queries: A Quite Complete List

Semantic Errors in SQL Queries: A Quite Complete List Semantic Errors in SQL Queries: A Quite Complete List Christian Goldberg, Stefan Brass Martin-Luther-Universität Halle-Wittenberg {goldberg,brass}@informatik.uni-halle.de Abstract We investigate classes

More information

Tips for writing good use cases.

Tips for writing good use cases. Transforming software and systems delivery White paper May 2008 Tips for writing good use cases. James Heumann, Requirements Evangelist, IBM Rational Software Page 2 Contents 2 Introduction 2 Understanding

More information

Efficient Data Structures for Decision Diagrams

Efficient Data Structures for Decision Diagrams Artificial Intelligence Laboratory Efficient Data Structures for Decision Diagrams Master Thesis Nacereddine Ouaret Professor: Supervisors: Boi Faltings Thomas Léauté Radoslaw Szymanek Contents Introduction...

More information

2014 HSC Software Design and Development Marking Guidelines

2014 HSC Software Design and Development Marking Guidelines 014 HSC Software Design and Development Marking Guidelines Section I Multiple-choice Answer Key Question Answer 1 B A A 4 D 5 A 6 D 7 A 8 B 9 C 10 D 11 B 1 B 1 A 14 A 15 B 16 D 17 C 18 C 19 D 0 D 1 Section

More information

CRM Rules! User Guide. Version 3.0.2 Prepared October, 2012 By: David L. Carr, President, Visionary Software

CRM Rules! User Guide. Version 3.0.2 Prepared October, 2012 By: David L. Carr, President, Visionary Software CRM Rules! User Guide Version 3.0.2 Prepared October, 2012 By: David L. Carr, President, Visionary Software Table Of Contents Chapter 1: Overview... 5 What s a CRM Rule?... 5 What Can I Do With CRM Rules!?...

More information

GContracts Programming by Contract with Groovy. Andre Steingress

GContracts Programming by Contract with Groovy. Andre Steingress FÕ Ò ŃÔ PŎ ÑŇÒ P ÌM Œ PÑǾ PÒ PÕ Ñ Œ PŘÕ Ñ GContracts Programming by Contract with Groovy Andre Steingress Andre FÕ Ò ŃÔ PŎ ÑŇÒ P ÌM Œ PSteingress ÑǾ PÒ PÕ Ñ Œ PŘÕ Ñ Independent Software Dev @sternegross,

More information

Managing Software Evolution through Reuse Contracts

Managing Software Evolution through Reuse Contracts VRIJE UNIVERSITEIT BRUSSEL Vrije Universiteit Brussel Faculteit Wetenschappen SCI EN T I A V INCERE T ENE BRA S Managing Software Evolution through Reuse Contracts Carine Lucas, Patrick Steyaert, Kim Mens

More information

Answer Key for California State Standards: Algebra I

Answer Key for California State Standards: Algebra I Algebra I: Symbolic reasoning and calculations with symbols are central in algebra. Through the study of algebra, a student develops an understanding of the symbolic language of mathematics and the sciences.

More information

16.1 MAPREDUCE. For personal use only, not for distribution. 333

16.1 MAPREDUCE. For personal use only, not for distribution. 333 For personal use only, not for distribution. 333 16.1 MAPREDUCE Initially designed by the Google labs and used internally by Google, the MAPREDUCE distributed programming model is now promoted by several

More information

MDA and Analysis of Web Applications

MDA and Analysis of Web Applications MDA and Analysis of Web Applications Behzad Bordbar and Kyriakos Anastasakis School of Computer Science, University of Birmingham, Birmingham, B15 2TT, UK {B.Bordbar,K.Anastasakis}@cs.bham.ac.uk Abstract.

More information

Verification of Good Design Style of UML Models

Verification of Good Design Style of UML Models Verification of Good Design Style of UML Models Bogumiła Hnatkowska 1 1 Institute of Applied Informatics, Wrocław University of Technology, Wybrzeże Wyspiańskiego 27, 50-370 Wrocław, Poland Bogumila.Hnatkowska@pwr.wroc.pl

More information

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

More information