Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Imagine you are writing a Java package for storing DNA and RNA sequences. Recall that a DNA sequence can be thought of as a String

image text in transcribed

Imagine you are writing a Java package for storing DNA and RNA sequences. Recall that a DNA sequence can be thought of as a String over the alphabet {A,C,G,T}, and an RNA sequence can be thought of as a String over the alphabet {A,C,G,U). TASK: Create the following: A new exception called InvalidBioSequence TypeException that extends the Exception class. It must have a no-parameter constructor, which just calls the corresponding superclass constructor A new exception called InvalidSequenceException that extends the Exception class. It must have a no- parameter constructor, which just calls the corresponding superclass constructor A new exception called InvalidDNASequenceException, which extends Invalid SequenceException. It must have a no-parameter constructor, which just calls the no-parameter superclass constructor A new exception called InvalidRNASequenceException, which extends Invalid SequenceException. It must have a no-parameter constructor, which just calls the no-parameter superclass constructor A class called BioSequence, which has the following properties: It should have two private instance variables of type String called seqType and sequence It must have a constructor with a parameter of type String called seqType followed by a parameter of type String called sequence. If seqType is not "DNA" nor "RNA", throw an InvalidBioSequenceTypeException. If seqType is "DNA" and sequence has any characters outside of {A,C,G,T), throw an InvalidDNASequenceException. If seqType is "RNA" and sequence has any characters outside of (A,C,GU), throw an InvalidRNASequenceException

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions