Preview

Object Oriented Programming

Satisfactory Essays
Open Document
Open Document
41750 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Object Oriented Programming
FREQUENTLY ASKED QUESTIONS (JAVA) IN INTERVIEWS

1)What is OOPs?

Ans: Object oriented programming organizes a program around its data,i.e.,objects and a set of well defined interfaces to that data.An object-oriented program can be characterized as data controlling access to code.

2)what is the difference between Procedural and OOPs?

Ans: a) In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOPs program, unit of program is object, which is nothing but combination of data and code.

b) In procedural program,data is exposed to the whole program whereas in OOPs program,it is accessible with in the object and which in turn assures the security of the code.

3)What are Encapsulation, Inheritance and Polymorphism?

Ans: Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse.Inheritance is the process by which one object acquires the properties of another object.Polymorphism is the feature that allows one interface to be used for general class actions.

4)What is the difference between Assignment and Initialization?

Ans: Assignment can be done as many times as desired whereas initialization can be done only once.

5)What are Class, Constructor and Primitive data types?

Ans: Class is a template for multiple objects with similar features and it is a blue print for objects. It defines a type of object according to the data the object can hold and the operations the object can perform. Constructor is a special kind of method that determines how an object is initialized when created.

Primitive data types are 8 types and they are:

byte, short, int, long float, double boolean char
6)What is an Object and how do you allocate memory to it?

Ans: Object is an instance of a class and it is a software unit that combines a structured set of data with a set of operations for

You May Also Find These Documents Helpful

  • Powerful Essays

    Mat 540 Week 4 Paper

    • 1775 Words
    • 8 Pages

    Although the details can be quite complex, these details are the basic principles of object-oriented programming.…

    • 1775 Words
    • 8 Pages
    Powerful Essays
  • Good Essays

    You need to think of state and operations together as an entity, and then design your program as interactions between entities that exchange state and activate operations. OOP then is more of a design philosophy, and if I may say an art, then something with a rigorous definition or hard and fast rules.…

    • 793 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Psy300 Week 8

    • 760 Words
    • 4 Pages

    • Think about this task in an object-oriented way, and identify the objects involved in the task.…

    • 760 Words
    • 4 Pages
    Good Essays
  • Good Essays

    9. A method that stores a value in a class’s field or in some other way changes the value of a field is known as a…

    • 1518 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    6 8c Chapter Excercises

    • 515 Words
    • 2 Pages

    In object-oriented analysis each object represents real people, places, events, and transactions (nouns). Unlike structured analysis, which treats data and processes separately, objects include data and processes that can affect the data. A major advantage of O-O designs is that systems analysts can save time and avoid errors by using modular objects, and programmers can translate the designs into code, working with reusable program modules that have been tested and verified…

    • 515 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    concepts of classes, objects, constructors, methods, access control, this keyword, overloading methods and constructors, parameter…

    • 414 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Prg420 Syllabus

    • 1691 Words
    • 7 Pages

    This course introduces object-oriented programming in the context of business applications development. The basics of the Java programming language are covered.…

    • 1691 Words
    • 7 Pages
    Satisfactory Essays
  • Better Essays

    II. The general syntax for defining a class is shown here. It may look complicated, because it’s written in very general form here, but it’s very simple.…

    • 939 Words
    • 4 Pages
    Better Essays
  • Powerful Essays

    Business Forecasting

    • 3629 Words
    • 15 Pages

    The data of this coursework were drawn from the UK national statistics. It is a quarterly series of total consumer credit gross lending in the UK from the second quarter 1993 to the second quarter 2009. In this coursework, the first 57data will be used to establish models and the latter 8 data will be used to test if the forecast is a good fit or not. Two forecasting methods will be used in this coursework, which are a regression with Dummy Variables method and a combination of the Decomposition and Box-Jenkins ARIMA approaches. In addition, further comparison will be made between models to select out the best fit one. Then the underlying assumptions of the chosen model and sensitivity of the model to these assumptions will be discussed. All the analyses are based on the outputs working out by SPSS software.…

    • 3629 Words
    • 15 Pages
    Powerful Essays
  • Good Essays

    Reusability of Code

    • 511 Words
    • 3 Pages

    Object-oriented programming and procedural programming are two programming paradigms that distribute common attributes as well as various differences. A procedure is an additional name for a routing, technique or function. Procedures and objects both use algorithms to develop the system and any logical calculation that is necessary for the program. A function is divided from variables and data compositions. Procedures are intended to run the code in a precise order, while OPP merges data with the function in the function changes the data that is bound to it into a unit identified as an object. Other useful features such as abstraction, encapsulation, and inheritance can be achieved while working with OPP.…

    • 511 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    ghed at.” Seeing as Westerners have been the perpetrators of imperialism for the past several centuries, it is to them that his message is directed.…

    • 325 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Computer Science Terms

    • 1163 Words
    • 5 Pages

    Composite structure: the size of a typical software system implies that it must be broken down into manageable pieces of this…

    • 1163 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    This lecture notes covers unit1. 1. Introduction: M255 module: Object Oriented Programming with Java concerns on teaching the principles of Object Oriented such as objects, classes, inheritance, and polymorphism using Java language. You have two CDs in this module: • Online Application CD which has the StarOffice application, and • M255 CD that has the blueJ, microworld and others. When you install M255 CD be sure that all options are selected, just determine the folders you want to install on and follow instructions during the installation process. 2. Fundamental hardware and software concepts What is a computer? A device that accepts input, processes data, stores data, and produces output. These are the main basic tasks of a computer. Simply, any computer system is composed of computer hardware and software. The hardware components of a computer system are the electronic and mechanical parts. The software components of a computer system are the intangible parts: it is a general term of all the applications, programs, and systems that run on your computer. Software consists of sets of instructions that tell a computer how to perform a particular task. 2.1 Computer Hardware The main hardware devices are classified as: 1. Essential parts of a computer : CPU & main memory 2. Peripheral devices, which is any component of the computer that is not part of essential devices, such as: Input/Output devices, secondary storage (Storage devices). Some peripherals are mounted in the same case as processor such as hard disks, others such as printers are physically outside the computer. An input device gathers and translates input into a form that the computer can process, these are devices such as: keyboard, mouse, scanner, microphone, cardreader, and bar reader.…

    • 5210 Words
    • 21 Pages
    Powerful Essays
  • Good Essays

    C SHARP FUNDAMENTALS

    • 4128 Words
    • 20 Pages

    The class keyword is preceded by the access level. Because public is used in this case, anyone can create objects from this class. The name of the class follows theclass keyword. The remainder of the definition is the class body, where the behavior and data are defined. Fields, properties, methods, and events on a class are collectively referred to as class members.…

    • 4128 Words
    • 20 Pages
    Good Essays
  • Better Essays

    Electronics Engineering

    • 3340 Words
    • 14 Pages

    Constructor will be automatically invoked when an object is created whereas method has to be called explicitly. Constructor needs to have the same name as that of the class whereas functions need not be the same.…

    • 3340 Words
    • 14 Pages
    Better Essays

Related Topics