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

  Extend the java defined hashmap class

Your goal is to extend the java defined HashMap class to add the ability to store multiple objects. To do this, you will edit MultiHashMap.java to both add new methods and override two methods from HashMap.

  Preexisting arrays and functions

You are given a java file HW2.java with preexisting arrays and functions. Do not modify the main function or other functions names .Each function are given a certain implementation which you need to complete.

  Write a java program that plays the game of craps

Write a Java program that plays the game of Craps using the rules stated above so that it simulates a game without human input

  Explain why the teller application can call the withdraw

Explain why the Teller application can call the withdraw and deposit methods using a SavingsAccount object reference, even though we did not define these methods

  Write a program comprising classes

Write a program comprising three classes: MonteCarlo (with the main() method), Simulation, and Metrics.

  Design a java program that simulates a slot machine

Instead of displaying images, the program will randomly select a word from the following list: Cherries, Oranges, Plums, Bars, and Bells. The program will select and display a word from this list three times.

  Creates a professorraing class consisting of professor ID

Write a program that creates a professorRaing class consisting of professor ID and three ratings. The three ratings are used to evaluate easiness, helpfullness, and clarity. In a separate implementation class, allow the user to enter the values.

  Statements to create a collection of integers

Write Java statements to create a collection of integers, and to initialize each element of the collection to -1. Then, using a for each statement to print the value of each element.

  Programming languages for example pascal

Some programming languages for example Pascal have used the semi colon to seperate statements while java uses it to terminate the statements. which of them in your opinion is most natural and least likely to result in syntax errors? support your a..

  Design your own three-stage explicit runge-kutta method

Design your own three-stage explicit Runge-Kutta method with one-step error O(h^4) - Confirm that the global error in your numerical solution is O(h^3).

  Consider an array of integers

Consider an array of integers as below: int[] a = {5, 2, -4, 3, 0, -5, 7, 11, 6, 13} Complete the method named count(int[] a) in the class Count. The method should return the number of positive numbers in the array

  Question 1a give explanation why it is significant to

question 1a give explanation why it is significant to follow web engineering principles taking into account how the web

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