MATERIA: TÉCNICO-CIENTÍFICO INSTITUTO TECNOLÓGICO SUPERIOR DE TEZIUTLÁN GUÍA CARRERA: INFORMÁTICA FECHA DE ELABORACIÓN: MAYO 2011 Object-oriented programming A. Choose the correct answer. ____1. Behavior that varies depending on the class in which the behavior is invoked, that is, two or more classes can react differently to the same message . a) Encapsulation b) Inheritance c) Polymorphism d) Object ____2. Wrapping up of data and associated functions into a single unit(called class).Each object exposes an interface — those public methods, which specify how other objects may read or modify it. a) Encapsulation b) Class c) Object d) Inheritance ____3. The unit of definition of data and behavior (functionality) for some kind-of-thing. It is the basis of modularity and structure in an object-oriented computer program. a) Abstration b) Class c) Object d) Object-based language ____4. A mechanism for creating subclasses, it provides a way to define a (sub)class as a specialization or subtype or extension of a more general class; a subclass acquires all the data and methods of all of its superclasses, but it can add or change data or methods as the programmer chooses. a) Inheritance b) Encapsulation c) Class d) Abstraction ____5. An instance of a class, an object is the run-time manifestation (instantiation) of a particular exemplar of a class. a) Inheritance b) Objet c) Class d) Abstraction ____6. It is a language that has most of the properties of an object-oriented language, but lacks inheritance. a) Object b) Inheritance c) Class d) Object-based language ____7. What is one example of languages oriented to objects? a) Turbo C b) C,FORTRAN 77 c) ,FOXPRO SIMULA 67 & Java d) ,FOXPRO ____8. Is the reutilization of code a benefit that OOP introduces? a) True b) False c) None of the above d) All of the above ____9. ―The representation of one data type per module‖ and ―The handling of subtypes of data types‖ are some benefits of programming oriented to objects in a software design. a) None of the above b) All of the above c) True d) False ____ 10. What’s the traditional view of programs? a) They’re the form to compile They’re b) They’re seen as a c) They’re seen as d) They’re seen as a composed seen as a composed of a collection of collection of functions or simpler to develop and of a collection of individual individual units or objects procedures to maintain units or objects ____ 11. In what lines from the passage the author explains the translation of subject oriented into Object oriented thinking? a. According to the object-oriented principles, the verb is c. OOP arose independently out of research into simulation system attached to the object and logic associated to the oriented languages, with SIMULA 67, and out of research into requirement is handled in the object. The following are highly secure system architectures, with capability based OS and some examples of the ways by which a subject oriented CPU architectures. requirement is translated into object oriented thinking. b. Some experts say that the original definition of Object- d. They have been brought together, with associated terminology, to oriented came from the object in grammar. The create a programming framework. Together the ideas behind OO requirements for the software are always subject-oriented are said to be so powerful they create a paradigm shift in and since the requirements for the subject are often programming. complicated, monolithic complicated programs were created. ____ 12. The meaning of framework is… a) Campo de trabajo b) Campo de trabajo c) Esquema de trabajo d) Cuadro de dibujo ____ 13.The meaning of data type is … a) Datagrama b) Tipo de dato c) Capa de enlace de datos d) Tipo de variable ____14. What’s the main purpose of the passage? a) To explain how OOP b) It’s the practice of writing program text decomposed in modules c) d) operates as well as show it’s that encapsulate the representation of one data type per module. Program Association benefits ____15. An OOP definition is… a. Keep in a good c. Every object has the property of receiving and sending messages and processing data. condition b. Program d. It’s the practice of writing program text decomposed in modules that encapsulate the representation of one data type per module ____16. The idea behind object-oriented programming is that a computer program may be seen as composed____________, or objects, that act on each other. a) of a collection of b) of a collection of c) of a collection of individual d) of a collection of variables programs units languages ____17.According to the passage in OOP, each object is capable of receiving messages, ________, and sending messages to other objects. a) processing data b) compiling data c) creating variables d) defining methods 1 ____18. The word mapping refers to… a) constitute b) program c) Association d) variable ____19. The word maintainability refers to… a) constitute b) keep in a good condition c) Association d) To explain how OOP operates as well as show it‖s benefits ____20.The word software refers to… a) variable b) hardware c) To explain how OOP operates as well as show it’s benefits d) Program ____21. OOP collects functions that call each other. a) true b) false c) All of the options d) None of the options ____22. Object-oriented languages can’t make constraints, local to one part of the program. a) true b) false c) All of the options d) None of the options ____23. The handling of subtypes of data types isn’t an OOP’s characteristic. a) All of the options b) None of the options c) True d) False ____24. Object oriented programming focuses on the logical affirmation that makes the execution of program code to work a) True b) False c) All of the options d) None of the options ____25. The constraints depend on the actions determined by the data. a) All of the options b) None of the options c) True d) False ____26. To the satisfaction of programmer-defined, constraints objects’ data are avoided. a) All of the options b) None of the options c) True d) False ____27. Object-oriented programming isn’t flexible in programming a) True b) False c) All of the options d) None of the options ____28. Object-oriented programming is the same term than object-based a) True b) False c) All of the options d) None of the options ____29. OOP operates encapsulating data type per module a) True b) All of the options c) False d) None of the options ____30. Monolithic programs were created to make more complicated the requirements for the subject a) None of the options b) All of the options c) False d) True ____31. The term converse mapping is well known as… a) Cartografía de lo opuesto b) Conversión de objetos c) Mapa de conversión d) Convertidor de mapas ____32. Is the reutilization of code a benefit that OOP introduces? a) True b) False c) All of the options d) None of the options ____33. Object-oriented programming is claimed to promote greater flexibility and maintainability in programming, and it’s widely popular in large-scale software engineering. The word it’s in line 2 refers to: a) Flexibillity b) Object-oriented programming c) Maintainability ____34-35. Proponents of OOP claim that OOP is easier to learn for those new to computer programming than previous approaches, and that the OOP approach is often simpler to develop and to maintain, lending itself to more direct analysis, coding, and understanding of complex situations and procedures than other programming methods. a) Flexibillity b) Object-oriented programming c) Maintainability The word those in line 1 refers to: a) Proponents b) Approaches c) People The word itself in line 3 refers to: a) Approach b) Analysis c) Coding ____36. The converse mapping, from the object-oriented program back to the real-world, is by way of a one-to-many mapping, where each 'many' is seen to be a collection of well-defined subsets (or superset), which together compose a real-world object. The word which in line 3 refers to: a) a collection of well-defined subsets b) real-word c) mapping ____37. Other paradigms such as functional and procedural programming focus primarily on the actions, and logical programming focuses on the logical assertions that trigger execution of program code. The word that in line 2 refers to: a) logical programming b) logical assertions c) execution of program code ____38. Some of the researchers at that time started thinking in an object-oriented way, which was a paradigm shift from the usual subject-oriented thinking. The word which in line 1 refers to: a) researchers b) subject-oriented thinking c) object-oriented way ____39. Reusability is the benefit most often claimed for OOP. However, that is unlikely to be true, as reuse of software is as old as the invention of the subroutine, reputedly prior to 1950. The word that in line 1 refers to: a) reusability b) benefit c) invention ____40. We can infer from the passage that… a) Object –oriented programming and b) Object –oriented programming c) Object–oriented programming and objectobject-based have the same meaning and object-based are alike based have dissimilar meaning Widely-used terminology distinguishes object-oriented programming from object-based. The former is held to include inheritance, while the latter does not. The exact definitions of these have some variation depending on point of view. In particular, languages with static typing often have slightly different views of OO than languages with dynamic typing, caused by focus on compile-time vs. run-time properties of the programs. ____41. According to the extract object-based programming has a… 2 a) Static typing b) Dynamic typing c) Flexible typing The paradigm of OOP is essentially not that of programming but one of design. A system is designed by defining the objects that will exist in that system, the code which actually does the work is irrelevant to the object, or the people using the object, due to encaps ulation. The challenge in OOP therefore is of designing a sane object system. It should be noted that there are distinct parallels between the object-oriented paradigm and Systems theory. OOP focuses on objects as units in a system, whereas systems theory focuses on the system itself. In between, one may find software design patterns or other techniques that use classes and objects as building blocks for larger components. Such components can be seen as an intermediate step from the object-oriented paradigm towards the more "real-life oriented" models of systems theory. ____42. According to the extract OOP is focused to… a) Programming b) Design c) None of the above According to the object-oriented principles, the verb is attached to the object and logic associated to the requirement is handled in the object. The following are some examples of the ways by which a subject oriented requirement is translated into object oriented thinking: Subject oriented: The Sales Application saves the Transaction Object oriented: The Transaction saves itself upon receiving a message from the Sales Application Subject oriented: The Sales Application prints the Receipt Object oriented: The Receipt prints itself upon receiving a message from the Sales Application ____ 43. According to the passage what’s something’s not true a) There’s a link between the verb, the object and b) There’s a link between the verb, c) There’s a link between the logic associated to the requirement is handled in the subject and the object subject and the object without the object. oriented. the verb. B. Choose the answer that best translates the idea given. ____ 44. It should be noted that there are distinct parallels between the object-oriented paradigm and Systems theory. a) Se debe hacer una nota de que hay b) Se debe hacer una nota de los c) Se debe hacer notable que hay distintos paralelos entre el paradigma paralelos distintos entre el paradigma paralelos claros entre el paradigma de lo orientado a objetos y la teoría de sistemas. orientado a objetos y la teoría de orientado a objetos y la teoría de sistemas. sistemas. ____ 45. OOP focuses on objects as units in a system, whereas systems theory focuses on the system itself. OOP se enfoca a objetos como unidades de un sistema, mientras que la teoría de sistemas se enfoca en el sistema como tal. OOP se enfoca a objetos como unidades de un sistema que se vinculan con la teoría de sistemas que se enfoca en el sistema en si mismo. a) OOP enfatiza que los objetos como unidades de un sistema, mientras que la teoría de sistemas se enfoca en el sistema como tal. b) OOP se enfoca a objetos como unidades de un sistema que se vinculan con la teoría de sistemas que se enfoca en el sistema en si mismo. ____ 46. Other paradigms such as functional and procedural programming focus primarily on the actions, and logical programming focuses on the logical assertions that trigger execution of program code. a) Otros paradigmas de la programación funcional y estructural se enfoca en acciones primarias de la programación lógica que se enfoca en las afirmaciones que elaboran la ejecución del código del programa. b) Otros paradigmas de las funciones de la programación y de estructura se enfocan en las primeras acciones de la programación lógica que se enfoca en las afirmaciones que____ la ejecución del código del programa. c) Otros paradigmas tales como la programación funcional y de procedimientos se enfocan principalmente en las acciones; y la programación lógica se enfoca en las afirmaciones lógicas que ponen en funcionamiento la ejecución del código del programa. ____ 47. OOP arose independently out of research into simulation system oriented languages, highly secure system architectures, with capability based OS and CPU architectures. a) OOP creció independientemente de la b) OOP se originó de manera investigación dentro de la simulación del independiente a la investigación hacia sistema orientado a los lenguajes con sistemas de simulación orientados a SIMULA 67, y fuera de la investigación de lenguajes, con SIMULA 67, y fuera de los sistemas altamente seguros que dan la investigación hacia arquitecturas de arquitectura con capacidades basadas en sistemas altamente seguros, con otras de OS y CPU. capacidad basada en arquitecturas OS y de CPU. with SIMULA 67, and out of research into c) OOP surgió independientemente de la simulación del sistema orientado a los lenguajes con SIMULA 67, y fuera de la investigación de los sistemas altamente seguros que dan arquitectura con covertura basadas en otras de OS y CPU 3 C. Choose the options that best complete or describe the ideas. ____ 48. Some of the researchers at that time started thinking in an object-oriented way, which was a paradigm shift from the usual subject-oriented thinking. a) An explanation b) A definition c) A conclusion d) A concept ____ 49. According to the object-oriented principles, the verb is attached to the object and logic associated to the requirement is handled in the object. a) A definition b) A conclusion c) An explanation d) A concept ____ 50. Flexibility and maintainability a) Conclusions b) Qualites c) Definitions d) Explanations 4 Hoja de respuestas del Examen técnico de Lic en Informática. Tema: Object-oriented programming. 1 c 14 a 27 b 40 c 2 a 15 d 28 c 41 c 3 b 16 c 29 a 42 a 4 a 17 a 30 d 43 b 5 b 18 c 31 c 44 c 6 d 19 b 32 a 45 a 7 c 20 d 33 b 46 c 8 a 21 a 34 c 47 b 9 c 22 b 35 a 48 a 10 d 23 d 36 a 49 c 11 a 24 a 37 b 50 b 12 c 25 c 38 c 13 b 26 d 39 a ACADEMIA Y C OORDIN ACIÓN DE I NGLÉS 5