Oop Intruduction

In: Computers and Technology

Submitted By yinanwu
Words 2752
Pages 12
Introduction to Objects “We cut nature up, organize it into concepts, and ascribe significances as we do, largely because we are parties to an agreement that holds throughout our speech community and is codified in the patterns of our language … we cannot talk at all except by subscribing to the organization and classification of data which the agreement decrees.” Benjamin Lee Whorf (1897-1941) The genesis of the computer revolution was in a machine. The genesis of our programming languages thus tends to look like that machine. But computers are not so much machines as they are mind amplification tools (“bicycles for the mind,” as Steve Jobs is fond of saying) and a different kind of expressive medium. As a result, the tools are beginning to look less like machines and more like parts of our minds, and also like other forms of expression such as writing, painting, sculpture, animation, and filmmaking. Object-oriented programming (OOP) is part of this movement toward using the computer as an expressive medium. This chapter will introduce you to the basic concepts of OOP, including an overview of development methods. This chapter, and this book, assumes that you have some programming experience, although not necessarily in C. If you think you need more preparation in programming before tackling this book, you should work through the Thinking in C multimedia seminar, downloadable from www.MindView.net.
This chapter is background and supplementary material. Many people do not feel comfortable wading into object-oriented programming without understanding the big picture first. Thus, there are many concepts that are introduced here to give you a solid overview of OOP. However, other people may not get the big picture concepts until they’ve seen some of the mechanics first; these people may become bogged down and lost without some code to get their hands…...

Similar Documents

Oops

...HAMPTON UNIVERSITY SCHOOL OF BUSINESS Course Syllabus - FALL 2011 ECON 201-ALL SECTIONS PRINCIPLES OF ECONOMICS (MACRO) SEC | CRN | DAYS | TIME | CLASSROOM | INSTRUCTOR | 201-HR | 21507 | TR | 12:30-1:45PM | ST-321 | Sarki, A | 201-02 | 21509 | MWF | 9:00-9:50AM | BU-122 | Ferdnance, T | 201-03 | 21512 | TR | 11:00-12:15PM | BU-101 | Toney, S | 201-05 | 21513 | TR | 9:30-10:45AM | ST-336 | Sarki, A | 201-07 | 21514 | TR | 2:00-3:15PM | BU-101 | Toney, S | 201-09 | 21516 | MWF | 1:00-1:50PM | BU-122 | Ferdnance, T | PROFESSORS OFFICES OFFICE HOURS PHONE Dr. Ayuba J. Sarki Science & Tech (301C) TBA (757) 727-5868 Dr. Tyrone Ferdnance Buckman (107B) TBA (757) 727-5134 Dr. Susanne Toney Buckman (214C) TBA (757) 727-5760 REQUIRED TEXTS: Case, Karl E., Fair, Ray C., & Oster, Sharon M; Principles of ECONOMICS 10th Edition, Pearson/Prentice-Hall, 2012 ISBN-10: 0132552914; ISBN-13: 9780132552912 0132744856 OR Case, Karl E., Fair, Ray C., & Oster, Sharon M; Principles of Macroeconomics 10th Edition, Pearson/Prentice-Hall, 2012 ISBN-10: 0131391402; ISBN-13: 978-0131391406 AND MyEconLab (Required) (Note that all the required materials can be purchased from Hampton University Virtual Bookstore). CATALOG DESCRIPTION: A first course on modern market economies. Emphasizes the determination of national income, fluctuations,......

Words: 4002 - Pages: 17

Oop Concepts

...www.kbcafe.com OOP Concepts by Example by Randy Charles Morin Of late, I have been writing very narrow focused articles that explain how to accomplish this or that task. Many of you have changed your questions from the narrow focus of how-to questions to broader theorectical questions. One question I got lately that intrigue me was to explain the concepts of OOPs showing C++ examples. Let's start by laying down some ground work. I assume that you are familar with the following OOP concepts; classes, objects, attributes, methods, types. If not, then this article might not be in your realm. I'd suggest starting with the basic concepts of C++ before you attempt to understand the more indepth concepts that I'll be discussing in this article. When we speak of OOP concepts, the conversation usually revolves around encapsulation, inheritance and polymorphism. This is what I will attempt to describe in this article. Inheritance Let us start by defining inheritnace. A very good website for finding computer science definitions is http://www.whatis.com. The definitions in this article are stolen from that website. Definition: Inheritance Inheritance is the concept that when a class of object is defined, any subclass that is defined can inherit the definitions of one or more general classes. This means for the programmer that an object in a subclass need not carry its own definition of data and methods that are generic to the class (or classes) of which it is a part. This not......

Words: 482 - Pages: 2

Proposal

...arts from a national or world perspective These are some of the major advantages of OOP. Simplicity: software objects model real world objects, so the complexity is reduced and the program structure is very clear. Modularity: each object forms a separate entity whose internal workings are decoupled from other parts of the system. Modifiability: it is easy to make minor changes in the data representation or the procedures in an OO program. Thus, this will influence the world perspective that programming is not so hard. Audience The intended audiences for my proposal are software development companies. I believe that I can encourage them to combine or advance their technology to not only improve their work productive, but to boost their employee’s manner. Audience Position The audience may already be alert to this concept of introducing object-oriented languages in the workplace. Newer, more lively programmers will be more interested to this idea than they seasoned, experienced programmers who are set in their ways and castoff technology in general. I will communicate that learning styles have shifted in today’s generation and programmers should accommodate as needed. The advantages offset the disadvantages (like cost) and will inspire failing companies to perform at a level that they are capable of performing. Proposed Research In my research paper, I want to discuss that OOP can both make development faster, and your programs run faster. We are living......

Words: 742 - Pages: 3

Procedural Programming Compared to Object Oriented

...procedure or by itself. Examples of Procedural programming languages are C and Pascal. (Gaddis, 2010) In OOP, the focus is on thinking about the problem to be solved in terms of real-world elements and representing the problem in terms of objects and their behavior. Object is a data structure that closely resembles some real-world object. Objects contain data fields and methods that represent attributes and behavior of real-world objects. There are several important OOP concepts such as Data abstraction, Encapsulation, Polymorphism, Messaging, Modularity and Inheritance. Some popular OOP languages are Java and C#. However, they can be used to perform Procedural Programming as well. (Gaddis, 2010) The key difference between OOP and Procedural Programming is that the focus of Procedural Programming is to break down the programming task in to a collection of variables and subroutines while, the focus of OOP is to break down the programming task in to objects, which encapsulate data and methods. Most notable difference could be that while Procedural Programming uses procedures to directly operate on data structures, OOP will bundle the data and methods together so that an object will operate on its own data. When it comes to the nomenclature, procedure, module, procedure call and variable in Procedural Programming are often referred to as method, object, message and attribute in OOP, respectively. (Gaddis, 2010) Procedural programming creates a step by step program that......

Words: 924 - Pages: 4

Pt1420 Object Oriented Programing

...Object Oriented Programming Object-oriented programming or OOP is a programming paradigm that represents concepts as “objects” that have attributes that describe the objects and associated procedures known as methods. Objects, which are usually instances of classes, are used to interact with one another to design applications and computer programs. Some advantages of OOP are it provides a clear modular structure for programs which makes it good for defining abstract data types where implementation details are hidden and the unit has a clearly defined interface. It makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones. And it provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. Some disadvantages are that OOP can be larger than other programs. In the early days of computing, space on hard drives, floppy drives and in memory was at a premium which meant that more money was going to be spent. Another is that it requires a lot of work to create. A great deal of planning goes into an object oriented program well before a single piece of code is ever written. Initially, this early effort was felt by many to be a waste of time. Finally OOP were slower than other programs, partially because of their size. Other aspects of OOP demand more system resources, thus slowing the program down. REST and CRUD CRUD specifies a minimal set...

Words: 367 - Pages: 2

Object Oriented Programming

...Programming (OOP) provides computer programmers not only a new way to program, but a new way to think in terms of objects. This type of programming (“Object oriented programming,” 2012) allows programmers to use objects as a way of thought versus using a procedural language and organizing by data structures and algorithms. This is a new way of programming centered on objects to develop programs. C++ gives the programmer a way to incorporate encapsulation, inheritance, and polymorphorism and C++ also provides many ways of support Object-Oriented Programming. Programming was once thought upon as using a series of tasks for the computer to perform but object-oriented programming uses a collection of objects. In this type of programming, each object can receive message and process data, as well as send other messages to fellow objects. By placing information where it is not accessible by the entire computer program, OOP (“Object oriented programming,” 2012) calls the data using methods. The methods then act as intermediaries for working on the data they control. Object-oriented programs center on different types of objects. Each object contains a kind of data that manages the information within the program itself. The method of the object will use a system of checks and safeguards that are defined in the types of data the object contains. Because of this system, adaptations to the program can be made without changing the rest of the program. Classes within OOP explain a......

Words: 465 - Pages: 2

Php for Social Solutions

... Object-Oriented Programming with PHP5 Learn to leverage PHP5's OOP features to write manageable applications with ease Hasin Hayder BIRMINGHAM - MUMBAI Object-Oriented Programming with PHP5 Copyright © 2007 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: December 2007 Production Reference: 1031207 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847192-56-1 www.packtpub.com Cover Image by Karl Moore (karl.moore@ukonline.co.uk) Credits Author Hasin Hayder Reviewers Kalpesh Barot Murshed Ahmed Khan Proofreader Development Editor Nanda......

Words: 10232 - Pages: 41

Reading

...KTU UŽSIENIO KALBŲ CENTRAS ENGLISH HOME READING CHARGING AHEAD by JONH J. BERGER 2013 KAUNAS Summary (pages 97- 210) From the 10th paragraph of this book the autor talks about PV (photovoltic) industry and it‘s history. The talking begins wiht intruduction with thin films – a new perspective technology which in future can bring PV elements prices down to 30 cents per watt. It‘s said that thin films can be produced in big quantities by robots to reduce their price. Also the author talks about newer more efficient thin films whitch will replace the older thick films. Also there‘s mentioned artificial leaves and polarized thin films – two new great technologies, which in future could make solar power very cheap, relable and good choice for customers. In 11th paragraph he talks about history and lifetime of company Solarex which inevitably was bought by company Amoco. Which makes a lot of consideration because, the owner of Solarex Joseph Lindmeyer, say that Amoco tried to make Solarex bancrupt and bought it at very little price. In 12th paragraph authors talks about PV elements in buildings and how they can supply all the power needs of household. In part 3 author talks about wind power. Firstly he talks about wind turbines history and how wind has helped people throughout centuries. Than he talks about various USA companies that have tried and failed in wind turbines business. Lastly he talks about European leadership in wind turbines sector......

Words: 541 - Pages: 3

Reusability of Code

...Reusability of Code To be able to compare and contrast procedural programming modules and object-oriented programming, or OOP for short, we need to understand the two different styles. Procedural programming was the most commonly used programming language early on with a top-down model. This programming module places its attention on procedures or actions, which take place within the program. A few examples of procedural programming are FORTRAN and BASIC. OOP although has become the preferred method of use. OOP focuses on objects, which are self-contained unit containing date and data operations. When it comes to the reusability of codes OOP makes this task much easier. As procedural programming is a line-by-line programming style as if to be writing out simple instructions. OOP however allows the programmer to utilize inheritance. Inheritance gives the programmer the ability to create new classes, known as subclasses, based on an existing class, known as the superclass. This ability enables the programmer to utilize the data and methods of the original class or superclass. This whole process is where the programmer is able to utilize code that already was written saving them time and eliminating the opportunity for programming errors. Another benefit to OOP over procedural programming is security and the ability to hide code. Within OOP, the programmer is able to label certain data fields as private. Once these data fields are labeled as private, their data and......

Words: 621 - Pages: 3

Hgjhkjhio

...TEACHER: ARCADIO CERVANTES STUDENT'S NAME: LORENA ROSMERI DE LEON VASQUEZ 3020 "LAB REPORT" #5 CELL TYPES AND STRUCTURES OBJECTIVE To observe the two main types of cells and their typical structure. INTRUDUCTION * PROKARYOTE:Any cellular organism that has no nuclear membrane, no organelles inthe cytoplasm except ribosomes, and has its genetic material in theform of single continuous strands forming coils or loops, characteristics of all organisms is the kingdom Monera, as the bacteria and blue-green algae. a cell lacking a true membrane-bound nucleus;  * EUKARYOTE: is an organism with a complex cell or cells, in which the genetic material is organized into a membrane-bound nucleus or nuclei. * PROKARYOTIC CELL PROKARYOTIC CELL CHLOROPLAST: Chloroplasts are the food producers of the cell. The organelles are only found in plant cells and some protists such as algae. Animal cells do not have chloroplasts. Chloroplasts work to convert light energy of the Sun into sugars that can be used by cells. * AMYLOPLAST: A nonpigmented organelle, or plastid, occurring in the cytoplasm of plant cells. Amyloplasts transform glucose, a simple sugar, into starch through the process of polymerization, and store starch grains within their stretched membranes. * CHROMOPLAST: Are plastids, other than chloroplasts, that produce and store pigments. Found in flowers, leaves, roots and ripe fruits, they contain carotenoids (lipid-soluble pigments ranging from yellow...

Words: 556 - Pages: 3

Oops

...v _ __________________________________________________________________________ Preface No programming technique solves all problems. No programming language produces only correct results. No programmer should start each project from scratch. Object-oriented programming is the current cure-all — although it has been around for much more then ten years. At the core, there is little more to it then finally applying the good programming principles which we have been taught for more then twenty years. C++ (Eiffel, Oberon-2, Smalltalk ... take your pick) is the New Language because it is object-oriented — although you need not use it that way if you do not want to (or know how to), and it turns out that you can do just as well with plain ANSI-C. Only object-orientation permits code reuse between projects — although the idea of subroutines is as old as computers and good programmers always carried their toolkits and libraries with them. This book is not going to praise object-oriented programming or condemn the Old Way. We are simply going to use ANSI-C to discover how object-oriented programming is done, what its techniques are, why they help us solve bigger problems, and how we harness generality and program to catch mistakes earlier. Along the way we encounter all the jargon — classes, inheritance, instances, linkage, methods, objects, polymorphisms, and more — but we take it out of the realm of magic and see how it translates into the things we have known and...

Words: 72330 - Pages: 290

Intruduction

...Case Study – Crossing Cultural Lines Ricardo Casas ETH/316 The ethical parts of any job can have major impacts on all different employees and business owners. When doing business with a company that is set up in a Middle East country, a company that is based in the United might face many conflicting customs and cultural influences. It is crucial that business owners handle these types if situation in a delicate way to avoid causing offense to either their employers or their potential customers. If handled incorrectly or carelessly the business may experience loss of customers or many of their employees will complain about the lack of compassion from their employers. If an employer does have compassion towards the ethical issues then they will face then they must look at both sides of the issue and will often have to decide what can and can’t be done when sending an employee overseas, or even if they should send a certain employee at all. As an example of sending a woman to a country overseas to an area where woman do not have much independence, an employer must carefully analyze the different situations that might occur if he sends that employee as well as the situations that might occur if he doesn’t send the employee. The situation at hand is one that is faced by many businesses in the Unites States today as they do business with countries with little to no equal rights laws in affect. When faced with the option of sending a tour of employees, which include......

Words: 1165 - Pages: 5

Review of Journal Article : Oops, Scratch That! Monitoring One’s Own Errors During Mental Calculatons

...REVIEW OF JOURNAL PAPER JOURNAL: COGNITION ARTICLE: OOPS, SCRATCH THAT! MONITORING ONE’S OWN ERRORS DURING MENTAL CALCULATONS ABSTRACT: The Feeling of Error (F.O.E) is an experience differing from person to person stating that something has gone wrong during a reasoning or calculation task. The primary goal of the article was to assess the accuracy of F.O.E in the context of mental mathematical calculation. Number bisection task (N.B.T) was used to evoke this metacognitive feeling and it was assessed by asking participants if they felt that they committed a mistake. In this task the participant were asked whether the number in the middle of a triplet corresponds to the arithmetic mean of the outer two numbers (e.g 07_16_25) with a yes or no answer. The result from the study showed that the F.O.Es were strongly correlated with arithmetic errors and properties of the triplets. This finding indicates that even very fast metacognitive feelings are reliable when it comes to evaluating one’s own mental performance. The occurrence of F.O.E is determined also by the fluency with each triplet was solved and the post decision process after answering. In addition the participants were asked to report their confidence in their answer when there was no report of an F.O.E. This was to test whether there was a feeling of error on a sub-conscious level even when it wasn’t consciously reported. AIM OF THE EXPERIMENT: 1. To prove metacognitive feeling of error is a reliable......

Words: 2245 - Pages: 9

Oop Concepts with Real Life Example and Codes

...OOPS Concept with Real-world example Introduction OOP is Nothing but Object Oriented Programming.According to Wikipedia,  Object-oriented programming (OOP) is a programming paradigm that uses "objects" and their interactions to design applications and computer programs. OOPs have following features 1. Object   - Instance of class 2. Class    - Blue print of Object  3. encapsulation  - Protecting our data 4. polymorphism   - Different behaviors at diff. instances 5. abstraction    - Hidding our irrelavance data 6. inheritence    - one property of object is aquring to another property of object 1. Object Basically an object is anything that is identifiable as an single material item. You can see around and find many objects like Camera, Monitor, Laptop etc. In OOP perspective, an object is nothing but an instance of a class that contains real values instead of variables 2. Class A class is a template definition of the methods and variables for a particular kind of object. In other words, class is the blue print from which an individual objects are created. every human has eye ,so eyecolor can be considered as the property of human being which can be encapsulted as a data in our class Human class Human {     private:     EyeColor IColor;     NAME personname; }; Consider object of class of                 Human myhuman; we want set myhuman's name as "linto" and IColor as "black", For that we want methods to do that task. So need methods...

Words: 1017 - Pages: 5

Oop Stack

...but also the types of operations (functions) that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects. One of the principal advantages of object-oriented programming techniques over procedural programming techniques is that they enable programmers to create modules that do not need to be changed when a new type of object is added. A programmer can simply create a new object that inherits many of its features from existing objects. This makes object-oriented programs easier to modify. There are five characteristics of OOP such as below. Class & Object – Allow programmer to look at a system in a whole different way. Encapsulation – Encapsulation is capturing data and keeping it safely and securely from outside interfaces. Inheritance - This is the process by which a class can be derived from a base class with all features of base class and some of its own. This increases code reusability. Polymorphism - This is the ability to exist in various forms. For example an operator can be overloaded so as to add two integer numbers and two floats. Abstraction - The ability to represent data at a very conceptual level without any details. We are going to describe and solve two problems using Encapsulation. First we need to define what encapsulation is.......

Words: 853 - Pages: 4