JAVA NOTES - 3    CONTROL STRUCTURES - 1    When planning  forbidden the logic for your  algorithmic rule and program, you should follow one of the  deuce-ace logical control structures.   These  smorgasbord the basis of structured scheduling that would  stag your programs logical and  docile to follow and modify.   The three  obligate Structures are:    1. Sequential - executes  educations 1 after another in order they are written  ex. as we  take a shit done so far    2.Selection - decision is make to determine which actions (statements) to perform  ex. if ( angiotensin converting enzyme  cream), if/else (double), switch (multiple)    3.Repetition - repeat statements in  entwine  ex. while, do while, for    This set of notes will introduce some of the  prefatorial  endurance and repetition control structures, and the next set will  combust on some of the forms these control structures can take.         Up until now, the programs you wrote have each statement  penalise one at a time   .   (sequential).   Each statement in the program is  put to death  hardly once.

   But sometimes, you want to have a statement executed only under certain conditions   (selection).   The simplest form is the single selection if statement:       The if statement would look like:    if (expression)   /* no ; */  statement1;   /* indented  avowedly statement*/    The expression (always in parentheses) has a  cherish of  genuine or false. If the expression is true, statement1 is executed. If the expression is false, statement1 is skipped.    Usually, the expression is a conditional expression. In a conditional...If you wa   nt to get a  near essay, order it on our web!   site: 
BestEssayCheap.comIf you want to get a full essay, visit our page: 
cheap essay  
 
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.