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

  Write a class encapsulating the concept of student

Prepare a client class to test all the methods in your class. Make sure to add comments. Comments should be included in the program to explain your calculations and program.

  What are the various types of dns servers and their purpose

question 1 what is the role of dns how is it structured and why it is necessary?question 2 what are the different kinds

  Write a rap about classes that rivals the javadev group

Write a rap about classes that rivals the JavaDev group. Write just a few sentences and see if your classmates can add on.

  Develop a java application to meet the requirements

As a competent programmer, your understanding of control structures, your ability to design and develop algorithms, and your proficient use of data structures will help you design and develop applications to meet customer requirements. You will ne..

  What is the java source filename extension

What is the Java source filename extension? What is the Java bytecode filename extension and write a Java statement to display the string The value is 100 to a user in a plain dialog box.

  Integrate the benefit class into the employee class

The objective of the lab is to modify the Employee class to demonstrate composition and a class interface. Integrate the Benefit class into the Employee class

  Sense a slightly negative attitude

While executing a project, you sense a slightly negative attitude in your team.Which type of document do you now need, among others, to better understand and then be able to improve the situation?

  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

  Working for hypothetical insurance company

Assume that you are working for hypothetical insurance company. This company offers insurance for 4 types of vehicles: cars, trucks, motor cycles and boats. In order to keep the program manageable, we will assume that we do not make a finer distin..

  We will simulate a very simple network by having a process

we will simulate a very simple network by having a process correspond to a node in the network and files correspond to

  Build the gui layout of the game

Build the Build the GUI layout of the game in java.

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