Find Online Tutors for Homework Help

Could somebody write these 3 functions using C++? I am stuck in the last one but I will like to see if I might

#include
#include
#include
#include
#include
#include lt;iostreamgt;
lt;fstreamgt;
lt;cstringgt;
lt;cassertgt;
lt;cstdlibgt;
lt;stringgt; using namespace std;
/***** TASK 1 *****/
// REQUIRES: str1 and str2 point to C-strings
// EFFECTS: If st1 and str2 are identical (contain exactly
//
the same characters), returns 0.
//
If the first differing character has a greater
//
value in st1 than in str2, return a positive number.
//
Otherwise, return a negative number.
int strcmp_eecs280(const char *str1, const char *str2){
return 0; // REPLACE THIS LINE WITH YOUR CODE } /***** TASK 2 *****/
// EFFECTS: Prompts the user to end a word using the prompt
//
quot;Please enter a word: quot; and then reads a string
//
from cin which will be returned. After reading the
//
input, clean up by printing a newline to cout.
string getUserWord(){
return quot;quitquot;; // TASK 2 – REPLACE WITH YOUR CODE
} // EFFECTS: Searches words.txt for the word passed as a
//
parameter. If found, return true. Otherwise false.
//
If words.txt cannot be opened, prints an error
//
message to cout and calls exit(1).
// NOTE:
You MUST use the strcmp_eecs280 function.
bool findWord(string word){
return false; // TASK 2 – REPLACE WITH YOUR CODE
} /***** YOU DO NOT NEED TO MODIFY CODE BELOW THIS POINT *****/
// Testing code
void test_strcmp_eecs280() {
assert(strcmp_eecs280(quot;turtlequot;, quot;frogquot;) gt; 0);
assert(strcmp_eecs280(quot;turtlequot;, quot;turtlesquot;) lt; 0); assert(strcmp_eecs280(quot;quot;, quot;frogquot;) lt; 0);
assert(strcmp_eecs280(quot;lizardquot;, quot;lizardquot;) == 0);
}
int main(){
test_strcmp_eecs280();
cout lt;lt; quot;Welcome to eecs280 spell checker!quot; lt;lt; endl;
cout lt;lt; quot;You may quit at any time by typing \quot;quit\quot;.quot; lt;lt; endl;
for(string userWord = getUserWord(); userWord != quot;quitquot;; userWord =
getUserWord()){
if (findWord(userWord)){
cout lt;lt; quot;It appears quot; lt;lt; userWord lt;lt; quot; is spelled correctly!quot;;
}
else{
cout lt;lt; quot;Oops. quot; lt;lt; userWord lt;lt; quot; is not a correctly spelled word!quot;;
}
} cout lt;lt; endl lt;lt; endl; cout lt;lt; quot;See you again soon.
return 0;
} Happy spelling!quot; lt;lt; endl;
Engineering Technology