Pages


I made this widget at MyFlashFetish.com.

Saturday, April 9, 2011

Repetition Structure

What are the Difference Between these TWO Repetition Structure

Last week, Madam Sharin Hazlin had told us to post new entry about what are the difference between these two repetition structure
DO......... UNTIL  AND DO.......WHILE?

Repetition Structure : When we talk about allows a user to specify that a program should repeat an action while some condition remains true. 

DO..... UNTIL (DOU)

The DOU operations allow the processing of a group of calculations one or more times. The end of a Do-Until operation is indicated by an ENDDO operation. Here processing is done at least one time.

DO...... WHILE (DOW)

The DOW operations allow the processing of a group of calculations zero or more times. The end of a Do-While operation is indicated by an ENDDO operation.
The do-while is very similar to the regular while with just one difference. The while is a leading decision loop, but the do-while is a trailing decision loop. Therefore the condition is at the beginning of the while loop but at the end of the do-while loop. For that reason a while may be executed zero times, such as when the condition is initially false. On the other hand, the do-while is always executed at least once, because the condition is not even checked until after the first execution of the loop body.
This flowchart illustrates the general logic of a trailing-decision loop. The body of the loop is executed at least once, because the condition test follows the body. A trailing-decision loop can also be implemented using a while loop, which is illustrated in the next exhibit. 

Do...While Example

Suppose you want to verify that the user input was a positive number, and if they enter a negative or zero to keep prompting for correct input. Clearly, in this case you need to get the input before you test for the condition, therefore we need a do-while loop:

int age;
do{
String input = JOptionPane.showInputDialog("Please enter a value for age");
age = Integer.parseInt(input);
}while(age<=0); 


The general for of the do-while statement is:
do
statement 
while(condition);

Source Retrieved On,

What is computer language? Explain the different types of computer language?




Group K-Learn4U computer language like human talk to chicken....means we cannot understand each other....only them can understand each other.

In my understanding from the group presentation, they said computer language have fifth generation language. Their group also show the class example of computer language and the are talking about real things when said human never understand what chicken is talking. Computer language just represents number and the number represents information! So amazing! The lower programming language is better for focus on curtain task..

The term computer language includes a wide variety of languages used to communicate with computers. It is broader than the more commonly-used termprogramming language. Programming languages are a subset of computer languages. For example, HTML is a markup language and a computer language, but it is not traditionally considered a programming language. Machine code is a computer language. It can technically be used for programming, and has been (e.g. the original bootstrapper for Altair BASIC), though most would not consider it a programming language.



Computer languages can be divided into two groups: high-level languages and low-level languages. High-level languages are designed to be easier to use, more abstract, and more portable than low-level languages. Syntactically correct programs in some languages are then compiled to low-level language and executed by the computer. Most modern software is written in a high-level language, compiled into object code, and then translated into machine instructions.

Computer languages could also be grouped based on other criteria. Another distinction could be made between human-readable and non-human-readable languages. Human-readable languages are designed to be used directly by humans to communicate with the computer. Non-human-readable languages, though they can often be partially understandable, are designed to be more compact and easily processed, sacrificing readability to meet these ends.



Any question we can refer to this link:http://answers.yahoo.com