Java-Programming building blocks

Java-Programming building blocks - Page 1 of 20 Java...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Page 1 of 20 Java Programming Building Blocks: Java is a well-known platform independent, object-oriented programming language for general-purpose programming applications and the Internet. There are primarily two methods of programming in use today; procedural and object- oriented. The procedural programming languages were based on procedure calls, meaning a program were made of one or more procedures, subroutines or functions. A procedure is a set of programming code or statements that, together, perform a specific task. The statements might gather input from the user, manipulate data stored in the computers memory, and perform calculations or any other operation necessary to complete its task. In procedural programming, typically data items are separate from the procedures that perform calculations on them, and the data items are commonly passed from one procedure to another. In procedural programming the separation of data and the code that operates on the data often leads to problems. Unlike procedural programming the object-oriented programming does not separate the data of the program from the operations that manipulates on the data. The object-oriented programming, abbreviated OOP has its own specialized terminology. OOP addresses the problem of code/data separation through encapsulation and data hiding . Encapsulation refers to combining of data and code into a single object. The fundamental advantage of OO programming is that the data and the operations that manipulate the data (the code) are both encapsulated in the object. Data hiding refers to an objects ability to hide data from code that is outside the object. Only objects methods may then directly access and make changes to objects data. Unlike the procedural languages, the object-oriented languages allow an objects internal data be hidden from outside code and access to that data is restricted to the objects methods, the data is protected from accidental corruption, and in addition, the programming code outside the object does not need to know about the format or internal structure of the objects data. Another important concept in object-oriented programming is Polymorphism . Polymorphism describes the feature of languages that allows the same word to be interpreted correctly in different situation based on the context. For example in English the word run means different things if you use it with a Marathon race, a Business or a Computer. You understand the word based on the other words used with it. Literally polymorphism means many forms . Many forms of action take place, even though you use the same word to describe the action. In other words, many forms of the same word exist, depending on the object associated with the word....
View Full Document

This note was uploaded on 10/05/2011 for the course CS 38 taught by Professor Stevehouseman during the Summer '09 term at Irvine Valley College.

Page1 / 20

Java-Programming building blocks - Page 1 of 20 Java...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online