Presentation is loading. Please wait.

Presentation is loading. Please wait.

BCS 2143 Introduction to Object Oriented and Software Development.

Similar presentations


Presentation on theme: "BCS 2143 Introduction to Object Oriented and Software Development."— Presentation transcript:

1 BCS 2143 Introduction to Object Oriented and Software Development

2 Objectives Able to define OO concepts. Understand the importance of OOP.

3 Outline OO Definition OO Concepts OO Benefits

4 OO Definition

5 A method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class Object-oriented programs use objects as components Reusable software components that model real-world items

6 OO Concepts Objects and Classes Attributes - including the object's characteristics (fields or properties) Behaviors (methods) - the things it can do, or operations or features) Inheritance Encapsulation - the code for a class should be relatively self-contained

7 Objects and Classes An object is a thing, both tangible and intangible. Objects - Look all around you Account, Vehicle, Employee, People, animals, plants, cars, etc To create an object inside the computer program, we must provide a definition for objects - how they behave (methods) and what kinds of information they maintain (data values) - called a class.

8 Objects and Classes An object is called an instance of a class. Example: Vehicle A rectangle to represent a class with its name appearing inside the rectangle.

9 Message and Methods To instruct a class or an object to perform a task, we send a message to it. You can send a message only to the classes and objects that understand the message you sent to them. A class or an object must possess a matching method to be able to handle the received message. A method defined for a class is called a class method, and a method defined for an object is called an instance method. A value we pass to an object when sending a message is called an argument of the message.

10 Message and Methods Methods - An object's or class’s abilities (sometimes referred to as "functions") Message - The process by which an object sends data to another object or asks the other object to invoke a method

11 Message and Methods (example) current balance getCurrentBalance() Ask for the current balance of this particular account. SV198 : BankAccount The current balance of SV198 is returned.

12 Inheritance Inheritance is a mechanism to design two or more entities that are different but share many common features. Features common to all classes are defined in the superclass. The classes that inherit common features from the superclass are called subclasses. also call the superclass an ancestor and the subclass a descendant.

13 Inheritance Here are the superclass Account and its subclasses Current Account and Saving Account. Current Account Saving Account

14 OO Programming Implements OO design into program codes. Several examples of OO languages : C++ Java VB.NET C# Smalltalk

15 What is Java Technology? Java technology is An OO programming language A development environment An application environment A deployment environment

16 OO Benefits “reuse, reuse, reuse” Reusable software components. Saves development time and efforts. Build more reliable and effective systems. Additional software features can be added by combining classes.

17 Software Engineering Much like building a skyscraper, we need a disciplined approach in developing complex software applications. Software engineering is the application of a systematic and disciplined approach to the development, testing, and maintenance of a program. In this class, we will learn how to apply sound software engineering principles when we develop sample programs.

18 Software Development Software life cycle Five primary phases : Analysis, Design, Implementation, Test and Operation/maintenance. UML serves as modeling tool for software developments. Use UML diagrams to construct and explain software designs.

19 Software Life Cycle The sequence of stages from conception to operation of a program is called software life cycle. Five stages are: Analysis > requirement spec Design > a set of classes/objects Implementation > program codes Testing > unit and integration testing Operation and Maintenance > put in actual use

20 More for info, log on to… http://java.sun.com/ http://www.omg.org/uml

21 Summary

22 Q & A


Download ppt "BCS 2143 Introduction to Object Oriented and Software Development."

Similar presentations


Ads by Google