Software Development Cycle From Wikipedia: fe-cycle

Slides:



Advertisements
Similar presentations
OO Programming in Java Objectives for today: Overriding the toString() method Polymorphism & Dynamic Binding Interfaces Packages and Class Path.
Advertisements

A subclass can add new private instance variables A subclass can add new public, private or static methods A subclass can override inherited methods A.
Inheritance. Many objects have a hierarchical relationship –Examples: zoo, car/vehicle, card game, airline reservation system Inheritance allows software.
METHOD OVERRIDING Sub class can override the methods defined by the super class. Overridden Methods in the sub classes should have same name, same signature.
METHOD OVERRIDING 1.Sub class can override the methods defined by the super class. 2.Overridden Methods in the sub classes should have same name, same.
Software Engineering-II Sir zubair sajid. What’s the difference? Verification – Are you building the product right? – Software must conform to its specification.
Chapter 1 OO using C++. Abstract Data Types Before we begin we should know how to accomplish the goal of the program We should know all the input and.
Debugging Techniques1. 2 Introduction Bugs How to debug Using of debugger provided by the IDE Exception Handling Techniques.
Inheritance and object compatibility Object type compatibility An instance of a subclass can be used instead of an instance of the superclass, but not.
Lecture 27 Exam outline Boxing of primitive types in Java 1.5 Generic types in Java 1.5.
1 Lecture 3 Inheritance. 2 A class that is inherited is called superclass The class that inherits is called subclass A subclass is a specialized version.
Inheritance. In this chapter, we will cover: The concept of inheritance Extending classes Overriding superclass methods Working with superclasses that.
Slides prepared by Rose Williams, Binghamton University Chapter 13 Interfaces and Inner Classes.
ISBN Chapter 9 Subprograms. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Introduction Two fundamental abstraction facilities.
Static and Dynamic Behavior Fall 2005 OOPD John Anthony.
Java Review 2 – Errors, Exceptions, Debugging Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Polymorphism. Lecture Objectives To understand the concept of polymorphism To understand the concept of static or early binding To understand the concept.
Vocabulary Key Terms polymorphism - Selecting a method among many methods that have the same name. subclass - A class that inherits variables and methods.
Shallow Versus Deep Copy and Pointers Shallow copy: when two or more pointers of the same types point to the same memory – They point to the same data.
Testing Dr. Andrew Wallace PhD BEng(hons) EurIng
Java Course Outline Kumar Harshit, USW. Course Description Teaches students to program using the Java programming language with the help of the Netbeans.
Advanced Inheritance Concepts. In this chapter, we will cover: Creating and using abstract classes Using dynamic method binding Creating arrays of subclass.
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
Learners Support Publications Pointers, Virtual Functions and Polymorphism.
Polymorphism. Introduction ‘one name multiple forms’ Implemented using overloaded functions and operators Early binding or static binding or static linking.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
BASE CLASSES AND INHERITANCE CHAPTER 4. Engineer Class.
Comp 249 Programming Methodology Chapter 8 - Polymorphism Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia University, Montreal,
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Software Testing.
Method Overriding Remember inheritance: when a child class inherits methods, variables, etc from a parent class. Example: public class Dictionary extends.
Core Java: Essential Features 08/05/2015 Kien Tran.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
Inheritance - Polymorphism ITI 1121 Nour El Kadri.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Polymorphism. 3 main programming mechanisms that constitute OOP: 1. Encapsulation 2. Inheritance 3. Polymorphism.
Data Structures Using Java1 Chapter 2 Inheritance and Exception Handling.
Object Oriented Software Development
Inheritance (Part 4) Polymorphism and Abstract Classes 1.
Pre- and postconditions, Using assertions and exceptions 1 Pre- and postconditions Using assertions and exceptions.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
10 Polymorphism. 2 Contents Defining Polymorphism Method Overloading Method Overriding Early Binding and Late Binding Implementing Polymorphism.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
1 COSC2007 Data Structures II Chapter 9 Class Relationships.
Interfaces Chapter 9. 9 Creating Interfaces An interface is a contract. Every class that implements the interface must provide the interface’s defined.
ERRORS. Types of errors: Syntax errors Logical errors.
Method Overriding Remember inheritance: when a child class inherits methods, variables, etc from a parent class. Example: public class Dictionary extends.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Programming & Debugging. Key Programming Issues Modularity Modifiability Ease of Use Fail-safe programming Style Debugging.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
COP INTERMEDIATE JAVA Inheritance, Polymorphism, Interfaces.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
CSCI-383 Object-Oriented Programming & Design Lecture 17.
Throw, Throws & Try-Catch Statements Explanations and Pictures from: Reference:
Chapter 6 Testing and running a solution. Errors X Three types Syntax Logic Run-time.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Polymorphism in Methods
Testing Tutorial 7.
CS1101X Programming Methodology
Testing and Debugging.
ATS Application Programming: Java Programming
Object Oriented Programming
Polymorphism Polymorphism
Parameter Passing Actual vs formal parameters
Java – Inheritance.
Algorithm Correctness
Polymorphism CT1513.
Inheritance CT1513.
CSE 1020:Software Development
Presentation transcript:

Software Development Cycle From Wikipedia: fe-cycle fe-cycle  Preliminary Analysis  Systems analysis, requirements definition  Systems design  Development  Integration and testing  Acceptance, installation, deployment  Maintenance

Validation vs. Verification  Validation involves testing: white box vs. black box testing, alpha- and beta-test  Testing may be thorough, but not exhaustive  Verification is (mathematically) proving that the program meets the input/output specifications.  Use formal procedures

Types of Errors  Syntax Errors: Missing ; { }, misspelling, case differences, missing declarations, missing import statement,...  Run-time Errors: Array boundary violations, null pointer exception,...  Design Flaw: Misunderstanding of program requirements, program works sometimes, but not always

Debugging Strategies  Strategic printing: System.err.println()  Print out values of parameters when entering method and return values before leaving to isolate the error  Use of debugger:  Setting breakpoints, watches  Allows user to interact as program runs

Polymorphism  An object may be of more than one class, e.g., a Ship is a Thing is an Object (due to inheritance)  A derived class may override methods of the base class  Which method is called?  Especially tricky because variables may be cast to other types from what was declared, e.g., Thing[][] b = new Thing[10][10]; b[0][0] = new Ship(4,"Battleship",'B');

Early vs. Late Binding  Early, or static, binding is when the choice is made at compile time. The type of the variable is used to determine which method is called. For example, b[0][0].shootAt() would call the Thing shootAt() method, not the Ship one.  Late, or dynamic, binding is when the choice is made at run-time. The type of the actual object is used to select the method, so Ship shootAt() is called.  Java uses late binding.  This means that objects must know their types.

Static Methods  Since static methods belong to the class, not to an object, late binding cannot be used for them.  Static methods use early, or static, binding. The type of variable determines the method that is called.

Final Modifier  A class may be declared to be final which means that is cannot be subclassed.  A method may be declared to be final which means that it may not be overidden.