# Homework #4 Solution

\$30.00

Category:

## Description

In this Homework, you are going to write a program that implements a doubly linked list.

The data in both txt files must be read from the files.

Letters.txt contains 26 English Letters (You can write the file specification into your program instead of receiving the file name from command line.):.

A

B

C

D

Z

Sequence.txt contains a list of numbers (You can write the file specification into your program instead of receiving the file name from command line.)

3,-3,19,-19,18,1,-2,3,-18,17,1,-3,-13,14

You need to

1. Create a doubly linked list by reading the 26 letters from Letters.txt.

1. txt file contains a sequence of relative letter positions. Suppose the listData points to the first element in the doubly linked list. The first letter I want to output is the third forward element from the beginning. Then the second letter is the third element backward from the current position. You need to output all letters indicated in sequence.txt

1. Create a doubly linked list

1. Implement putItem() method

1. Correctly read the files and interpret the information

1. Print out the letters

Requirements:

1. [will be 0 if it does not compile or crash] The homework must be done in C++. Although you can use any IDE to do the homework, your code must work under Code::Blocks since the

CS 3240 Data Structures and Algorithms

1. [5%] The Following identification information must be included at the beginning of your cpp file.

//Name: XXXXXXX

//Email: XXXX@csueastbay.edu

1. [40%] Must use Doubly Linked List

1. [45%] Must use relative positions to calculate the output using next and back points in the doubly linked list and correctly output the results

1. [10%] Correct I/O of the data file. You can put file names into the code instead of reading from command line. The content of the files must be read via file I/O.

error: Content is protected !!