Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For each of the Implementation Practice lab components, read their specifications carefully. Then, for each of the operations below, match it to the expected behaviour.

For each of the Implementation Practice lab components, read their specifications carefully. Then, for each of the operations below, match it to the expected behaviour. If the expected behaviour is an exception, choose the appropriate exception. If the operation is "void" select what the strand would be after the operation.
Note that if you see an [A,C,G,U] this represents an arbitrary RNAStrand. If you see [A,C,G,T] this represents an arbitrary DNAStrand.
Question 4 options:
[A,G].add(2,X) returns
[A,G].add(4,X) returns
[G, C, A].reverse(0,2) updates "this" NAStrand to
[A,G].add(2,C) returns
[].splice(0,[]) updates "this" NAStrand to
[C, G, A].reverse(0,0) updates "this" NAStrand to
[A,C,G,U].isPair(A,U) returns
[C, G, A].reverse(0,1) updates "this" NAStrand to
[A, C].splice(2,[G, U]) updates "this" NAStrand to
[A,G].add(3,C) returns
[G, A, C].reverse(0,3) updates "this" NAStrand to
[A,C,G,U].isPair(T,A) returns
[A,G].add(1,C) returns
[A,C,G,U].isPair(G,C) returns
[A, C, G, U].splice(4,[A, C, G, T]) updates "this" NAStrand to
1.
A
2.
C
3.
G
4.
[](empty strand)
5.
IndexOutOfBoundsException
6.
IllegalArgumentException
7.
[A, C, G, U]
8.
[A, C, G, T]
9.
true
10.
false
11.
[C, A, G]
12.
[A, C, G]
13.
[A, G, C]
14.
[G, A, C]
15.
[C, G, A]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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