Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. What happens if a Java interface specifies a particular method signature, and a class that implements the interface provides a different signature for that

1. What happens if a Java interface specifies a particular method signature, and a class that implements the interface provides a different signature for that method?

A.run time error

B.exception is thrown

C.syntax error

D.unmatched arguments are null

E.nothing

Question 2

The following sequence of operations essentially leaves a stack unchanged.

A.pop followed by push

B.pop followed by top

C.push followed by pop

D.push followed by top

E.top followed by push

Question 3

In the following command sequence, numbered blocks are pushed and popped from a stack. Suppose that every time a block is popped, its numerical value is printed. What is the sequence of values that are printed? Assume you begin with an empty stack: push block5; push block7; pop; pop; push block2; pop; push block1; pop; push block8; pop;

A.8 1 2 7 5

B.7 5 2 1 8

C.5 7 2 1 8

D.7 5 8 1 2

E.None of these is correct.

Question 4

We deal with ADTs on three levels. On which level do we deal with the how questions, as in how do we represent the attributes and fulfill the responsibilities of the ADT?

A.application (or user, client, external)

B.machine (or assembly)

C.abstract (or logical)

D.primitive (or language dependent)

E.implementation (or concrete, internal)

Question 5

An abstraction of a system is a model of the system that includes all the details about the system.

A.True

B.False

Question 6

UML diagrams are not a form of abstraction, since they hide details and only allow us to concentrate on the major design components.

A.True

B.False

Question 7

An abstract method must not have any comments.

A.True

B.False

Question 8

In a non-empty stack, the item that has been in the stack the longest is at the bottom of the stack.

A.True

B.False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Define pay ranges. What is the purpose of establishing pay ranges?

Answered: 1 week ago