Question: implement the sequence class you are to implement the sequence class by first of all creating a nodepositionlist class then extending it and implementing the

 implement the sequence class you are to implement the sequence class
implement the sequence class
you are to implement the sequence class by first of all creating a nodepositionlist class then extending it and implementing the sequence class in a class called nodesequence
you are to generate a random set of integers above 20000. then provide the merge sort code using the sequence 0(nlogn) and the bubble sort code using the sequence 0(n^2)
note the sequence class should be implemented and the nodepositionlist class should be extedned in the nodesequence class by first of all creating a nodepositionlist class then extending it and
implementing the sequence class in a class called nodesequence you are to

public class Sequence public Position atRank (int rank) : public int rankof (Position p) throws BoundaryViolationException: public boolean isEmpty(); public void insertAtRank (int rank, Object element) public Object removeAtRank (int rank public Object replaceAtRank (int rank, Object element) public E size (); (Hint: You should have one class like public class Node Sequence extends Node PositionList implements Sequence) class Node 7 Instance variables: public E element; public Node next; ** Creates a node with null references to its element and next node. */ public Node () { this (null, null); I Creates a node with the given element and next node/ public Node (E e, Node n) elemente: next n. Accessor methods: publie EgetElements return elements public Node getNext En next Modifier mechods: pubiin void setElement E newElem element newElem: public void setNexu Node E newtext next newext: public class Sequence public Position atRank (int rank) : public int rankof (Position p) throws BoundaryViolationException: public boolean isEmpty(); public void insertAtRank (int rank, Object element) public Object removeAtRank (int rank public Object replaceAtRank (int rank, Object element) public E size (); (Hint: You should have one class like public class Node Sequence extends Node PositionList implements Sequence) class Node 7 Instance variables: public E element; public Node next; ** Creates a node with null references to its element and next node. */ public Node () { this (null, null); I Creates a node with the given element and next node/ public Node (E e, Node n) elemente: next n. Accessor methods: publie EgetElements return elements public Node getNext En next Modifier mechods: pubiin void setElement E newElem element newElem: public void setNexu Node E newtext next newext

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!