SuperTutor

(15)

$15/per page/Negotiable

About SuperTutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,Engineering,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 327 Weeks Ago, 5 Days Ago
Questions Answered: 12843
Tutorials Posted: 12834

Education

  • MBA, Ph.D in Management
    Harvard university
    Feb-1997 - Aug-2003

Experience

  • Professor
    Strayer University
    Jan-2007 - Present

Category > Programming Posted 18 May 2017 My Price 11.00

TODO parts of this code

I need the help with the TODO parts of this code, please submit the answer in a cpp. file

#include 
#include 

using namespace std;

/**
* Returns the count of the number of vowels (including y).
* Note: It must handle both upper- and lower-case.
*
* @param word the word whose vowels need counting.
*
* @return the count of the number of vowels (including y).
*/
int vowel_count(string word) {
// TODO: insert your implementation
}

/**
* Returns the number of syllables in a word.
* To make this simple, use the following rules:
* Each group of adjacent vowels (a, e, i, o, u, y)
* counts as one syllable
* (for example, the “ea” in “real” contributes one syllable,
* but the “e ... a” in “regal” counts as two syllables).
* However, an “e” at the end of a word doesn’t count as a
* syllable. Also each word has at least one syllable,
* even if the previous rules give a count of 0.
*
* For example:
* syllable_count("Harry") returns 2
* syllable_count("hairy") returns 2
* syllable_count("hare") returns 1
* syllable_count("the") returns 1
*
* @param word the word whose syllables to count
*
* @return the number of syllables in a word.
*/
int syllable_count(string word) {
// TODO: insert your implementation
}

/**
* Given a file that contains 1 word per line, returns
* a vector of all the words that have min *
* @param filename name of a file with 1 word per line.
* @param min the min length (inclusive).
* @param max the max lenght (inclusive).
*
* @return a vector of all the words that have min * if none match, an empty vector is returned.
*/
vector filter_dict(string filename, int min, int max) {
// TODO: insert your implementation
}


class GematricString {
private:
/**
* The original word (case-preserved)
*/
string word;
public:
/**
* Creates a GematricString object.
* @param the_word the word to be stored (preserving its case).
*/
// TODO: implement this
GematricString(string the_word);

/**
* Returns the word.
* @return the word
*/
// TODO: implement this
string get_word() const;

/**
* Returns the gematric value of the string.
* "Gematria is the act of assigning numeric values
* to letters in an alphabet." -- taken from
* https://en.wikipedia.org/wiki/Gematria, last access Oct 13, 2016
* It is believed that words or phrases that have
* equal gematric values are related.
*
* The gematric value of a word is the sum of the
* values of all the letters in the word such that
* a = 1, b = 2, c = 3, ..., y = 25, z = 26, irrespective of case.
* For non-letters, the gematric value is 0.
* For example, "Phil" has a value of P=16 + h=8 + i=9 + l=12 == 45.
*
* @return the gematric value of the GematricString.
*/
// TODO: implement this
int gematric_value() const;
};

/**
* Loads each word in the file into a GematricString object
* putting each object into a vector and returning that.
*
* @param filename the name of the file containing 1 word per line.
* @return a vector of GematricStrings 1 for each word in the given file.
*/
vector load_words(string filename) {
// TODO: insert your implementation
}

/**
* Returns a vector of strings that have the same gematric value
* as the given word.
*
* @param word_to_match the word to match.
* @param gem_words a vector of GematricStrings that will be searched for
* words that have the same gematric value as word_to_match.
* @return a vector of strings that have the same gematric value
* as the given word, if none match an empty vector is returned.
*/
vector gematria(string word_to_match, vector gem_words) {
// TODO: insert your implementation
}

int main() {

}

 

#include <iostream>#include <vector>using namespace std;/*** Returns the count of the number of vowels (including y).* Note: It must handle both upper- and lower-case.** @param word the word whose vowels need counting.** @return the count of the number of vowels (including y).*/int vowel_count(string word) {// TODO: insert your implementation}/*** Returns the number of syllables in a word.* To make this simple, use the following rules:*Each group of adjacent vowels (a, e, i, o, u, y)*counts as one syllable*(for example, the “ea” in “real” contributes one syllable,*but the “e ... a” in “regal” counts as two syllables).*However, an “e” at the end of a word doesn’t count as a*syllable. Also each word has at least one syllable,*even if the previous rules give a count of 0.** For example:*syllable_count("Harry") returns 2*syllable_count("hairy") returns 2*syllable_count("hare")returns 1*syllable_count("the")returns 1** @param word the word whose syllables to count** @return the number of syllables in a word.*/int syllable_count(string word) {// TODO: insert your implementation}/*** Given a file that contains 1 word per line, returns* a vector of all the words that have min <= length <= max.** @param filename name of a file with 1 word per line.* @param min the min length (inclusive).* @param max the max lenght (inclusive).** @return a vector of all the words that have min <= length <= max,*if none match, an empty vector is returned.*/vector<string> filter_dict(string filename, int min, int max) {// TODO: insert your implementation}class GematricString {private:/*** The original word (case-preserved)*/string word;

Attachments:

Answers

(15)
Status NEW Posted 18 May 2017 04:05 AM My Price 11.00

-----------

Not Rated(0)