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

Keys First and key code, Linux is Multi Users

Key code Linux Quick Study Every thing there was secret, there's how it works, there are systems and formulas. Linux, too. As the operating system, linux originally designed by ancestral example UNIX. But on the way, Linux has a remarkable evolution. lock code (which I define, of course) to understand Linux. What are the quick keys that advanced learning linux, please refer to the following notes.

Keys First, Linux is Multi Users

Linux supports multiple users in a system, the system here can include a network, LAN (Local Area Network), or just personal computers.

With the understanding that it multiusers linux, we can draw assumptions:

  • Default configuration for all users MUST exist and are stored in one place and at Copy SURE when you first create a user account on.

With this understanding, the administrator can perform a standard configuration as you wish without having to touch each user account.

  • With this understanding, users can install their own applications, have their own configuration, can run their own website, ftp themselves and others.
Key Second, Linux is multitasking Processes and tasks of each user is different DEFINITE. And will not interfere with other users. This means, you can run your own program without the worry over quota. This means, you can have a special directory that acts like a linux system. You can have a tmp directory, bin and lib your own. Key Third, the Linux Kernel Do not be confused with the many outstanding distribution and will continue to appear later. Every Linux distribution should follow the standard. These standards have the most basic foundation, the kernel. The kernel is responsible to recognize the file system, the kernel is responsible for how the applications interact with the hardware, the kernel also determines whether a feature / protocol supported or not. Try to notice, from the hundreds of distros that circulate nowadays, is not a system file structure and hierarchy equal or at least have similar arrangements? Is not, distributions that use the shell? And the internal order of each shell there are similarities? Is not the distros that use the desktop? And desktop environments that have similarities? Click on the left, right-click, scroll, ikonisasi, window, image format and so on. From this understanding, we can learn any distributions in minutes, if not within hours. Key Fourth, Linux's English-Language Kok, is entered into the category too? Clearly, our ability to understand the English language will be very helpful in understanding Linux. I do not mean to underestimate the distros based on regional languages. However, the cost and the energy expended to pursue progress and development of the emergence of new applications in the open source world are not comparable with the results achieved. It's easier for you, English language courses than 3 months to translate the documentation, message, and source code. Is not understanding English, you will be accepted everywhere? So, take time to learn English and enrich your vocabulary. Insha Allah, you will more quickly learn and adapt. Key Fifth, Linux's Shell Linux initially shell. Although it seems, "power" GUI start looking, in some degree, able to replace the GUI shell and able to work more efficiently than the GUI. Just bring your GUI system to a computer with minimum specifications, guaranteed not to work a maximum (or not work at all?). Compare this with the system shell that was taken to a dedicated environment for GUI systems. Wuzzzzz! Your system will work ten times as much. So, understand the shell, the shell study, is familiar with the shell, the shell is loved, surely you're in luck! :-) Key Sixth, Linux is Free and Open Source Why is this important? Because of the nature of Linux is free (in the sense-FREE), Linux has a mass of extraordinary support. Many communities are formed in each country, divided into projects, the distros and certain applications. In Indonesia itself, the masses that Linux is collected into a political party, might be able to vote later in 2009. By understanding Linux is Free (free) we are not afraid to use it in every aspect of computerized personal and societal. We can share it with sincerity or with minimal costs. With an understanding of Linux supported by a community, we can learn with others, we can share knowledge without fear of our names will be forgotten. Key Seventh, it also Linux Operating System This phrase is similar to the popular phrase from the band rockers seriuss, "rocker was also human". Linux is not much different from other operating systems like windows, mac os, bsd, solaris, dos, and more. The problems faced are also facing another OS Linux. Solutions for other operating systems can be applied in Linux. With this understanding, we do not have to wonder, "why on Linux, this driver does not work like in the OS-so". We do not need to stare, "my Ubuntu an earlier release, can be similar to the new OS looks like this". Do not too confident, too, a time, the virus will appear also in the world of Linux. Well, this summary can I write and I was forced, so matched my everyday. WARNING: 7 Keys to Advanced Linux is not a formula that was formulated by a like Linus or RMS or caliber Om or Om Onno Rusmanto. And certainly, not be able to get out of this caliber brain "you know who". So, bear the risk if you use them in an institution that "scientific".
READ MORE - Keys First and key code, Linux is Multi Users
READ MORE - Keys First and key code, Linux is Multi Users

Predecessor of the development of the programming language BASIC in Visual Basic


A programming language is the language that humans use to communicate with the computer. Computers require certainty and logic / algorithm is good and right to perform a specific instruction. Because the human mind is not structured so should be structured with these programming languages. Visual Basic is one of the high-level programming language (High Level Language) where the language more closely and easily understood by humans. Visual Basic developed by Microsoft since 1991, is the predecessor of the development of the programming language BASIC (Beginner's All-purpose Symbolic Instruction Code) which was developed in the era of the 1950s. Visual Basic is one of the computer programming language that supports object (Object Oriented Programming = OOP). Types of programming languages in general are divided into three namely:

  1. Language machine is a language that contains the machine code that can only be interpreted directly by the machine (computer). Often also called native code (the language that is highly dependent on a particular machine type). This language is a language of the lowest level (Low Level Language) and the form of binary code: 0 and 1. Execution of this language is very fast but also very difficult for humans to learn. Examples: for IBM/370 machine. For example; 0001100000110101 = 1835 which means the contents of the register duplicate register 5 to 3.
  2. Assembly language is a language of symbols of the machine language. Each machine language code symbols themselves in Assembly language. For example ADD for addition, for multiplication, SUB for subtraction, and others. A set of language codes can be formed program Assembly. Assembly language also has a population program debug it, unlike machine language. For example: Turbo Assembler and debug in DOS. Assembler will match the token symbol of the early s / d end, and then encoded into machine language. Rapid execution, were more easily learned than machine language, the file size is very small. But it remains less friendly to learn (not resembles human language) and very long program.
  3. High Level Language (High Level Language) which is closer to human language. This language also provides a lot of programming convenience facilities, such as: variables, data types, constants, control structures, loops, functions, procedures and others. Examples of these languages: Pascal, Basic, C + +, and Java. This language supports information hiding, encapsulation, and abstract data types. High-level language consisting of several generations, such as 3rd generation (Pascal, C / C + +) and generation-4 (Delphi, VB, VB.NET, Visual Foxpro). Compared to machine language and Assembly, High Level Language is easier to learn and linguistically close to the problems will be solved, but the short program code execution is slower. Visual programming languages other than Visual Basic include Visual C + +, Visual Java and Visual Foxpro. Conclusion: Visual Basic Development is one tool that is a tool for making a variety of computer programs, especially those using the Windows operating system. Visual Basic also provides a lot of programming convenience facilities, such as: variables, data types, constants, control structures, loops, functions, procedures and others. In accordance with technological developments and the needs of current language continues to be developed ability.
READ MORE - Predecessor of the development of the programming language BASIC in Visual Basic
READ MORE - Predecessor of the development of the programming language BASIC in Visual Basic

Client-server computing or networking


Client-server computing or networking is a distributed application architecture that partitions tasks or work loads between service providers (servers) and service requesters, called clients.

Often clients and servers operate over a computer network on separate hardware. A server machine is a high-performance host that is running one or more server programs which share its resources with clients. A client does not share any of its resources, but requests a server's content or service function. Clients therefore initiate communication sessions with servers which await (listen to) incoming requests.

The client-server characteristic describes the relationship of cooperating programs in an application. The server component provides a function or service to one or many clients, which initiate requests for such services.

Functions such as email exchange, web access and database access, are built on the client-server model. For example, a web browser is a client program running on a user's computer that may access information stored on a web server on the Internet. Users accessing banking services from their computer use a web browser client to send a request to a web server at a bank. That program may in turn forward the request to its own database client program that sends a request to a database server at another bank computer to retrieve the account information. The balance is returned to the bank database client, which in turn serves it back to the web browser client displaying the results to the user.

The client-server model has become one of the central ideas of network computing. Many business applications being written today use the client-server model. So do the Internet's main application protocols, such as HTTP, SMTP, Telnet, DNS. In marketing, the term has been used to distinguish distributed computing by smaller dispersed computers from the "monolithic" centralized computing of mainframe computers. But this distinction has largely disappeared as mainframes and their applications have also turned to the client-server model and become part of network computing.

Each instance of the client software can send data requests to one or more connected servers. In turn, the servers can accept these requests, process them, and return the requested information to the client. Although this concept can be applied for a variety of reasons to many different kinds of applications, the architecture remains fundamentally the same.

The most basic type of client-server architecture employs only two types of hosts: clients and servers. This type of architecture is sometimes referred to as two-tier. It allows devices to share files and resources. The two tier architecture means that the client acts as one tier and application in combination with server acts as another tier.

The interaction between client and server is often described using sequence diagrams. Sequence diagrams are standardized in the Unified Modeling Language.

Specific types of clients include web browsers, email clients, and online chat clients.

Specific types of servers include web servers, ftp servers, application servers, database servers, name servers, mail servers, file servers, print servers, and terminal servers. Most web services are also types of servers.

File sharing is the practice of distributing or providing access to digitally stored information, such as computer programs, multi-media (audio, video), documents, or electronic books. It may be implemented in a variety of storage, transmission, and distribution models. Common methods are manual sharing using removable media, centralized computer file server installations on computer networks, World Wide Web-based hyperlinked documents, and the use of distributed peer-to-peer (P2P) networking.

File sharing is not of itself illegal. However, the increasing popularity of the mp3 music format in the late 1990s led to the release and growth of Napster and other software that aided the sharing of electronic files. This in practice led to a huge growth in illegal file sharing: the sharing of copyright protected files without permission.

Although the original Napster service was shut down by court order, it paved the way for decentralized peer-to-peer file sharing networks such as Gnutella, Gnutella2, eDonkey2000, the now-defunct Kazaa network, and BitTorrent.

Many file sharing networks and services, accused of facilitating illegal file sharing, have been shut down[citation needed] due to litigation by groups such as the RIAA and MPAA. During the early 2000s, the fight against copyright infringement expanded into lawsuits against individual users of file sharing software.

The economic impact of illegal file sharing on media industries is disputed. Some studies conclude that unauthorized downloading of movies, music and software is unequivocally damaging the economy, while other studies suggest file sharing is not the primary cause of declines in sales. Illegal file sharing remains widespread, with mixed public opinion about the morality of the practice.

A peer-to-peer, commonly abbreviated to P2P, is any distributed network architecture composed of participants that make a portion of their resources (such as processing power, disk storage or network bandwidth) directly available to other network participants, without the need for central coordination instances (such as servers or stable hosts).

Peers are both suppliers and consumers of resources, in contrast to the traditional client-server model where only servers supply, and clients consume.

Peer-to-peer was popularized by file sharing systems like Napster. Peer-to-peer file sharing networks have inspired new structures and philosophies in other areas of human interaction. In such social contexts, peer-to-peer as a meme refers to the egalitarian social networking that is currently emerging throughout society, enabled by Internet technologies in general.

Peer-to-peer (P2P) is a term that originated from the popular concept of peer-to-peer computer application design, popularized by the large distributed file sharing systems, such as Napster, the first of its kind in the late 1990s. The concept has inspired new structures and philosophies in other areas of human interaction. In this context it refers to the meme of egalitarian social networking that is currently emerging throughout society, enabled by Internet technologies. This affords a critical look at current authoritarian and centralized social structures.

The peer-to-peer paradigm has been elucidated by Michel Bauwens in his thesis Peer to Peer and Human Evolution.

Peer-to-peer networks are typically formed dynamically by ad-hoc additions of nodes. In an 'ad-hoc' network, the removal of nodes has no significant impact on the network. The distributed architecture of an application in a peer-to-peer system provides enhanced scalability and service robustness.

Peer-to-peer systems often implement an Application Layer overlay network on top of the native or physical network topology. Such overlays are used for indexing and peer discovery. Content is typically exchanged directly over the underlying Internet Protocol (IP) network. Anonymous peer-to-peer systems are an exception, and implement extra routing layers to obscure the identity of the source or destination of queries.

In structured peer-to-peer networks, connections in the overlay are fixed. They typically use distributed hash table-based (DHT) indexing, such as in the Chord system (MIT)
READ MORE - Client-server computing or networking
READ MORE - Client-server computing or networking

Minggu, 04 April 2010

SEVEN ELEMENTS BASIC PROGRAMMING

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

ol>
  • Get information and give to the program.
  • Have a place to store information on.
  • Give the correct instructions to manipulate the data.
  • Take back the data, either raw data or processed results, to inform the user. For these needs, you can organize instruction so that:
  • Some instructions executed only if some conditions are met.
  • Some instructions can be executed repeatedly.
  • 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.

    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:
    READ MORE - SEVEN ELEMENTS BASIC PROGRAMMING
    READ MORE - SEVEN ELEMENTS BASIC PROGRAMMING

    TYPES OF DATA, constants, VARIABLE, SYMBOL OF OPERATIONS, AND EXPRESSION

    Indonesian to English translationShow romanization
    TYPES OF DATA, constants, VARIABLE, SYMBOL OF OPERATIONS, AND EXPRESSION

    Note: sorry the tables are not neat, I do not know the use of tables in this forum

    Variables & constants are the basic data objects manipulated in a program. Every constant and variable data types must be clear. For that they must be declared before.

    Operator (operation symbol) is used to determine what to do about the constant / variable.

    Expression is a wake algorithm, based on certain rules, to calculate a value. An expression is formed by the variables, constants and functions (Operands) that combined the symbols of operations (operators).

    Rules that apply in an expression is as follows
    1. an expression of the operation of the operator will put the highest level.
    2. an expression will put the operation of the first leading operators if the operators that are used have the same level.
    3. an expression that contains the operating priority (in parentheses), will advance the implementation of these priority operations.
    4. Operands used in an expression must have or produce the same type of data.


    A. MAIN TYPES OF DATA
    C basically only knows four kinds of words, ie char, int, float, and double.

    A type of data set a value that can rentangs owned by a constant and variable, or produced by an expression or function. (Nicklaus Wirth 1976:4)

    Thus, if you will use a constant, variable, or function they must set its data type, because each operation is established based on a specific data type.

    Char data types is a single byte that has the ability to hold a character data. Int data types is a type of data that has the ability to hold an integer value. Float data types is a type of data that has the ability to hold a value of single precision real numbers. Double data types is a type of data that has the ability to hold a value of double precision real numbers.

    Expansion of int data type embodied in the two other data types, namely short and long, distinct ability to store a range of values given to him.
    Types of data types char, int, short, and long may be preceded by a signed or unsigned keyword to indicate that the type of data include negative integer or not. If it is not stated, it is considered signed.

    Range of values and the size of each type of data depends on the type of machine and compiler used.

    Code:

    Range sizes of data types values
    -------------- ------ ---------------------------
    1 byte char -128 s / d 127
    unsigned char 1 byte 0 to 255
    2 byte signed int -32.768 s / d 32.767
    2 byte unsigned int 0 s / d 65.535
    2-byte short -32.768 s / d 32.767
    2 byte unsigned short 0 s / d 65.535
    2 bytes long -2,147,483,648 s / d 2,147,463,647
    unsigned long 4 bytes 0 to 4,294,967,295
    4-byte float 3.4E-38 s / d 3.4E +38
    8 byte double 1.7E-308 s / d 1.7E +308

    Note:
    * Suffix L to be written behind the integer constants to distinguish the data type long or unsigned long data type of the other integers.
    * String data type is seen as an array of characters

    B. VARIABLES
    Variable is a quantity whose value can change during program. Each variable is expressed by an identifier.
    Each variable must be declared before used in the program. Each variable must be declared data type. The general form of declaring variables is as follows.

    [type] id_var1 [, id_var2 ...];

    id_var1 and id_var2 which is a declared variable name, and type is the type of data set for id_var1 and id_var2. Example:

    int liter, the price;
    char name [20];

    in the declaration of a variable can be initialisasi value of the variable. The general form of variable declarations and initialisasi are as follows.

    [type] id_var1 = val_var1 [, id_var2 = val_var2 ...];

    id_var1 and id_var2 which is a declared variable name, val_var2 is val_var1 and the initial value set at id_var1 and id_var2, and type is the type of data to and var_1 en id_var2. example:

    int liter,
    price = 385;
    char name [20] = "Abdallah";

    examples-3.1 program will prompt the user program to write his name, to define the variables, and then print a message in standard output media.

    Program 3.1: SALAM.C
    Code:

    # include

    char name [20],
    prompt [20] = "Enter your name:";

    main ()
    (
    printf (prompt);
    scanf ( "% s", name);
    printf ( "Hello% s. Congratulations to learn C. \ n", name);
    )

    if the program is run will display the following display.

    Write your name: Grace
    Hello Grace. Congratulations to learn C.

    C. Arithmetic operations
    Arithmetic operators used in C is generally equal to the symbol used to calculate the operation. Operator operators, utility, priorities, examples of expression and the result is as shown in Table 3.2

    Table 3.2:
    Arithmetic operators
    Code:

    Example operations operator expression results
    -------- -------------- --------------- -----
    * Multiplication 21 * 8 208
    / Division 27 / 3 9
    % Remaining 30% division 4 2
    + Sum 2 +10 12
    - Reduction of 29-13 16

    Notes
    * The operator% can not be used for the data types float or double.
    * Operator * / and% have the same priority level, as well as the operator + with -, the first operator has a priority level higher than the second group.

    Based on the expression rules that have been mentioned in the beginning of this chapter the implementation phases of dilalukan for arithmetic expressions like the following is stated by the next expression.

    Code:

    Implementation of Phase Expression
    ------------ -----------------
    2 +3 * 4 2 +12
    14
    (2 +3) * 4 5 * 4
    20
    2 * 3% 4 6% 4
    2
    2 * (3% 4) 2 * 3
    6
    2 +3.0 / 4-5 2 +0.75-5
    2.75-5
    -2.25
    (2 +3) / (4-5) 5 / (4-5)
    5/-1
    -5

    Careful with your heart division. If the numerator and denominator integers of the results of this operation is also an integer form. To get results for a real number so one of the numerator and denominator must be real numbers. Example:

    Code:

    Result expression
    -------- --------------
    10 / 3 3
    (float) 10 / 3 3.333333

    D. RELATIONSHIP AND LOGIC OPERATION
    The operation used to test the connection relationship between two Operands. The resulting value of this operation is 0 if false and -1 if true. Operators used are as shown in Table 3.3

    Table 3.3:
    Operator Relations
    Code:

    Operator Operation
    -------- ---------------------
    == Equals
    ! = Not equal to
    Larger
    <= Smaller or equal> = greater than or equal

    Consider the example of service reduction and the value of relationships end in the following expression.
    Code:

    Result expression
    ---------- -----
    2> 3 0
    2! = 3 -1
    5 == 4 * 10 * 2 -1

    Priority relations operations is lower than arithmetic operations. Here is a sample implementation phases done for arithmetic expressions and relationships.
    Code:

    implementation phase expression
    ---------- -----------------
    2 <5-3 3 =" 2" 2 ="=" 20 ="=" a =" a" a =" a-1" b =" a" b =" a" a =" a" b =" 3" b =" 3" aa =" a-1" b =" +" a =" a" b =" a" b =" 3" aa =" a-1" b =" 3" ac =" a" bb =" b" c =" a" ba =" a" id_var =" id_var" a =" 5" a =" a" op =" expression">>, &, ^, and |. Operation in top form implies.

    id_var op id_var = expression

    Example:
    Code:

    expression Eq
    -------- ---------
    x *= y-1 x = x * (y +1)
    x + = 5 x = x +5
    x>> = 3 x = x>> 3

    3. Implementation Priorities and Direction Operator
    The following table shows the level of priority and direction of implementation of the operator, which has been discussed whether or not yet. Operators located on the same line have the same priority level with the implementation in accordance with that stated in the next column.


    Table 3.5:
    Implementation Priorities and Direction Operator
    Code:

    Directions operator implementation
    --------------------------- ------------------
    () [] ->. From left to right
    ! ~ + + - - (Type) * & sizeof From right to left
    * /% From left to right
    + - From left to right
    <<>> From left to right
    <<=>> = From left to right
    ==! = From left to right
    & From left to right
    ^ From left to right
    | From left to right
    & & From left to right
    | | From left to right
    ?: From right to left
    = + = -=, Etc. From right to left
    , From left to right
    READ MORE - TYPES OF DATA, constants, VARIABLE, SYMBOL OF OPERATIONS, AND EXPRESSION
    READ MORE - TYPES OF DATA, constants, VARIABLE, SYMBOL OF OPERATIONS, AND EXPRESSION

    The question ON DATABASE

    The question ON DATABASE

    A. Goto statements and labelsThe statements (statements) are written in a program will be carried out sequentially starting from the first statement to the last statement. Example:


    ...
    statement_1;
    statement_2;
    statement_3;
    statement_4;
    statement_5;
    statement_6;
    ...

    If we intend to state that after the execution of certain statements (eg after statement_2) program flow will proceed to the specific statements other than statements directly below (eg to statement_5), then we must use goto statement, and set a label at the location in question . Example:

    ...
    statement_1;
    statement_2;
    goto next;
    statement_3;
    statement_4;
    next:
    statement_5;
    statement_6;
    ...

    A label is a common identifier followed by a colon symbol (:). B. Function statement The statement is a statement function is used to call a function. Statement of functions performed by writing the name of the intended function and its arguments will be given to the parameters contained in these functions. In connection with this we must know what the name of the function and what parameters are needed by the function we will use. Such information can be found in the prototype, definition, or declaration of the function. Prototype and the definition of standard functions (which have been provided by the manufacturer compiler) can be found in the include directory with the file name berekstensi. H are grouped according to their usefulness, such as stdio.h, stdlib.h, conio.h, io.h, and others. To allow the compiler can check the truth of the statement writing a function in the source code, the file containing the function prototype should be include in the source code. C. Joint Statement / Block Joint statement or block is a set of statements defined as a unified statement. This is used to simplify the writing of statements repeatedly. Joint statement or a block preceded by the symbol "(" followed by statements that become members and terminated by the symbol ")". Example: {
    statement_1;
    statement_2;
    statement_3;
    ...
    }

    D. If-else statement Implementation of a statement may be made only if a certain condition are met. If-else statement is one statement that can be used for this purpose. The general form of this statement are: if (expression) stat_1; [else stat_2;] Where expression is the expression of an ordinal (returns an integer value). Stat_1 statement will be made if the expression value is not 0 and stat_2 statement will be made if the expression is 0. Example: Code: if (code = 0) strcpy (sex, "Women"); else strcpy (sex, "Male"); Let us try to apply this statement in the following problem. Say you want a Fuel Price Table, from 1 to 10 liters. Desired output as follows. Code: Solar Liter Super Premium --------------------------- 1 250 385 450 2 500 770 900 3 750 1155 1350 4 1000 1540 1800 5 1250 1925 2250 6 1500 2310 2700 7 1750 2695 3150 8 2000 3080 3600 9 2250 3465 4050 10 2500 3850 4500 --------------------------- By using the statements that have been discussed above, the program for it is as shown below. Program-4.1: bbm.c Code: # include int liter, diesel, premium, super; main () ( printf ( "Solar Liter Super Premium \ n"); printf ("--------------------------- \ n "); liter = 1; repeat: * liter diesel = 250; Premium = liter * 385; liter * super = 450; printf ( "% 5d% 5d% 5d% 5d \ n", liter, diesel, premium, super); liter + +; if (liters <= 10) goto repeat; ("--------------------------- printf \ n ");) E. Switch-case statement, the default switch-case statement, the default is an extension of if-else statement that allows a variety of conditions. The general form of this statement is: switch (expression) (case eks_1: [stat_1; ... break;] case eks_2: [stat_2; ... break;] ... [default: stat_n; ... break;]) stat_1 statement and would do so if expression = eks_1. Stat_2 statements and so on will be done if expression = eks_2. Stat_n statements and so on will be done if the expression is not the same as the previous test. For example, say we have the item code (kb) and will set the name of goods (nb) and the type of goods (jb) based on the item code. Name of goods is the CPU, CRT, LCD, MS Office, Norton Anti Virus, and PhotoShop for code items 1, 2, 3, 4, 5, and 6. While the types of goods are goods Hardware for code 1, 2, and 3 or software to code items 4, 5, and 6. Code: switch (kb) (case 1: strcpy (nb, "CPU"); strcpy (jb, "Hardware"); break; case 2: strcpy (nb, "CRT"); strcpy (jb, "Hardware") ; break; case 3: strcpy (nb, "LCD"); strcpy (jb, "Hardware"); break; case 4: strcpy (nb, "MS Office"); strcpy (jb, "Software"); break; case 5: strcpy (nb, "Norton Anti Virus"); strcpy (jb, "Software"); break; case 6: strcpy (nb, "PhotoShop"); strcpy (jb, "Software"); break; default: strcpy (nb, "Name of the goods had not been set"); strcpy (jb, "Types of goods had not been set"); break;) Use a case for doing the same statement can be done as the following example. Code: switch (kb) (case 1: strcpy (nb, "CPU"); break; case 2: strcpy (nb, "CRT"); break; case 3: strcpy (nb, "LCD"); break; case 4: strcpy (nb, "MS Office"); break; case 5: strcpy (nb, "Norton Anti Virus"); break; case 6: strcpy (nb, "PhotoShop"); break; default: strcpy (nb, "The name of the goods had not been set"); break;) switch (kb) (case 1: case 2: case 3: strcpy (jb, "Hardware"); break; case 4: case 5: case 6: strcpy (jb, " Software "); break; default: strcpy (jb," Types of goods had not been set "); break;) F. While statement while statement is used to repeat the execution of certain statements during certain conditions are met. The general form of this statement is: while (expression) statement; Where expression is the expression of an ordinal (returns an integer value). Statement will be repeated during the expression of value is not 0. Algorithm this statement is: repeat: if (expression) statement; goto repeat; endif Here is the use to replace the while statement if and goto statements in the program 4.1. Code: # include int liter, diesel, premium, super; main () ( printf ( "Solar Liter Super Premium \ n"); printf ("--------------------------- \ n "); liter = 1; while (liters <= 10) (solar = liter * 250; premium = liter * 385; super = liter * 450; printf ( "% 5d% 5d% 5d% 5d \ n", liter, diesel, premium, super); liter + +;) printf ("--------------------------- \ n ");) G. Statements do-while do-while statement is basically the same as while statement, which is used to repeat the execution of certain statements during certain conditions are met, only the location of the test condition is at the end of the statement. The general form of this statement is: do statement; while (expression); Where expression is the expression of an ordinal (returns an integer value). Statement will be repeated during the expression of value is not 0. Algorithm this statement is: repeat statement if (expression) goto repeat; endif Here is the use of do-while statement instead of if and goto statements in the program 4.1. Code: # include int liter, diesel, premium, super; main () ( printf ( "Solar Liter Super Premium \ n"); printf ("--------------------------- \ n "); liter = 1; do (Solar = liter * 250; Premium = liter * 385; liter * super = 450; printf ( "% 5d% 5d% 5d% 5d \ n", liter, diesel, premium, super); liter + +; ) While (liters <= 10) printf ("--------------------------- \ n ");) H. Statement for statement for essentially the same as while statement, which is used to repeat the execution of certain statements during certain conditions are met, only where there is a statement for the pre and post implementation of the statement. The general form of this statement is: for ([prestatement]; [expression]; [poststatement]) statement; algorithm of this statement is:. prestatement; repeat: statement; poststatement; if (expression) goto repeat; endif The following is a statement for use to replace if and goto statements in the program 4.1. Code: # include int liter, diesel, premium, super; main () ( printf ( "Solar Liter Super Premium \ n"); printf ("--------------------------- \ n "); for (liters = 1; liter <= 10; liters + +) (Solar = liter * 250; Premium = liter * 385; liter * super = 450; printf ( "% 5d% 5d% 5d% 5d \ n", liter, diesel, premium, super); ) printf ("--------------------------- \ n "); ) Statement liters = 1 can be defined as prestatement and statements liters + + as poststatement. With so then it can be written by using the statement for a more simpler. I. Break and continue statements Break statement is used to control the program flow in a statement switch-case-default, while, do-while, and for, namely to move to the next statement. Continue statement is used to control flow of programs on the next iteration of the while statement, do-while, and for where he is.
    READ MORE - The question ON DATABASE
    READ MORE - The question ON DATABASE
    .::BY JUMBHO-MY AT HOME IN THE JEPARA CITY OF BEAUTIFUL::.