CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Advertisements

Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Object-Oriented Analysis and Design
Chapter 1 Object-Oriented System Development
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 14 Programming and Languages.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Basic OOP Concepts and Terms
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Computers: Tools for an Information Age
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 1 Program Design
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter N - 1 Chapter 13 Polymorphism is-a relationships Interfaces.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 1 Introduction to Object-Oriented Programming.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
Programming and Languages Chapter Competencies (Page 1 of 2) Describe the six steps of programming Discuss design tools including top-down design,
McGraw-Hill Technology Education © 2006 by the McGraw-Hill Companies, Inc. All rights reserved CHAPTER PROGRAMMING AND LANGUAGES.
1414 CHAPTER PROGRAMMING AND LANGUAGES. © 2005 The McGraw-Hill Companies, Inc. All Rights Reserved Competencies Describe the six steps of programming.
BACS 287 Basics of Object-Oriented Programming 1.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
Introduction To System Analysis and design
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Programming Languages: Telling the Computers What to Do Chapter 16.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 1: Introduction to Object-Oriented Programming.
BCS 2143 Introduction to Object Oriented and Software Development.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
Unified Modeling Language, Version 2.0
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Computer Concepts 2014 Chapter 12 Computer Programming.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Advanced Object- Oriented Programming Programming Right from the Start with Visual Basic.NET 1/e 14.
IT 21103/41103 System Analysis & Design. Chapter 05 Object Modeling.
Chapter 12 Computer Programming. Chapter Contents Chapter 12: Computer Programming 2  Section A: Programming Basics  Section B: Procedural Programming.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design, 2 nd Edition Copyright 2003 © John Wiley & Sons, Inc. All rights reserved.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 14 Programming and Languages McGraw-Hill/Irwin Copyright © 2008 by The McGraw-Hill Companies, Inc. All rights reserved.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 1 An Introduction to Visual Basic.NET and Program Design.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
The Movement To Objects
Systems Analysis and Design
The Object-Oriented Thought Process Chapter 1
Systems Analysis and Design With UML 2
About the Presentations
Computer Programming.
Basic OOP Concepts and Terms
Presentation transcript:

CHAPTER ONE Problem Solving and the Object- Oriented Paradigm

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Objectives Understand problem-solving concepts. Formulate algorithms using pseudocode. Realize the complexity writing algorithms. Understand an event-driven environment. Describe how classes and objects work. Use and understand the terminology of the object paradigm.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Objectives (cont.) Demonstrate the difference between visual and nonvisual software components. Begin understanding the relationship of Visual Basic.NET to the event-driven and object paradigms.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Problem Solving Use computer software to help solve problems. –Sample Problem Problem Description –Find the largest number in the set of numbers. Describing Your Solution –Solve the problem yourself. –Formulate your solution approach. –Translate your solution.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Problem Solving (cont.) Pseudocode (false code) is an outline style used to document the solution to a program. Algorithm is the formal term for the set of steps used to solve a problem.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Problem Solving (cont.) Algorithms –A set of ordered steps for solving a problem, such as a mathematical formula or the instructions in a program. The terms algorithm and logic are synonymous. Both refer to a sequence of steps to solve a problem. Taken from TechEncyclopedia.com.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Problem Solving (cont.) Algorithms (cont.) –A formula or set of steps for solving a particular problem. To be an algorithm, a set of rules must be unambiguous and have a clear stopping point. Algorithms can be expressed in any language, from natural languages like English or French to programming languages like Visual Basic.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Problem Solving (cont.) Getting Data and Displaying Results –Most algorithms need data. –You must be able to display the results of an algorithm. –Input data must be accurate. –Algorithm results range from simple to complex.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Problem Solving (cont.) Getting Data and Displaying Results (cont.) –Major Tasks of a Computer-Base Solution Write appropriate computer code to accept and validate data. Write appropriate computer code to implement the algorithm. Write appropriate code to format the results.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved The Event-Driven Problem- Solving Environment Most of today’s computer applications are event driven. Helps developer organize a solution into small segments of code. One organizes a solution around a series of events.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using the Object-Oriented Paradigm in Problem Solving Classes and Objects –Payroll System problem. –Procedural programming has separate data and program logic. –Object-oriented programming (OOP) combines the data and program logic. –Methods describe the behavior associated with an object. –Encapsulates means an object holds in its capsule both data and behavior.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using the Object-Oriented Paradigm in Problem Solving (cont.) –A class is a definition or template that defines how objects are created. –An instance of a class is another name for an object. –Special methods known as classes methods may be accessed by a class. –Each object instantiated from a class has identical data elements and methods.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved UML

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using the Object-Oriented Paradigm in Problem Solving (cont.) Class Hierarchies –The “is a” relationship may be used describe class hierarchies. –A UML (Unified Modeling Language) class diagram may be used to define classes. –A subclass descends from a superclass or base class. –A superclass contains data and behavior common to subclasses.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using the Object-Oriented Paradigm in Problem Solving (cont.) Inheritance means a subclass acquires all data elements and behaviors of its related superclasses. Member describes the contents of a class. Siblings describe any two or more classes that descend from the same superclass. An abstract class provides a base class but cannot be used to instantiate objects.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using the Object-Oriented Paradigm in Problem Solving (cont.) Benefits of Using Object Orientation in Problem Solving –Reflects the natural way we think. –The same class definition can be used in many applications. Supports the concept of code reuse. –In creating a subclass, we automatically inherit all members from the superclass. –Polymorphism enables the same method to assume different behavior.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Using the Object-Oriented Paradigm in Problem Solving (cont.) Visual versus Nonvisual Components –Some objects can be seen on the GUI. –Other objects cannot be seen on the GUI. –Microsoft provides both visual and nonvisual components with Visual Basic.NET.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Object Paradigm in Visual Basic.NET Supports both the procedural and object- oriented paradigms. Supports both visual and nonvisual classes. Fully supports inheritance and polymorphism. A namespace identifies a set of classes that are treated as a group.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Chapter Summary Problem solving with a computer requires the developer to first solve the problem without a computer. Writing algorithms may be difficult. Most computer applications also include code to obtain input data and to display results. An event-driven environment is an application which responds to events generated by the user or by the system.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Chapter Summary (cont.) In an event-driven environment, code is organized into small units called event procedures. Objects are software components created from a template called a class. Each class template defines data and behaviors that each object created from the class possesses.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Chapter Summary (cont.) Classes can be arranged in hierarchies that define a set of “is a” relationship. Superclasses (or base classes) are at the top of the hierarchy and subclasses descend from superclasses. A subclass “is a” superclass. The object paradigm and polymorphism provide a very natural and flexible environment.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Chapter Summary (cont.) Classes can define visual or nonvisual objects. Most classes created to solve business problems are nonvisual. Visual Basic.NET creates event-driven solutions that use a combination of the object and nonprocedural paradigms.

McGraw-Hill/Irwin ©2002 by The McGraw-Hill Companies, Inc. All rights reserved Review Questions What are the three common steps that most computer algorithms contain? Explain what is meant by the term algorithm and describe an example of one. How does and “instance of a class” relate to an object”? Does Visual Basic.NET directly support single inheritance or multiple inheritance? Is an arm a subclass of a body? Is a cat a subclass of a mammal?