Why is this not compiling? This is a C++ morse code decoder program. It has two

[ad_1]

Why is this not compiling? This is a C++ morse code decoder program. It has two errors. I have bolded and italicized the errors and messages. #include #include #include struct TREENODE{char letter;TREENODE *left;TREENODE *right;TREENODE() //constructor{letter = ‘*’; //will replace with letterleft = 0;right = 0;};struct MORSECODE//each morsecode object has english letters{char letter;char code[20]; //dots and dashes and such};class TELEGRAPH //binary tree{private:static MORSECODE table[40];static TREENODE * root;static void destroyTree(TREENODE *node);public:TELEGRAPH(){root = NULL;} // expected unqualified-id at end of input. no return statement in function returning non-void (-Wreturn type)static void buildTree();static void destroyTree();void Encode(char text[], char morse[]);void Decode(char morse[], char text[]);};MORSECODE TELEGRAPH::table[40] = {{‘E’,”.”}, {‘T’, “-“}, {‘I’, “..”}, {‘A’, “.-“}, {‘N’, “-.”}, {‘M’, “–“},{‘S’, “…”}, {‘U’, “..-“}, {‘R’, “.-.”}, {‘W’, “.–“}, {‘D’, “-..”}, {‘K’, “-.-“},{‘G’, “–.”}, {‘O’, “—“}, {‘H’, “….”}, {‘V’, “…-“}, {‘F’, “..-.”}, {‘L’, “.-..”},{‘P’, “.–.”}, {‘J’, “.—“}, {‘B’, “-…”}, {‘X’, “-..-“},{‘C’, “-.-.”}, {‘Y’, “-.–“}, {‘Z’, “–..”}, {‘Q’, “–.-“}, {‘0’, “—–“}, {‘1’, “.—-“), {‘2’, “..—“},{‘3’, “…–“}, {‘4’, “….-“}, {‘5’, “…..”}, {‘6’, “-….”}, {‘7’, “–…”}, {‘8’, “—..”}, {‘9’, “—-.”},{‘,’, “—-“}, {‘.’, “.-.-.-“}, {‘?’, “..–..”}, {”, “END”};TREENODE* TELEGRAPH::root = 0;void TELEGRAPH::Decode(char morse[], char text[]){char *morsePtr;TREENODE *node;node = root;cout << "Decode called." <left;}else if (*morsePtr == ‘-‘){nose = node >right;}}else {node = root;}continue;}*text++ = node-> letter;return;}void TELEGRAPH::Encode(char text[], char morse[]){int i;char c, *t, *morsePtr;cout << "Encode called" << endl;cout <>> “;for (t = text; *t; t++){c = toupper(*t);if (c == ‘ ‘){*morse++ = ‘ ‘;continue;}for (i = 0; table[i].letter; i++){if (table[i].letter == c) break;}if (!table[i].letter){continue;}morsePtr = table[i].code;while (*morsePtr){*morse++ = *morsePtr++;}*morse++ = ‘ ‘;}}void TELEGRAPH::buildTree(){TREENODE *node, *nextNode;char *morsePtr; // point to dots and dashes in tableroot = new TREENODE;if (!root){return;}root -> letter = ‘ ‘;cout << "Alphabet in Morse:";for (int i = 0; table[i].letter; i++){node = root;for (morsePtr = table[i].code; *morsePtr; morsePtr++)//goes through morse code for symbols and letters{if (*morsePtr == '-'){cout <right = nextNode;node = node->right;}else if (*morsePtr == ‘.’){cout <left = nextNode;node = node->left;}}}}main():int main(){TELEGRAPH station;char text[80], morse[600];station.buildTree();cout << "Enter telegram in English: ";cin.getline(text, 80);station.Encode(text, morse);cout << morse;cout <>> Receivednn”;station.Decode(morse, text);cout << "Message sent: " << text << endl;station.destroyTree();} //expected ';' at end of member declaration. expected '}' at end of input. invalid use of qualified name TREEDNODE::TELEGRAPH::table

The post Why is this not compiling? This is a C++ morse code decoder program. It has two appeared first on homework handlers.

[ad_2]

Source link

 Observational studies have suggested that low dietary intake or low plasma con

[ad_1]

 Observational studies have suggested that low dietary intake or low plasma concentrations of retinol, beta-carotene, or other carotenoids might be associated with increased risk of developing certain types of cancer. However, relatively few studies have investigated the determinants of plasma concentrations of these micronutrients. A cross-sectional study was conducted to investigate the relationship between personal characteristics and dietary factors, and plasma concentrations of retinol, beta-carotene and other carotenoids. Study subjects (N = 315) were patients who had an elective surgical procedure during a three-year period to biopsy or remove a lesion of the lung, colon, breast, skin, ovary or uterus that was found to be non-cancerous. The data from this experiment are in a xlsx file that is part of the In-Class Assignment. Once you have downloaded this file, you can open it using Excel.The following variables are included in the file: AGE (years); SEX (1=Male, 2=Female); SMOKSTAT (1=Never, 2=Former, 3=Current Smoker); QUETELET (BMI, weight/height2); VITUSE (vitamin use; 1=”Yes, fairly often”, 2=”Yes, not often”, 3=”No”); CALORIES (Number of calories consumed per day); FAT (Grams of fat consumed per day); FIBER (Grams of fiber consumed per day); ALCOHOL (Number of alcoholic drinks consumed per week); CHOLESTEROL [Cholesterol consumed (mg per day]; BETADIET [Dietary beta-carotene consumed (mcg per day)]; RETDIET [Dietary retinol consumed (mcg per day)]; BETAPLASMA [Plasma beta-carotene (ng/ml)]; and RETPLASMA [Plasma Retinol (ng/ml)].Analyze the RETPLASMA variable. Use the “Explore Quantitative Data” app to describe the data for each gender.(Attach graphs and descriptive statistics here)Using the mean, standard deviation and sample size, calculate a 95% confidence interval for the mean for males and females. Verify that the 95% confidence interval for the mean for both males and females is correct using the “Inference for a Mean” app. Interpret both confidence intervals. Are these confidence intervals consistent with the graphs that you produced? Do you have any concerns about the confidence intervals that you generated? Explain.Conduct a test for each sex to determine if the variable you chose differs from normal values. Normal values for retinol are 800 ng/ml. Use the same “Inference for a Mean” app.Discuss any concerns you might have with the results of your hypothesis tests.

The post  Observational studies have suggested that low dietary intake or low plasma con appeared first on homework handlers.

[ad_2]

Source link

Many (if not most) pictures, sounds, and text are protected from general or com

[ad_1]

Many (if not most) pictures, sounds, and text are protected from general or common use. Intellectual property rights give the creator of the content exclusive rights under the law. Violating these laws can result in severe punishment. For instance, it’s illegal to download copyrighted music from the Internet and to use pictures or trademarks without the owner’s permission. And you certainly don’t want to go to jail or get fined (Just look what happened to Napster (Links to an external site.)Links to an external site..). To find out the basics of copyright, review the following short video from the Copyright Clearance Center: Copyright Basics (Links to an external site.)Links to an external site..Once you have watched the short video, read the scenario below, and then answer the activity questions.ScenarioImagine your business team has been tasked with preparing a PowerPoint presentation to help new employees learn how to use the company’s proprietary software. You are the lead for this project, and your team has decided to add graphics and sound to make the presentation more appealing. You have to make sure that your team’s presentation is not in violation of any copyright laws.QuestionsResponse Format

The post Many (if not most) pictures, sounds, and text are protected from general or com appeared first on homework handlers.

[ad_2]

Source link

Read this documentation several times before beginning any programming. Use a s

[ad_1]

Read this documentation several times before beginning any programming. Use a systematic, modular approach to develop Project 1. Follow the procedures explained inthe lecture and developed in the class activities. Avoid a “shotgun” approach (trying any andeverything without any definite direction) to the development. Refrain from creating”spaghetti” code (A complicated set of unstructured control structures). Include adequatecomments.Follow these steps. Begin by reading the problem statement multiple times until you have a completeunderstanding of all project requirements. Define the variables. Construct the Main flowchart. Write the functions and populate the Main flowchart. Use previously written functions,if possible. Execute and troubleshoot the program.Problem StatementThis project will focus on development of the controller for a newspaper dispenser. Thenewspaper dispenser will accept nickels, dimes, and quarters. The LCD will display awelcome message to each customer: “Today’s Paper Only 30 Cents.” Each time a coin isinserted, the LCD displays the total amount deposited: “Total: $XX.” When a minimum of 30cents is inserted, the program will cycle between two screens. The first screen will indicatethe total amount deposited: “Total: $XX.” This is displayed on the top line and the amount ofchange available (“Change: $XX”) is displayed on the second line. The second screen willdisplay “Enjoy” on the first line and “Your Paper” on the second line in green backlight.Depositing coins:Nickels, dimes, and quarters are represented by the switches on the Adafruit LCD + Keypadas shown below.CoinsNickelDimeQuarter Switch on AdafruitLeftRightDown If the left button is pressed, a nickel is recorded; if the right button is pressed, the controllerrecords a dime; and if the down button is pressed, a quarter is recorded.Initial ScreenThe initial display will appear as in the figure below. Displaying the Running TotalAs soon as the first switch is pressed (coin entered) the LCD displays the total amountentered. If Nickel is pressed, the screen below is displayed. Note the leading zero. The program keeps a running total of the amount entered and displays the total amountdeposited after each switch is pressed (coin is entered). If Dime is now pressed, the LCD willshow the screen below. This process continues until the minimum amount of 30 cents is entered.Displaying the Total and ChangeThe focus of this portion of the project is to count and display the change amount that wouldbe refunded along with the total amount inserted. The change amount is displayed on thebottom row of the LCD. Keep in mind the price of the newspaper is 30 cents. The displaymust look like the following. Develop “Door Open” Indication FunctionWhen the adequate change has been entered, the Total and Change screen is displayed for1 second and the message reading “Enjoy Your Paper” is displayed for 1 second (with agreen backlight0. The display must look like the following. The program returns to the beginning and displays the initial screen.Upload the completed newspaper dispenser (FiLastNameProject.py) to the weekly iLab Dropbox.

The post Read this documentation several times before beginning any programming. Use a s appeared first on homework handlers.

[ad_2]

Source link