Homework 10 - October 25

Multi-alternative selection statements

 

  1. What do each of the following languages call their multi-alternative selections statements?
    1. Pascal
    2. Java
    3. Ada

 

  1. What types are allowed for the multi-alternative variable in
    1. Pascal
    2. Java
    3. Ada

 

  1. Each of the multi-alternative choice statements has two parts:  a value and  an action.   Provide a simple example of a choice statement in
    1. Pascal
    2. Java
    3. Ada

 

  1. Is the multi-alternative choice statement allowed to have multiple values in
    1. Pascal
    2. Java
    3. Ada

 

  1. If your answer to the previous question was "yes" give an example the value part of such a choice statement in
    1. Pascal
    2. Java
    3. Ada

 

  1. Can a value appear in more than one of the choice statements in
    1. Pascal
    2. Java
    3. Ada

 

  1. Is a "default" choice provided and if so, what is its format in
    1. Pascal
    2. Java
    3. Ada

 

  1. How does the behavior of the multi-alternative choice statement in Pascal and Ada differ from that in C and Java?

 

 

  1. What selection statement in FORTRAN  is most similar to the multi-alternative choice statement in Ada, Java and Pascal?

 

 

  1. Is there anything distinctive about Ada's multi-alternative choice statement when compared to that of Java and Pascal?