Shared Flashcard Set

Details

QUIZ 3- PROGRAMMING FUNDAMENTALS
QUIZ 3 PROGRAMMING FUNDAMENTALS
8
Computer Science
Undergraduate 1
10/10/2016

Additional Computer Science Flashcards

 


 

Cards

Term
What's a If Statement in Java
Definition
is a single selection type of structure ebcause it either selects to carry out or it ignores a single action.
Term
What's the structure of an IF statement?
Definition

 

If ( some boolean expresion)  (  NO ";" NEEDED)

{

block statement to be executed if expression is true;

}

 

next line of code.

Term
What's an else structure?
Definition
an IF-ELSE structure is called a double-selection sctructure because it executes one block of code if the condition evaluates to true, and a different block of code if the condition evaluates to false.
Term
What's an structure of If-else statements?
Definition
zif ( boolean expression)

    {

      //block statement(s) for true case;

    }

    else

  {

    //block statement(s) for false case;

  }//end if-else

Term
What does the && does
Definition

it is a logical operator, basically used for if statements to express two conditionals within the same range


if (mark >= 50 && mark <55)
   then award a mark of ‘D’

Term

What does OR logical operator do

it is also represented as ||

Definition

when we want to test multiple conditions at the same tiem but only ONE condition has to be met in order to proceed

 

example:

 

If(qualifitaion == "diploma" OR qualification== 
CCNP)

then person is qualified to apply. 

Term
What's the NOT or Negation Operator !
Definition

The excalmation mark, also called the bang operator is logical NOT operator

 

it reverses the value of any boolean operand it is placed in front of

 

 

Term
What's a Switch Stamenet
Definition

It is used for evaluating a value against more than four or five cases, a swtich statement may be better choise than If


it's cleaner and easier to follow


it can evaluate specific ints but not decimals.


you can't use > <

Supporting users have an ad free experience!