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.
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

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

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

Students also viewed these Databases questions