About java programming: Why is it Object Oriented?

why java programming is a object oriented?

Replies

  • Saandeep Sreerambatla
    Saandeep Sreerambatla
    Re: About javaprogramming

    Until recently, programs were thought of as a series of procedures that acted upon data. A procedure, or function, is a set of specific instructions executed one after the other. The data was quite separate from the procedures, and the trick in programming was to keep track of which functions called which other functions, and what data was changed. To make sense of this potentially confusing situation, structured programming was created.

    The principle idea behind structured programming is as simple as the idea of divide and conquer. A computer program can be thought of as consisting of a set of tasks. Any task that is too complex to be described simply would be broken down into a set of smaller component tasks, until the tasks were sufficiently small and self-contained enough that they were easily understood.

    As an example, computing the average salary of every employee of a company is a rather complex task. You can, however, break it down into these subtasks:

    1. Find out what each person earns.

    2. Count how many people you have.

    3. Total all the salaries.

    4. Divide the total by the number of people you have.
    Totaling the salaries can be broken down into

    1. Get each employee's record.

    2. Access the salary.

    3. Add the salary to the running total.

    4. Get the next employee's record.
    In turn, obtaining each employee's record can be broken down into

    1. Open the file of employees.

    2. Go to the correct record.

    3. Read the data from disk.
    Structured programming remains an enormously successful approach for dealing with complex problems. By the late 1980s, however, some of the deficiencies of structured programing had became all too clear.

    First, it is natural to think of your data (employee records, for example) and what you can do with your data (sort, edit, and so on) as related ideas.

    Second, programmers found themselves constantly reinventing new solutions to old problems. This is often called "reinventing the wheel," and is the opposite of reusability. The idea behind reusability is to build components that have known properties, and then to be able to plug them into your program as you need them. This is modeled after the hardware world--when an engineer needs a new transistor, she doesn't usually invent one, she goes to the big bin of transistors and finds one that works the way she needs it to, or perhaps modifies it. There was no similar option for a software engineer.

    New Term: The way we are now using computers--with menus and buttons and windows--fosters a more interactive, event-driven approach to computer programming. Event-driven means that an event happens--the user presses a button or chooses from a menu--and the program must respond. Programs are becoming increasingly interactive, and it has became important to design for that kind of functionality.
    Old-fashioned programs forced the user to proceed step-by-step through a series of screens. Modern event-driven programs present all the choices at once and respond to the user's actions.

    Object-oriented programming attempts to respond to these needs, providing techniques for managing enormous complexity, achieving reuse of software components, and coupling data with the tasks that manipulate that data.

    The essence of object-oriented programming is to treat data and the procedures that act upon the data as a single "object"--a self-contained entity with an identity and certain characteristics of its own.


    This is the reason why Java is Object oriented.

    The content is copied from the link Difference between Procedural, Structured, and Object-Oriented Programming
  • Saandeep Sreerambatla
    Saandeep Sreerambatla
    Re: About javaprogramming

    I mean based on this comparison , Object oriented is better than other languages. Thus Java was developed like that!!
  • Rakeshkumarrout
    Rakeshkumarrout
    Re: About javaprogramming

    why java is a objectoriented?
  • sushant005
    sushant005
    Re: About javaprogramming

    Java is Object-oriented just because it is based on the object means that all the calculations are done using the object and it supports the features of object-oriented like Abstraction,Inheritance,Encapsulation,Polymorphism.
    Even it is not only object-oriented but it is a pure object-oriented language.I mean to say that c++ also supports encapsulation property but we can break that data hiding property(Encapsulation) using the friend function but there is no such feature in JAVA so it is called as the pure- object oriented language.
  • paresh006
    paresh006
    Re: About javaprogramming

    Exactly sushant java is purely object oriented...as we already know that c++ is not purely object oriented thats gave a platform for java to be purely object oriented..
    By object oriented we mean all the operation that are carried out in java are based on objects(instance of a class)..i.e.,any method you want to call you need to call it through an object...abstraction,polymorphism,inheritance,encapsulation are some of the object oriented features...
  • vinci
    vinci
    nice guide thanks for the post and keep update more about object oriented programming and tell me how it helps in application development
  • lovejeet
    lovejeet
    In easy words:-
    actually the whole concept of java revolves around objects. They are the implementations of classes. Without classes and objects, java is useless.........
  • KenJackson
    KenJackson
    Rakeshkumarrout
    why java programming is a object oriented?
    Are you asking what it means to be an object-oriented programming language? That is, what's the difference?

    Or are you asking why the authors of Java decided to force programmers to do object-oriented programming?

    Everyone seems to be assuming the first. But you repeated the question--which makes me wonder.
  • lovejeet
    lovejeet
    hey, i came to know that even java is not fully object oriented. That is because, it doesn't support one of the main concepts of oops, that is, multiple inheritance. So we can't say that java is purely object oriented.

You are reading an archived discussion.

Related Posts

A capacitor is in series with a 5V ac source. now during the +ve half cycle, the capacitor is charged upto max 5V. then the ac source is replaced with...
Can't understand what's the use of iron core in LVDT????? please help me. thanks
I've chosen my final year project and it's about wireless energy transfer . if you can help me with some info or resources I'll be thankful
I am making a btech project on vehicle traffic counter .Can anyone suggest what all i can include in my project beside just counting the no.of vehicles passing??
I am serious, the more arty i become - the more am I possed with question " why did you choose engineering- you could have become a painter" or "...