Rabu, 07 April 2010

Java History


Java History Beginning in 1991 formed a team called green The team is led by Patrick Naughton and James Gosling (A group of Sun engineers). At first they wanted to make a computer language that can be used by cable TV (Cable TV Box) which has a small memory and each company has different types. To apply this they use what ever attempted by Pascal.
Previous Niclaus Wirth has made a portable language that will be used in subsequent image machine is called a Virtual Machine, but it was not announced. Finally, use the green team is finally their ideas to create Java Virtual Machine. Vitual machine made this can be run in different java platforms. In 1992 the green team make products that are named * 7 (Star Seven)
However, these products fail in the market. After that created a new product. This java, programming language originally created it was given the name "oak" (This name probably derived from the name of an existing tree in front of the window James Gosling) But after a review found the name oak has been used. Thus was born the name "Java" In the year 1993 until the mid-1994 the green team has a new name First Person. Inc. spent only with respect to the sale of its products. Apparently none of those found. Finally, in 1994 First Person dissolved.
In that year the Web has changed rapidly when it is widely used browser is Mosaic a free browser.
In an interview in the mid-94 James Gosling says "We could build a real cool browser. It was one of the few things in the client / serve the mainstream that needed some of the weird things We'd done: architecture neutral, real-time, reliable, secure-weren't issues that terribly important in the workstation world. So we built a browser. " Finally a browser that was made by Patrick Naughton and Jonathan Payne. The browser was named Hot Java. This browser is made by using java language to show Traffic from java. Are no less great they also make the technology known as a browser applet that can run within the browser program code. This is proof of that technology is shown java on 25 May 1995 Since then the browser java browser gives license to others to be able to run the applet and in 1996 applied to Internet Explorer. Finally, in 1996 issued the first version of java with java issue 1:02 In the year 1998 issued java 1.2 and java started out slogan "Write once, Run anywhre"

Java Edition
Java is a language that can run anywhere and on any platform any, in various environmentInternet, Intranets, electronic consumer products, and computer applications.The java 2 platform is available in 3 editions for different purposes. For a variety of applications created with the Java language, java bundled in editions:
1. Java 2 Standard Edition (J2SE)
2. Java 2 Enterprise Edition (J2EE)
3. Java 2 Micro Edition (J2ME)
Each - each edition contains the Java 2 Software Development Kit (J2SDK) to develop applications and the Java 2 Runtime Environent (j2re) to run the application.
Excess Java compared to C + + Java makers have designed programs to eliminate the allocation of java and memory deallocation manually, because java has Garbage Collection Introduction of the actual array declaration and eliminate pointer arithmetic. This often causes a memory overwrite.
Removal of multiple inheritance, they replaced it with the interface.
JAVA is the language of object-oriented programming (OOP) and can run on different operating system platforms with characteristics used programs such as C + +, Open Platform, Wora (Write One Run Anywhere), portable, multiplatform, the program can run on the Windows operating system, Solaris, Macintosh, Linux / Unix, the architecture firm and secure programming is supported by the Open Source community.
Characteristics of Java Programming.
  1. Simple. Java programming language uses a syntax similar to C + + but the syntax of Java has improved a lot in eliminating the use of pointers especially complicated.
  2. Object oriented. Java using object-oriented programming so as to facilitate the program development process, improve quality, easier maintenance, enhance the ability to modify and improve software reuse.
  3. Distributed. Java was made to create distributed applications easily with of integrated networking libraries in Java.
  4. Interpreted. Run Java programs using the Java Virtual interpreters Machine (JVM). JVM is an imaginary machine (virtual) that working with applications like on a real machine. JVM hardware specifications and provide a platform where the compilation Java code occurs. This makes the specification-based applications Java to be free from any platform for the compilation completed by the JVM. Applications created with Java program files
    text using ". java". The program is compiled to produce a bytecode file using ". class". Bytecode is a set of instructions similar to machine code instructions. The difference is the machine code must run on the system computer JDBC (Java Database Connectivity) provides a way to access the database independently of the database vendors. This causes the Java source code that has been compiled into Java bytecodes can run on different platforms different.
  5. Robust. Java has a high reliability. Compiler in Java has the ability to detect errors more thoroughly compared to other programming languages. Java has a runtime - Exception handling to help overcome the error in programming.
  6. Secure. As a programming language for Internet and distributed applications, Java has several security mechanisms to keep the application not used to damage a computer system that runs application.
  7. Architecture firm. Architecture is robust and secure programming supported by the Open Source community (the third largest after the C and C + + and implementation of the Java language has become public property).
  8. Portable. Source code and Java programs can easily be taken to platform different without being recompiled.
  9. Multithreaded. Java has the ability to create a program that can do several jobs at once and simultaneously.
  10. Dynamic. Java is designed to be run in a dynamic environment. Changes in a class by adding properties or method carried out without interfering with programs that use the class.
JAVA Security techniques.
  • Language is designed to complicate the execution of malicious code. Negation pointer security is a major step. Java is not operation known pointer. The operation pointer is outside the used for optimization and the creation of efficient programs and awesome. Pointer is a great tool for Usage. With negation pointer operation, java can be language that JDBC provides one way to access the database independently of the database vendor. Through JDBC can be mySQL access with the same program to access the Oracle, and PostgreSQL UDB2. This supports the spirit of java write once, run anywhere.
  • The main key of the JDBC is a JDBC Driver is responsible be the bridge between java programs and databases. JDBC Driver for mySQL, for example, was responsible for bridge between programs written in java to mySQL RDBMS.
  • To access the database via JDBC, it is necessary to use objects Connection. There are objects Statement and PreparedStatement. Through the Statement and PreparedStatement, use the SQL command to databases such as INSERT, SELECT, UPDATE, and DELETE.
  • Java has some security to the applet. To prevent disturbing action program storage medium, then the applet not allowed to open, read or write to the file arbitrarily. Since java applet can open a window The new browser, the window has java logos and text identification of the open window. This prevents the window pop-up menu as a request username and password information.
READ MORE - Java History
READ MORE - Java History

Controls are objects that can be placed on a form Visual Basic

Visual Basic is basically a computer programming language high level (High Level Language) such as java program where the instructions are like human language, so much easier to understand.
Visual Basic is a development of the language BASIC (Beginner `s All-Purpose Symbolic Instruction Code). At first, BASIC was designed in order to be used by novice programmers. Visual Basic still retaining some of the syntax or format of writing a program in BASIC language.
Some of the capabilities or benefits of Visual Basic is :
  1. Can be used to create Windows-based applications easily and quickly, which produces a final extension programs. EXE executable in nature, or can be directly executed.
  2. Can be used to create objects such as a program assistant Active X control, Help files, Internet applications, and so on.
Menu Bar : Is a menu bar at the top of the display menus from Visual Basic, including:
File: Managing Files and Printing, as well as to create executable EXE file. For example, New, Save, Open, and so on.
  1. Edit: standard editing function, Undo and Searching. For example Cut, Paste.
  2. View: Show or hide the Form Window and the Toolbar.
  3. Project: Set the project properties, add or reduce the form and module, as well as to increase or decrease the control object is used.
  4. Debug: Start or stop debugging and stepping.
  5. Run: run the program, such as Run, Build.

Toolbox : a collection of symbols is the control / object that contain all the objects or controls needed to make an application program.
Form Designer : It is a appearance in the middle (largest) as a form of work design and the object or control is placed.
Code Window : It is a appearance in the middle (largest) that alternate with Form Designer, containing the codes of the program for each object or control. Source code is the control center of the application ordered anything done by the application program.
Project Explorer : It is a window on the right above that describes the hierarchy of project files / programs that are undertaken. Hierarchy / the contents of this project can be forms or modules.
Properties Window : It is the right of the window that displays the properties or the nature or characteristics of a form or control. List this property can be changed according to the form or control that was selected.
Toolbar : This is the icon row of buttons below the menu bar that represents a specific command from Visual Basic. Usefulness of each button from left to right can be seen as follows.
  1. Add Project: Adding the project into an existing project.
  2. Data View Window: Displays the data view window.
  3. Toolbox: Displays the window toolbox.
  4. Object Browser: Displays the Object Browser Window.
  5. Form layout window: Displays the Form Layout window which serves to show the position of form on the monitor screen.
  6. Properties window: Displays the Properties window.
  7. Project Explorer: Displays windows explorer project.
  8. Start / Break / End: Running / pause / stop the project made.
  9. Save Project Group: Saving the Visual Basic project.
  10. Open Project: Opens the Visual Basic project that already exists.
  11. Menu Editor: Displays menu that serves as editor menu maker.
  12. Add Item: Adding components or objects into the window.
Controls are objects that can be placed on a form. Form itself is a window in the application that created the standard form where the title and box with minimize button, restore and maximize. There are many controls that can be placed on the form in accordance with the needs of our program.

 (Pointer) To select the control in the form.


 (Picture box) container box drawing

(Paper label) that is static or can not be changed by the user


 (Text Box) box where users enter text / data input


 (Frame) Box for grouping several objects of control.


 (Command button) key / button to trigger a specific program of action

 (Check box) option box that nature is free to choose.


 (Vscroll bar ) Has the form of a scroll bar can be moved up and down the vertical shape.


 (Option box) its option box to select one.


 (Combo box) shaped box drop down options.


 (List box) Box-shaped selection list.


 (Hscroll bar) Has the form of a scroll bar can be shifted to left and right horizontal.

 (timer) timers.


 (Drive list box) Grid computer drive option .


 (Dir list box) Box list of directories / folders computer.


 (File list box) Grid list of files on your computer.


 (Shape) Built forms flat (square, rectangle, circle, ellipse).


 (Line) Line form to create.


 (Picture box) Container for a display of the image file.


 (Data) Container for a display of the image file.


 (OLE) Controls to include other objects.


Programming Visual Basic programming techniques using an OOP (Object Oriented Programming) is a programming technique that models the program as a collection of objects that have relationships to each other or intertwined with each other wistful.

Each control (object) has properties, methods and events different.
Properties are attributes attached to a control (object) which is usually the appearance characteristics such as color, typeface, size and so on. Property of a control (object) can be changed at the time of programming (using the property window) or at the time the program starts (using the program codes in the code window).
Method is the action that is owned by the controls (objects) so that the user (programmer) can use it to manipulate things. Method depends on the instructions given by the programmer through the writing of code. Example: Command1.Click
Event is an event or anything that can be experienced by an object. A control (object) can have a lot of events. Example: Command1_Click (). Example: Command1.Caption = "OK"
READ MORE - Controls are objects that can be placed on a form Visual Basic
READ MORE - Controls are objects that can be placed on a form Visual Basic

Object-oriented programming (OOP)

Object-oriented programming is a programming paradigm to the object-oriented object orsomething. All data and functions in the place or classroom-object-oriented classes. Compare with structured programming logic. Each object can receive messages, process data, and send messages to other objects. Using OOP do so in solving a problem we do not see how to solve a problem (structured) objects but what can be done solving the problem. For example, assume we have a department that has a manager, secretary, clerk and other data. Suppose the manager wants to obtain data from the administration bag is not the manager have to take it directly but can be ordered administration officials to retrieve bags. In the case of a manager does not have to know how to retrieve the data but the manager can get the data via object administration officer. So to solve a problem with collaboration among the objects that exist because every object has his own job description.
Object-oriented programming consists of several classes :
  1. Class is a collection of definitions of data and functions in a unit for a particular purpose.
  2. Object to wrap the data and functions together as a unit in a computer program; object is the basis of modularity and structure in an object-oriented computer program.
  3. Abstraction is the ability of a program to pass information processing aspects of it, namely the ability to focus on the core. Every object in the system serve as a model of the "actors" who can do abstract work, reports and changes in circumstances, and communicate with other objects in the system, without disclosing how the excess is applied. Processes, functions or methods can also be made abstract.
  4. Ensuring users encapsulation for an object can not change the state of an object in a way that is not feasible; only method in which the object is given permission to access the situation. Each object access interface that mentions how other objects can interact with it. Other objects will not know and depend on the representation of the object.
  5. Inheritas to Organize polymorphism and encapsulation by allowing objects to be defined and created a special type of object already exists - these objects can share (and expand) their behavior without re-touching to implement such behavior (object-based languages do not always have inheritas).
The main focus on the functions and procedures that operate on the data, Fokus functions and procedures that operate on the data Big, Program program is divided into small units called functions, Data and functions are treated as separate entities, Data freely move around the system from one other function. The following design, Program "Top Down Approach". fokus the data being operated and do not function or procedure, Programs divided into what are called objects, Data and joint function are treated as separate entities, Data hidden and can not be accessed by external functions, The following design, Program "Bottom Up Approach".
READ MORE - Object-oriented programming (OOP)
READ MORE - Object-oriented programming (OOP)

Senin, 05 April 2010

program prime numbers are real numbers greater of Language C


prime numbers are real numbers greater than 1, the divider factor is the number 1 and it self. 2 and 3 are prime numbers. 4 is not prime because 4 can be divided by 2. Ten of the first prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. If a number greater than one are not prime numbers, the numbers are called composite numbers.

Language C strongly supports modular programming Since the initial C language program is divided into modules (some) Modules in C language functions known as (function)
Language C consists of functions, either directly declared in the program or are separated in the header file. Functions that are always there in the C program is main function.
Function / function is a collection of instructions / orders / programs grouped into one, located
separate from the program using these functions, have given a unique name, and used to do an objective certain. Functions - functions make the program has a clear structure. By separating step - step detail to one or more functions - functions, the main function (main) will be shorter, clear and easily understood. The functions are used to avoid writing The same program written repeatedly - again. Step - the step can be written only once separately in the form of the function. Next section programs that require step - this step is not should always write it down, not enough to call the function it. The argument can be there or not (optional) which used to accept arguments / parameters. Between the arguments are separated by use a comma.
function prototype is accompanied by a code implementation of the function, which contains statements / instructions that will perform duties in accordance with the objectives made functions.
READ MORE - program prime numbers are real numbers greater of Language C
READ MORE - program prime numbers are real numbers greater of Language C

programming C example triangles result elbow

programming C

  1. # include : line is a line iostream.h header declaration that serves to use the function input and output streams of printf and scanf
  2. # include : serves to show the function getch ().
  3. # include : This program lines to use manipulation functions of input and output "next tutorial".
  4. # define maxs 7: This line is declaring a constant maxs = 7.
  5. int column, row;: This line is a declaration of the row and column variables that will be used to control the iteration.
  6. clrscr ();: This program lines is a function of conio.h header file that serves to clean the screen "clearscreen".
triangles result elbow
READ MORE - programming C example triangles result elbow
READ MORE - programming C example triangles result elbow

C + + programs have a main function

# include
The sentence that begins with the sign (#) is a directive to preprosesor. Not a line of code is executed, but the indications for the compiler. In this case the phrase # include notify preprosesor header compiler to include the iostream standard file. This specific file also includes declarations standard library I / O in pemrograman C + + and this file is included because its functions will be used later in the program. The function used is the court stands for the console out or display data to the console or screen.
# include
Because using getch, it is necessary declaration header file that stores declaration conio getch function.
int main ()
This line matches at the beginning of the declaration of main functions. main function is the starting point where all the C + + program will begin execution. Placed at the beginning, middle or end of the program, the contents of the main functions will always be executed first. Basically, the entire C + + programs have a main function. play followed by a pair of parentheses () as a function. in C + +, all functions followed by a pair of parentheses () where, can contain arguments therein. The contents of the main function will then be followed, a formal and written declaration of ({}), brace as in the example.
getch ();
The function getch () function is to receive from the user entered via the keyboard, but in this program, getch only serves to stop the process before the results window disappears. If the getch command does not exist, then the results window will appear briefly and then quickly disappeared, so the last command executed.
results

differences in use "... \ n"
READ MORE - C + + programs have a main function
READ MORE - C + + programs have a main function

KNOWN PROGRAMMING LANGUAGE C and ELEMENTS BASIC PROGRAMMING, Character, Operator, Identifier, Constant

KNOWN PROGRAMMING LANGUAGE C

A. SEVEN ELEMENTS BASIC PROGRAMMING
Borland talk about there are seven basic elements of programming that must be understood by the programmer, namely:

  1. Get information and give to the program.
  2. Have a place to store information on.
  3. Give the correct instructions to manipulate the data.
  4. Take back the data, either raw data or processed results, to inform the user. For these needs, you can organize instruction so that:
  5. Some instructions executed only if some conditions are met.
  6. Some instructions can be executed repeatedly.
  7. Some instructions can be grouped into sections that can be executed from various locations of the program.

The seven basic elements of programming are respectively called the input, data, operations, output, conditional-execution, loops, and subprograms.

B. LANGUAGE ELEMENTS
1. Character
Letters, Numbers, and Line-bottom
The meaning of the letter is A s / d Z, and as / dz, the number is 0 to 9, and bottom-line is _.

White-space
The characters space, tab, line-feeds, carriage-return, form-feed, vertical-tab, and new-line is called white-space character because they have a function as a space between words or lines. Each identifier constant and always separated by these characters.

Signs reading and special character
Signs reading and special character in C has varied uses, from organizing the text until pendeinisian Vocational tasks that will be performed by the compiler. Characters who fall into this group are:

,. ;:? ! | / \ ~ + # % & ^ * - =" onmouseover="this.style.backgroundColor='#ebeff9'" onmouseout="this.style.backgroundColor='#fff'">' "() [] () <>! | / \ ~ + #% & ^ * - =

Escape Sequence
Characters escape-sequence is a sequence of characters used to represent the expression of a different character. Collection of this character always begins by backslash character (\) and followed by a letter or a combination of numbers.
List of characters escape-sequence is as follows.

\ n new-line
\ t horizontal tab
\ v vertical-tab
\ b backspace
\ r carriage-reurn
\ f form-feed
\ a bell
\ 'Sign-quotes
\ "-Quotation mark
\ \ Backslash
\ ddd ASCII character in octal notation
\ XDDD ASCII characters in hexadecimal notation

2. Operator
Operator (symbol-operation) are the symbols, whether in the form of one or several characters, which specify how a value being manipulated. They are:

! = | ^ ' ++ -- -= += /= %= << >> ==" onmouseover="this.style.backgroundColor='#ebeff9'" onmouseout="this.style.backgroundColor='#fff'">~ - + * /% <> = | ^ '+ + - -= + = / =% = <<>> ==
= |= && || ?: &= ^= <<= >>=" onmouseover="this.style.backgroundColor='#ebeff9'" onmouseout="this.style.backgroundColor='#fff'">! = <=> = | = & & | |?: & = ^ = <<=>> =

3. Constant
Integer Constant
An integer-constant is a decimal number, octal, or hexadecimal that represents an integer value.
A constant-decimal (based-ten) was formed by a set of numbers 0 to 9, with the stipulation does not begin by the number 0. A constant-octal (based-eight) is formed by a set of numbers 0 to 7, with the provisions initiated by the number 0. A constant-hexadecimal (sixteen-based) is formed by a set of numbers 0 to 9 and / or letters A s / d F or as / df, with provisions initiated by a number-letter 0x or 0x. Example:

Decimal Octal Hexadecimal
10 012 0xA
132 0204 0x84
32179 076663 0x7DB3

Floating-point Constant
A floating-point constant is a decimal number that represents a real number value. The value of this constant portions include integers, fractions, and exponents. This constant writing rules are like in the following format.

[digits] [. digits] [E | e [+|-] digits]

Where digits is a set of numbers from 0 s / d and E or e as an exponent symbol. Example:

12E-3 is 12 times 10 power -3
6.25E +4 means 6:25 times 10 power of 4

Character Constant
A character-constant formed by placing a character in the two-quotation marks ( ''). An escape-character is seen as a character, and therefore can be used as a constant character. Example:

'A'
'\ n'
'\ 0x41'

String-Literal
A string literal is formed by one or set of characters placed between the two-quotation marks. Example:

"BANDUNG"
"Today Fri \ 'at"
"Tit \ a \ a"
"Line-1 \ nBaris-2"

4. Identifier
Identifier is the name given to the constant-name, variable, type-data, function, and the label in the program. Each identifier to be used must be defined before.
An identifier is formed by one or several characters, as many as 31 characters, which starts by a letter or a line-down and can be followed by letters, numbers, or line-down. Take note, the language C distinguishes large-capitalization and small letters in an identifier. Example:

Clrscr
H2O
TempatTinggal
Nama_Siswa
City
Options

5. Keyword
To kegunan in programming, C language stoke some defined identifier, called keywords, for programmers. These words are instructions to C to do / express a certain thing. Therefore, all keywords can not be re-defined and used only as intended. Here is a list of keywords in the language C.

auto break case char const continue default do double else
enum extern float for goto if int long register return short
signed sizeof static struct switch typedef union unsigned void
volatile while

In addition to keywords above, the language C provides several other keyword that can be used in some particular implementations. That is:

near huge cdecl far pascal
READ MORE - KNOWN PROGRAMMING LANGUAGE C and ELEMENTS BASIC PROGRAMMING, Character, Operator, Identifier, Constant
READ MORE - KNOWN PROGRAMMING LANGUAGE C and ELEMENTS BASIC PROGRAMMING, Character, Operator, Identifier, Constant
.::BY JUMBHO-MY AT HOME IN THE JEPARA CITY OF BEAUTIFUL::.