Introduction to Computer Programming

Similar documents
Information System Design IT60105

Static Program Analysis

An object-oriented design process. Weather system description. Layered architecture. Process stages. System context and models of use

Information System Desig

ECE 407 Computer Aided Design for Electronic Systems. Simulation. Instructor: Maria K. Michael. Overview

Model Checking: An Introduction

Transactions on Information and Communications Technologies vol 18, 1998 WIT Press, ISSN

Sequential Logic (3.1 and is a long difficult section you really should read!)

Section A.6. Solving Equations. Math Precalculus I. Solving Equations Section A.6

Static Program Analysis using Abstract Interpretation

Robust Programs with Filtered Iterators

Lexical Analysis: DFA Minimization & Wrap Up

Axiomatic Semantics. Operational semantics. Good for. Not good for automatic reasoning about programs

Fault Localization in In Vivo Software Testing

Requirements Validation. Content. What the standards say (*) ?? Validation, Verification, Accreditation!! Correctness and completeness

UML modeling for INF5150

Probabilistic NetKAT

Computer Science Introductory Course MSc - Introduction to Java

The State Explosion Problem

Formal Specification and Verification. Specifications

Abstract Machine for Software Process Models

Recursive descent for grammars with contexts

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

md5bloom: Forensic Filesystem Hashing Revisited

List reversal: back into the frying pan

Acceptance Test. Mohamed Mussa, Ferhat Khendek

What if the characteristic equation has a double root?

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

Program Verification using Separation Logic Lecture 0 : Course Introduction and Assertion Language. Hongseok Yang (Queen Mary, Univ.

Applying Predicate Logic to Monitoring Network Traffic

FSM model for sequential circuits

Lecture Notes on Quantification

MTAT Software Engineering

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

MULTIPLE CHOICE QUESTIONS DECISION SCIENCE

Theoretical Foundations of the UML

Comp 11 Lectures. Dr. Mike Shah. August 9, Tufts University. Dr. Mike Shah (Tufts University) Comp 11 Lectures August 9, / 34

Use the Rational Zero Theorem to list all the possible rational zeros of the following polynomials. (1-2) 4 3 2

Intelligent Sound Bubbles. Dragica Kahlina sound artist & musician (

DO NOT COPY DO NOT COPY

FACULTY OF SCIENCE ACADEMY OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING OBJECT ORIENTED PROGRAMMING DATE 07/2014 SESSION 8:00-10:00

BASIC CONCEPTS OF ABSTRACT INTERPRETATION

Quantum Functional Programming Language & Its Denotational Semantics

INTRODUCTION TO HASHING Dr. Thomas Hicks Trinity University. Data Set - SSN's from UTSA Class

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Engineered System Design and Integration A semantic domain for modeling cyber-physical systems

Semantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr

Geosciences Data Digitize and Materialize, Standardization Based on Logical Inter- Domain Relationships GeoDMS

The Helicoidal Life Cycle A Tool for Software Development and Enhancement

Entropy as a Measure of Object-Oriented Design Quality

A Better Interface Between Scientists and Data Reduction Software

31 Dec '01 07 Jan '02 14 Jan '02 21 Jan '02 28 Jan '02 M T W T F S S M T W T F S S M T W T F S S M T W T F S S M T W T F S S

A Reconfigurable Quantum Computer

UML. Design Principles.

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Black-box testing TDDD04 Lecture 2

EECS 579: Logic and Fault Simulation. Simulation

Proving Real-time Properties of Embedded Software Systems 0-0

Integration and Higher Level Testing

ITI Introduction to Computing II

MCS 260 Exam 2 13 November In order to get full credit, you need to show your work.

Provable Security Proofs and their Interpretation in the Real World

Compilers. Lexical analysis. Yannis Smaragdakis, U. Athens (original slides by Sam

Revisit summer... go to the Fitzwilliam Museum!

System Design: Architectures and Archetypes. Stephen J. Mellor Project Technology, Inc.

Deductive Verification

Formal Verification of Mathematical Algorithms

Workshop 1a: Software Measurement. Dietmar Pfahl

Introduction to Software Engineering

Alan Bundy. Automated Reasoning LTL Model Checking

Factors, Zeros, and Roots

Solving Quadratic Equations by Formula

End-of-chapter test Chapter 2 Foundation

Logical design of digital systems

To solve a radical equation, you must take both sides of an equation to a power.

Transformation of a PID Controller for Numerical Accuracy

VERIFICATION OF A LARGE DISCRETE SYSTEM USING ALGEBRAIC METHODS

CTL Model Update Implementation Using ANTLR Tools

Proving Security Protocols Correct. Lawrence C. Paulson Computer Laboratory

Expressing Dynamics of Mobile Programs by Typing

Structural Induction

ENG202 Statics Lecture 16, Section 7.1

Probabilistic Model Checking and Strategy Synthesis for Robot Navigation

ACTIVE VIBRATION CONTROL PROTOTYPING IN ANSYS: A VERIFICATION EXPERIMENT

AN OBJECT-ORIENTED DATA MODEL FOR DIGITAL CARTOGRAPHIC OBJECT

Lecture Notes on Programs with Arrays

More About Methods. Hsuan-Tien Lin. Deptartment of CSIE, NTU. OOP Class, March 8-9, 2010

Introduction to Logic in Computer Science: Autumn 2006

Inverse problems. High-order optimization and parallel computing. Lecture 7

COSE312: Compilers. Lecture 17 Intermediate Representation (2)

GCE. Mathematics. Mark Scheme for June Advanced Subsidiary GCE Unit 4722: Core Mathematics 2. Oxford Cambridge and RSA Examinations

Chapter Six. Polynomials. Properties of Exponents Algebraic Expressions Addition, Subtraction, and Multiplication Factoring Solving by Factoring

Agile modeling for INF5150

Lecture Notes 20: Zero-Knowledge Proofs

A quadratic expression is a mathematical expression that can be written in the form 2

Web GIS: Architectural Patterns and Practices. Shannon Kalisky Philip Heede

M. Vable Mechanics of Materials: Chapter 5. Torsion of Shafts

CA Compiler Construction

Information Flow Inference for ML

What Every Programmer Should Know About Floating-Point Arithmetic DRAFT. Last updated: November 3, Abstract

Transcription:

Introduction to Computer Programming Lecture 01 Software engineering is a field of engineering, for designing and writing programs for computers or other electronic devices. A software engineer, or programmer, writes software (or changes existing software) and compiles software using methods that improve it. Kasun@dscs.sjp.ac.lk Department of Computer Science University of Sri Jayewardanepura 2 The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software. An engineering discipline that is concerned with all aspects of software production. Structure Programming Data & process centric Global data - unsecure Repeat code segments Uses Flowcharts, DFD, ER etc. for diagramming OOP Real world concepts more understandable Secure Reusable Uses Unified Modeling Language (UML) for diagramming 3 4 The main program coordinates calls to procedures and hands over appropriate data as parameters. Objects of the program interact by sending messages to each other 1

Analysis SRS To identify what to be solve Feasibility Worth while of solving Elicitation Designing SDS Large system, team work, long time, huge money Words are ambiguous, No language barrier, Quick massage, different views Coding Testing Deployment Maintenance 7 8 Analysis Designing Coding Testing Maintenance Waterfall Model Iterative Model V-Shaped Model Verification and Validation model Spiral Model Big Bang Model RAD Prototyping Agile Model 9 7/28/2017 10 7/28/2017 11 7/28/2017 12 2

13 14 15 16 17 18 3

19 20 7/28/2017 21 7/28/2017 22 DFD maps out the flow of information for any process or system. Process Datastore Dataflow External Entity 23 24 4

7/28/2017 25 Kasun@dscs.sjp.ac.lk - Faculty of Applied Sciences of USJP 26 7/28/2017 27 Kasun@dscs.sjp.ac.lk - Faculty of Applied Sciences of USJP 28 29 30 5

31 32 33 34 35 36 6

Action Stubs Condition Stubs 7/28/2017 Rules Div by 4 Conditions and Actions Rule 1 1993 Rule 2 2016 Rule 3 1900 Rule 4 2000 C1 : Year Div by 4 N Y Y Y C2 : Year Div by 100 N N Y Y N Not leap year Y Div by 100 N Y C3 : Year Div by 400 N N N Y A1 : Leap year N Y N Y...... Leap year Div by 400 N Not leap year Y Leap year 7/28/2017 37 Kasun@dscs.sjp.ac.lk - Faculty of Applied Sciences of USJP 38 39 40 41 42 7

43 44 45 46 47 48 8

49 50 51 52 53 54 9

55 56 57 58 59 60 10

61 62 Syntax Compiler can detect. Logical Incorrect logic. Compiler can t detect. Should detect by humans. Most hard to detect. Run time Memory overflows, System failures due to incorrect inputs and etc. 63 64 Black box testing. Don t see the code, check inputs & outputs. White box testing inputs, outputs and the code. Unit testing each module(function) separately. Integration testing whole system together. Acceptance testing with client. Alpha testing real data but simulated or selected environment. Beta testing real data in real environment. 65 66 11

Manual Automatic Static Code Inspection Syntax checking Dynamic Desk checking Code walkthrough Unit testing Integration testing 67 68 69 If a=0, then it is a Linear Equation Else it is a quadratic equation of one of these cases b 2 4ac Case 1 : delta=0 : One real root Case 2 : delta>0 : Two real roots Case 3 : delta<0 : Two imaginary roots ax 2 bx c 0 b x b 2 4ac 2a 70 ID Test Case Inputs Expected output Observed output 1 Linear equation 2 Two real roots 3 One real root a = 0, b = 4, c = 5 a = 1, b = -7, c = 12 a = 1, b = 2, c = 1 4 Two imaginary roots a = 1, b = 2, c = 10 X = - 0.8 X 1 = 3 X 2 = 4 X 1 = -1 X 2 = -1 X 1 = -1 + 3i X 2 = -1-3i X 7/28/2017 71 Kasun@dscs.sjp.ac.lk - Faculty of Applied Sciences of USJP 72 12

73 74 13