When an exception occurs in an ada procedure

Assignment Help JAVA Programming
Reference no: EM13941756

1. A vector processor is an example of a ______ computer.

a. single instruction, single data stream (SISD)

b. multiple instruction, multiple data stream (MIMD)

c. single instruction, multiple data stream (SIMD)

d. multiple instruction, single data stream (MISD)

2. Prolog's order of evaluation is:

a. left to right, depth first.

b. right to left, depth first.

c. left to right, breadth first.

d. right to left, breadth first.

3. A data structure consisting of an integer variable and a queue of task descriptors is called a semaphore.

a. True

b. False

4. In Prolog, instantiation:

a. binds a value to a variable.

b. binds a type to a variable.

c. computes an inferred proposition from given propositions.

d. a and b.

e. a and c.

f. b and c.

g. all of the above.

5. A monitor:

1. shared data is resident in the monitor rather than clients.

2. provides synchronization without semaphores.

3. provides cooperation synchronization.

a. 1 and 2

b. 1 and 3

c. 2 and 3

d. 1, 2, and 3

6. In C++, exceptions are raised by the _____ expression.

a. raise

b. try

c. when

d. throw

7. All of the following are advantages of exception handling except:

a. eliminates code clutter resulting from error-checking.

b. enables error propagation to specialized routines.

c. provides the means for avoiding logic errors.

d. encourages programmers to consider all of the events that could occur and plan for handling them.

8. In the event a Java Virtual Machine runs out of heap memory, an exception is thrown by the Error class that should be handled by the programmer.

a. True

b. False

9. Programs that have coroutines have _____ of control.

a. a single thread

b. multiple threads

c. virtual multiple threads

d. physical multiple threads

10. In Ada, the block or unit that raises an exception is continued or resumed.

a. True

b. False

11. The simplest choice for handling an exception is:

a. continue execution at the next block of code.

b. continue execution at the next statement.

c. terminate the program.

d. none of the above.

12. When an exception occurs in an Ada procedure, either in the elaboration of its declaration or execution of its body, the exception:

1. is implicitly propagated to the calling program unit at the point of the procedure call.

2. may be traced back through its static ancestors, at the programmer's option.

3. may be traced back through its dynamic ancestors, at the programmer's option.

a. 1

b. 2

c. 3

d. 1 and 2

e. 1 and 3

f. 2 and 3

g. All of the above.

13. In logic programming, the right side of a _______ form proposition is called the _______.

a. sentential; consequent

b. clausal; consequent

c. sentential; antecedent

d. clausal; antecedent

14. If a computer has more than one processor, several program units from the same program may execute simultaneously. This type of concurrency is termed:

a. virtual.

b. literal.

c. physical.

d. logical.

15. Using Scheme, LET creates a new local dynamic scope in much the same way as Ada's declare.

a. True

b. False

16. A binary semaphore is a semaphore that has a queue of binary variables.

a. True

b. False

17. In logic programming, the inference rule that allows inferred propositions to be computed from given propositions is called:

a. unification.

b. resolution.

c. instantiation.

d. evaluation.

18. Scheme predicate functions return a Boolean value of either True or

False.

a. True

b. False

19. Consider the following Scheme function:

(DEFINE (mystery lis1 lis2)

(COND

((NULL? lis1) (NULL? lis2))
((NULL? lis2) ‘())
((EQ? CAR lis1) (CAR lis2))
(mystery (CDR lis1) (CDR lis2)))
(ELSE ‘())
))

The third COND case is:

a. recursive.

b. iterative.

c. a function itself.

d. none of the above.

20. The mystery function in the above question:

a. sorts a list.

b. sorts the second list in the same order as the first.

c. reverses two lists.

d. compares two lists for equality.

21. Programming languages based on symbolic logic are called:

a. imperative.

b. functional.

c. declarative.

d. mathematical.

22. The developers of LISP identified and included specifications for

dynamic scoping.

a. True

b. False

23. Using Scheme, (EQ? ‘(A B) ‘(A B)) returns:

a. #T

b. #F

c. ( )

d. a or b

e. a or c

f. b or c

24. Propositions in a logic programming language can be stated in two distinct modes:

a. one to define a proposition as true and one in which the truth of the proposition is yet to be determined.

b. one to define a proposition as true and one to define a proposition as false.

c. one to define a proposition as true or false, and one in which the truth of the proposition is yet to be determined.

d. none of the above.

25. In Prolog, the right-hand side of a statement is analogous to the "then" part of an "if..then" statement in an imperative language.

a. True

b. False

Reference no: EM13941756

Questions Cloud

What historical significance of brown vs. board of education : What is the historical significance of Brown vs. Board of Education of Topeka decision? This must contain a thesis statement and be argumentative, and must also include a bibliography.
Calculate the cost of equity using the DDM method : Floyd Industries stock has a beta of 1.30. The company just paid a dividend of $.30, and the dividends are expected to grow at 4 percent per year. The expected return on the market is 13 percent, and Treasury bills are yielding 6.0 percent. The most ..
Prepare the journal entry to record pension expense : Compute the amount of pension expense to be reported for 2011. (Show computations), Prepare the journal entry to record pension expense and the employer's contribution for 2011.
More consumers converse through digital media : As more and more consumers converse through digital media, companies are struggling to figure out how to "listen in" on the conversations. Traditional marketing research methods can't sift through the seemingly infinite number of words flying arou..
When an exception occurs in an ada procedure : When an exception occurs in an Ada procedure, either in the elaboration of its declaration or execution of its body, the exception
Evaluate and analyse the leadership : Using relevant theories and models critically evaluate and analyse the leadership of a 21st century business leader (must be an Australian or American leader). If you were in the position of the leader, what could you do to be a better leader and ..
One psychological pricing tactic just-below pricing : One psychological pricing tactic is just-below pricing. It is also called "9-ending" pricing because prices usually end in the number 9 (or 99). In a small group, have each member select five different products and visit a store to find the price ..
Described the status of noncombatants in a war of terror : Explained where terror fits within modern power struggles over control and definitions. Explained what is the need to understand terrorism within political models.
Uses the proceeds to repurchase shares : Dupuis can borrow at 9.50 percent. Dupuis currently has no debt, and the cost of equity is 15 percent. The current value of the firm is $646,000. The corporate tax rate is 30 percent. What will the value be if Dupuis borrows $217,000 and uses the pro..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd