1 / 22

BCS 2143

BCS 2143. Introduction to Object Oriented and Software Development. Objectives. Able to define OO concepts. Understand the importance of OOP. Outline. OO Definition OO Concepts OO Benefits. OO Definition. OO Definition.

Télécharger la présentation

BCS 2143

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. OO Definition • 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. A rectangle to represent a class with its name appearing inside the rectangle. Vehicle Objects and Classes • An object is called an instance of a class. • Example:

  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. Ask for the current balance of this particular account. getCurrentBalance() current balance SV198 : BankAccount The current balance of SV198 is returned. Message and Methods (example)

  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. Current Account Saving Account Account Inheritance • Here are the superclass Account and its subclasses Current Account and 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

More Related