Wednesday, July 31, 2019
Programming languages and the real world Essay
Programming language are the sets of instruction which are used to create computer programs and software. This language also instructs the hardware what to do and respond to when thereââ¬â¢s an action from the operator. Programming language can be classified as follow; applicative programming language, declarative programming language, domain specific programming language, object oriented programming languages, first-fifth generation programming languages, high and low level programming language. JAVA Is a programming language developed by the SUN Microsystems. It was formerly called OAK which was designed for handheld devices. OAK failed in 1995 so the company had to change it name to JAVA. They then modified the programming language to take the full exploration of the World Wide Web. Itââ¬â¢s an object oriented programming language. It is similar to C++ but much simpler in that it was designed to eliminate all errors due to programming. It source code file are those with ââ¬Å".java ââ¬Å"extension. This is compiled into a format known as byte code. Byte codes are with a ââ¬Å".classâ⬠which is interpreted by an interpreter. The interpreters are Java Machines which exist in most OS. Java programming language is general purpose utility with several features that makes it suitable for the web. Small form of Java applications are called applets and this can be downloaded from web server and then run on any Java enabled Web browser. The most important uses of JAVA are; World Wide Web applets, cross platforms application development, other networks application. Objects; in java programming language class object is usually refer to as the root of class hierarchy, i.e. each class has object as a super class and all the object will implement the method in the class. This is important in understanding the object oriented technology. The objects are like the objects in the real world simply because the have both state and behavior. Objects in Java stores its states in form of field and expresses its behavior in form of methods hence java applications are use to model real world experiences. ââ¬Å"Methods operate on an objectââ¬â¢s internal state and serve as the primary mechanism for object-to-object communication. Hiding internal state and requiring all interaction to be performed through an objectââ¬â¢s methods is known as data encapsulation ââ¬â a fundamental principle of object-oriented programmingâ⬠. (Sun Microsystems, 2008). Class; itââ¬â¢s a model from which the objects are made. The class models the state and behavior of a real world object. So in programming with java an object is said to be ââ¬Å"an instance of a classâ⬠Inheritance; it provide a strong and natural means for coordinating and organizing the software. This is a method in which a class is opportune to share some features with other classes. Java programming also allows each class to a direct super class and the super class with the potential of an unlimited number of subclass. Interfaces; this is the method in which the classes exposed to interact with the outside world. This can be compared to the ââ¬Ëââ¬â¢on buttonâ⬠of a computer set and the electrical circuits within the CPU. Simply because the button can be use to on or off the computer but in java, interface is related to an empty body. Packages; this is a names space that arrange a set of related classes and interfaces. Its helps organize the classes and interfaces into the same packages. Application program interface is a type of packages which contains the classes that are normally associated with general purpose programming. Pointers; The pointer in Java are actually a local variable pointer which points to pointee (what the pointer points to) object of some class. ââ¬Å"Refer to concluding aspect for a note on pointersâ⬠C + + This is an object oriented programming language. Itââ¬â¢s an extension or advancement to the C language. C programming language was created (1969-1973) at the Bells; this was in conjunction with the development of the Unix O.S.à The C language was a descendant of the B language. After the creation of the C language the computer world was filled with various version of the language, as a result of this a committee was established by ANSI in 1989 to create a standard for the C language. C+ language enables programmers to improve the quality of the code they produces and this helps other programmers to be able to reuse the codes. Objects; this sometimes refer to as black boxes is know to be a part of the language that can do so many things with the ability to integrate different part of the language together. It takes in some values and then gives some output. The objects helps model the real world and helps produce a complex and functional application. Its also be view as what help keeps track of the members data and actions. Instance; it differ from the object in that the object serves as a template for the instances of that object. Instance can be manipulated. Instance can be made up of information of the members but it lacks value of their functions. All the instance of an object performs the same steps when carrying out a member function; this can be influenced by the instancesââ¬â¢ current member data. Variables; where information is stored. Itââ¬â¢s a method of getting at someoneââ¬â¢s computer memory. This changes over time and new information tends to replace the old ones. Pointer; unlike the Java programming that lack pointer, the C + + has pointer as an attribute. This is generally considered as a mode of getting to another object. It s simply a mode of grabbing an instance of an object and then transfer message to the instance or retrieve some information from the object. It also said to be an address of the location of an instance in the memory. Pointers and application Pointer and pointees; à a pointer this simply refers to a reference to stored information and pointee refers to what the pointer points to. Allocation of the pointer and pointee is clear two different procedure. Another term known as dereferencing operation starts at the pointer and follows itââ¬â¢s down to the pointee. It main objective is to ensure the constant state of the pointee or to see to the change of the pointee. It only works when a pointer has a pointee and itââ¬â¢s noted that one of the common errors in runtime is seen when there is failed dereference operation. In Java this can be noticed without major problems unlike other programs where runtime system will crash.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.