This file reports details about my C++ Module Coursework for Edinburgh Napier University
Submitted: 7 April 2019
Grade: 100% ( 36/36 )
Graded on: 27 April 2019
The coursework contains two parts:
-
Part A: Implementing a Binary Search Tree data structure storing string data for efficient searching.
-
Part B: Creating an application, which uses the Binary Search Tree implemented to count the frequencies of each word in a text file.
Overall Approach: The output approach I took is to print the words in their correct order, because it is user-friendly and easier to interact:
'word' : occurencies \n, 'word' : occurencies \n, ...
In terms of programming:
- Time and Space efficient structures
- Meaningful variable names.
- Correct indentation.
- Suitable comments.
- Part A
- The implementation of the BinarySearchTree class provided is correct and it is passing all tests from the test-folder > test-tree-functionalities.cpp
- Part B
- There is application that reads in a text file and outputs to the console the number of times each word in that file occurs:
Example::
Input file text: “The C programming language is very useful. The C programming language is a low level language” Output: The: 2 C: 2 programming: 2 language: 3 is: 2 very: 1 useful: 1 a: 1 low: 1 level: 1
Part A
- Extract the test-tree-functuonalities.cpp from the test-application folder to the root folder.
- Remove counter.cpp file from the root folder.
- Open the project under your build-chain (e.g Visual Studio)
- Run main
Part B
- Extract the test text files from the test-application folder to the root folder.
- Open the project under your build chain
- Run main