Answered step by step
Verified Expert Solution
Question
1 Approved Answer
package Lab 1 . comp 2 4 0 2 w 2 4 l 1 ; / / From within the Lab directory ( or wherever
package Labcompwl;
From within the Lab directory or wherever you put the compwl directory:
javac compwlRNAStrandjava
java compwlRNAStrand
You will submit this file to the autograder.
It will not pass many of the tests, if any.
Your task is to modify the class to pass the tests.
Do not add any imports.
You shouldn't need any, and you'll fail the autograder if you do
public class RNAStrand extends NAStrand
Constructor
public RNAStrand
TODOStudent: Replace with your code
supernull;
Returns whether or not the base pair xy is valid.
Valid pairs are A and U and C and G
@param x
@param y
@Override
public boolean isPairchar x char y
TODOStudent: Replace with your code.
return false;
These are a few examples of how to use main to run local tests
You should test more extensively than this.
public static void mainString args
RNAStrand r new RNAStrand;
System.out.printlnr;
System.out.printlnrisPairAU;
System.out.printlnrisPairUA;
System.out.printlnrisPairCG;
System.out.printlnrisPairGC;
System.out.printlnrisPairAC;
System.out.printlnrisPairCA;
System.out.printlnrisPairAG;
System.out.printlnrisPairGA;
System.out.printlnrisPairUC;
System.out.printlnrisPairCU;
System.out.printlnrisPairUG;
System.out.printlnrisPairGU;
System.out.printlnrisPairAA;
System.out.printlnrisPairCC;
System.out.printlnrisPairGG;
System.out.printlnrisPairUU;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started