Question: Please ensure the program runs accurately and the work is original! Problem 12 page 497 in the textbook. Your program will read the messageFile.txt (below),

Please ensure the program runs accurately and the work is original!

Problem 12 page 497 in the textbook. Your program will read the messageFile.txt (below), assemble the

message, and print the message to the screen. Do not use any of the Java API classes, use the list

classes from the wk10.zip file. Name the file with the main method Driver.java

You may use any one of the 2 class files from zip file listed below. /** An interface for the ADT sorted list. Entries in the list have positions that begin with 1. @author Frank M. Carrano @author Timothy M. Henry @version 4.0 */ public interface SortedListInterface> { /** Adds a new entry to this sorted list in its proper order. The list's size is increased by 1. @param newEntry The object to be added as a new entry. */ public void add(T newEntry); /** Removes the first or only occurrence of a specified entry from this sorted list. @param anEntry The object to be removed. @return True if anEntry was located and removed; otherwise returns false. */ public boolean remove(T anEntry); /** Gets the position of an entry in this sorted list. @param anEntry The object to be found. @return The position of the first or only occurrence of anEntry if it occurs in the list; otherwise returns the position where anEntry would occur in the list, but as a negative integer. */ public int getPosition(T anEntry); // The following methods are described in Segment 12.9 of Chapter 12 // as part of the ADT list: public T getEntry(int givenPosition); public boolean contains(T anEntry); public T remove(int givenPosition); public void clear(); public int getLength(); public boolean isEmpty(); public T[] toArray(); } // end SortedListInterface 

/** A class that implements the ADT sorted list by using a chain of linked nodes. Duplicate entries are allowed. @author Frank M. Carrano @author Timothy M. Henry @version 4.0 */ public class LinkedSortedList> implements SortedListInterface { private Node firstNode; // Reference to first node of chain private int numberOfEntries;

public LinkedSortedList() { firstNode = null; numberOfEntries = 0; } // end default constructor

/* . . . */ private class Node { private T data; // Entry in list private Node next; // Link to next node

private Node(T dataPortion) { data = dataPortion; next = null; } // end constructor

private Node(T dataPortion, Node nextNode) { data = dataPortion; next = nextNode; } // end constructor

private T getData() { return data; } // end getData

private void setData(T newData) { data = newData; } // end setData

private Node getNextNode() { return next; } // end getNextNode

private void setNextNode(Node nextNode) { next = nextNode; } // end setNextNode } // end Node } // end LinkedSortedList

 11 ion 6 clo 9 the 10 un 5 o' 3 e a 2 t m 7 ck 4 t 6 1 Mee 8 in 

Please ensure the program runs accurately and the work is original! Problem

set by using sortu bed respectively in Exercises 5, 6, and 7 of Chapter 1. descrn aortain computer networks, a message is not sent as a continuous stream of data. Instead, it is divided into called packets, and sent a packet at a time. The packets might not arrive at their destination in ler as the one in which they were sent. To enable the receiver to assemble the packets in their c In the order, each packet contains a sequence number. For example, to send the message "Meet me at 6 o' clock" three characters at a time, the packets would appear as follows: 1 Mee 2 t m 3e a 4 t 6 5 o' 6 clo 7 ck Regardless of when the packets arrive, the receiver can order the packets by their sequence numbers to deter mine the message. Given a text file containing the packets of data in the order they were received, write an application that reads the file and extracts the message by using a sorted list. Design and create auxiliar Packet and Message. ssuch as

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!