Question: 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.
A)[A,G] add(1,C) returns
B)[G,C,A].reverse(0,2) updates "this" NAStrand to
C)[A,G].add(3,c) returns
D)[C,G,A,].reverse(0,0) updates "this NAStrand to
E)[C,G,A].rever(0,1) updates "this" NAStrands to
F)[A,C].splice92,[G,U]) updates "this" NAStrand to
G)[A,C,G,U].splice(4,[A,C,G,T]) updates "this" NAStrand to
H)[A,C,G,U].isPair(A,U) returns
I)[A,G].add(2,X) returns
J)[G,A,C].reverse(0,3) updates "this" NAStrand to
K)[A,G].add(2,c) returns
L)[].splice(0,[]) updates "this" NAStrand to
M)[A,C,G,U].isPair(G,C) returns
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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!