CSE250 Project 4

CSE250 Project 4 - Project 4 CSE 250 Due Date May 6 2011 Friday submit on-line by 11:59 midnight Total Points 20 points(plus 10 possible extra

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Project 4 CSE 250 Due Date: May 6, 2011, Friday submit on-line by 11:59 midnight Total Points: 20 points (plus 10 possible extra points) Morse Code This project is an application of Binary Trees. You need to fully understand and use the Binary_Tree class. You can down load the files BTNode.h, Binary_Tree.h and a sample program BinaryTreeTest.cpp from the course web-site, or copy them (on timberlake) from directory: /home/faculty/xinhe/cse250/examples/ExamplesForProj4 The basic idea of the project is given on page 509, Programming Project 7. The detailed description is given below. Morse Code Tree class This class uses a Binary Tree to store the Morse code tree shown in Figure 8.38, page 510. It uses this tree to encode a message into Morse code, and decode a Morse Code string back to the original message. Data Members : 1. Binary_Tree<char> tree; tree holds the Morse code tree shown in Figure 8.38, page 510. 2. string codes[26]; codes holds the Morse code table shown in Table 8.11, on page 509. Function Members : The following functions are requires. You may add additional functions if needed. 1. constructor When a Morse Code Tree object is created in the main program, the constructor should perform the following operations. • Read the input file Morse_Code.txt , and use it to build tree . The Morse_Code.txt is the pre-order listing of the tree shown in Figure 8.38, page 510. The first few lines of the file are as follows: * e i s h NULL NULL v NULL NULL ..... 1 The class Binary Tree has a member function read_binary_tree() that performs this task (see sample program BinaryTreeTest.cpp .) • From the Morse Code Tree created above, build a Morse code table, as shown in Table 8.11, on page 509, and store it in the data member codes . The table has 26 entries, one entry....
View Full Document

This document was uploaded on 12/11/2011.

Page1 / 4

CSE250 Project 4 - Project 4 CSE 250 Due Date May 6 2011 Friday submit on-line by 11:59 midnight Total Points 20 points(plus 10 possible extra

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online