{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSE250 Project 4 - Project 4 CSE 250 Due Date May 6 2011...

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
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 for each letter. The entry contains the Morse code for the letter.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern