Question: java programming language . this is the full question and pg 167 of algorithms book have the same question. this one is extended version of

 java programming language . this is the full question and pg

167 of algorithms book have the same question. this one is extended

java programming language . this is the full question and pg 167 of algorithms book have the same question. this one is extended version of that question. so there is nothing to do with pg.167. this is the actual question. please can some one help me with this.

Exercise Variation on Ex. 1.3.33 . The purpose of this exercise is to write a doubly-linked list implementation of a Deque data structure and use it in a client program that reads a sequence of characters from the DNA alphabet A, C, T, G) to determines if it is a Watson-Crick Complemented Palindrome (details below!) To this end you should create a project WCPalindrome, within which you will create a file Deque.java implementing the deque data structure and complete the class WCPalindrome which uses this class. 1. Design and implement a class which provides a double-ended quue, o deque. A deque (pronounced "deck" s like a stack or queue which supports the addition and removal of items at both ends. Create a generic data type, Deque, which implements the following AFI which is an expanded version of what appears on page 167 public class DequeItem> isplements IterablecItem> public Deque) public boolean isEmpty) public int size) public void puchLeft (Item item) // insert the item at the "front" public void pushRight (Item ite // insert the item at the "rear" public Item popLeft public Item popRightO public Iterator iterator I return an iterator over items in order // create an empty deque // is the deque empty? // number of items in the deque // delete and return the item at the "front" // delete and return the item at the rear /from front to rear // string representation of the deque public String toString) You must use a doubly-linked list to implement this API. Throw a java.lang.NullPointerException if the client attempts to add a null item; throw a java. util.NoSuchElementException if the client attempts to remove an item from an empty deque 2. Provide a main method for this class which performs a series of pushes and pops at either end, reporting the results of the pops and printing the final state of the deque. You should determine ahead of time what this will produce if the deque is working correctly and then run this file to make sure that is what ha appens 3. Implement the client program by completing the class WCpalindrome in WCpalindrome.java. This class will have no constructor but t have a main method that reads a sequence of characters from a file, whose name is given on the command line, and determines whether or not that sequence represents a Watson-Crick complemented palindrome: the A, C, T G)-sequence equals its reverse when you replace each base with its complement. (A and T are complements of each other, as are C and G.) Watson-Crick palindromes have many important biological roles. For example, tumor cells frequently amplify their genes by forming Watson-Crick plindromes. Here are some items to note as you develop your ideas: . Use a deque to store the sequence of input characters

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!