Questions
I haves code on bottom. what do i need to edit? Create a subdirectory called proj1.  For...

I haves code on bottom.
what do i need to edit?

Create a subdirectory called proj1

For this project you need to create at least two files: proj1.cpp, and makefile. Both files should be placed in the proj1 directory.

The file proj1.cpp should contain the main function, int main(). In the main() function, the program should read the input until it reaches the end, counting the number of times each word, number, and character is used. A word is defined as a sequence of letters ('a'..'z' or 'A'..'Z'). Words are case insensitive ("AA", "Aa", "aA", and "aa" are the same). A number is defined as a sequence of digits ('0'..'9'). Note that both words and numbers can be of length of 1, that is, contain one letter or one digit, respectively. Different sequences represent different numbers. For example, number "001" is different from number "1". Words are separated by numbers or other non-letter and non-digit characters. Numbers are separated by words or other non-letter and non-digit characters. Your program should record the number of times each word, number, and character happens (note that characters are case sensitive). The program should then output the ten most used characters (case sensitive), the ten most used numbers, and the ten most used words (case insensitive) as well as the number of times these characters/numbers/words are used. Since words are case insensitive, the program only outputs lower case words. The characters, numbers and words should be outputted in the descending order based on the number of times they are used. When two characters happen in the same number of times, the character with a smaller ASCII value should be considered as being used more frequently. When two words (numbers) happen in the same number of times, the word (number) that occurs earlier in the input should be considered as being used more frequently. 

An example executable code of the program proj1.x is provided to you. In proj1.x, the output related to the display of characters, words, and numbers is aligned in the following manner: the width of the column of the characters, words, and numbers is the length of the longest words and numbers to be displayed, plus five (5). You should make the outputs of your program the same as those of 'proj1.x'. When printing characters, use '\t' for tab and '\n' for newline. All other characters should be outputted normally.

Write a makefile for your project that compiles an executable called proj1.x

You are encouraged to use any C++ STL containers and algorithms. You should also use C++ string class instead of the built-in string type.

Your program must be able to compile and run on linprog.

I have some code. What do I need to do to satisfy the requirements from my code
include <iostream>
#include <iomanip>
#include <cstdlib>
#include <string>
#include <cctype>
using namespace std;

int main() {

string s = "aaa";
bool g;
char str[100];
char str1[100];
char str2 [100];
int charCount = 0;
int c[100];
int num[100];
int numCount = 0;
int p = 0;
for (int i = 0; i < s.length(); i++)
{

if (isalpha(s[i]))
{
    str[i] = s[i];
    for(int j = 0; j < s.length();j++)
    {
   // checks to see how many times the char appears
    if(str[i] == s[j])
    {
        p++;
    }
  
        c[i] = p;
        p = 0;
    }
    cout << "Alpha: " << str[i] << " and shows " << c[i] << " times" << endl;
}

else if (isdigit(s[i]))
{
    str1[i] = s[i];
    cout << "Number: " << str1[i] << endl;
}

else
{
    str2[i] = s[i];
    cout <<"Char: " << str2[i] <<endl;
}
}

    return 0;
}

In: Computer Science

C++ (1) Prompt the user to enter a string of their choosing (Hint: you will need...

C++

(1) Prompt the user to enter a string of their choosing (Hint: you will need to call the getline() function to read a string consisting of white spaces.) Store the text in a string. Output the string. (1 pt)

Ex:

Enter a sample text:
We'll continue our quest in space.  There will be more shuttle flights and more shuttle crews and,  yes,  more volunteers, more civilians,  more teachers in space.  Nothing ends here;  our hopes and our journeys continue!

You entered: We'll continue our quest in space.  There will be more shuttle flights and more shuttle crews and,  yes,  more volunteers, more civilians,  more teachers in space.  Nothing ends here;  our hopes and our journeys continue!


(2) Implement a PrintMenu() function, which has a string as a parameter, outputs a menu of user options for analyzing/editing the string, and returns the user's entered menu option. Each option is represented by a single character. If an invalid character is entered, continue to prompt for a valid choice. Hint: Implement Quit before implementing other options.

Call PrintMenu() in the main() function. Continue to call PrintMenu() until the user enters q to Quit.

More specifically, the PrintMenu() function will consist of the following steps:

  • print the menu
  • receive an end user's choice of action (until it's valid)
  • call the corresponding function based on the above choice



Ex:

MENU
c - Number of non-whitespace characters
w - Number of words
f - Find text
r - Replace all !'s
s - Shorten spaces
q - Quit

Choose an option:


(3) Implement the GetNumOfNonWSCharacters() function. GetNumOfNonWSCharacters() has a constant string as a parameter and returns the number of characters in the string, excluding all whitespace. Call GetNumOfNonWSCharacters() in the PrintMenu() function.

Ex:

Number of non-whitespace characters: 181


(4) Implement the GetNumOfWords() function. GetNumOfWords() has a constant string as a parameter and returns the number of words in the string. Hint: Words end when a space is reached except for the last word in a sentence. Call GetNumOfWords() in the PrintMenu() function.

Ex:

Number of words: 35


(5) Implement the FindText() function, which has two strings as parameters. The first parameter is the text to be found in the user provided sample text, and the second parameter is the user provided sample text. The function returns the number of instances a word or phrase is found in the string. In the PrintMenu() function, prompt the user for a word or phrase to be found and then call FindText() in the PrintMenu() function. Before the prompt, call cin.ignore() to allow the user to input a new string.

Ex:

Enter a word or phrase to be found:
more
"more" instances: 5


(6) Implement the ReplaceExclamation() function. ReplaceExclamation() has a string parameter and updates the string by replacing each '!' character in the string with a '.' character. ReplaceExclamation() DOES NOT return the revised string. Call ReplaceExclamation() in the PrintMenu() function, and then output the edited string.

Ex.

Edited text: We'll continue our quest in space.  There will be more shuttle flights and more shuttle crews and,  yes,  more volunteers, more civilians,  more teachers in space.  Nothing ends here;  our hopes and our journeys continue.


(7) Implement the ShortenSpace() function. ShortenSpace() has a string parameter and updates the string by replacing all sequences of 2 or more spaces with a single space. ShortenSpace() DOES NOT return the revised string. Call ShortenSpace() in the PrintMenu() function, and then output the edited string.

Ex:

Edited text: We'll continue our quest in space. There will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. Nothing ends here; our hopes and our journeys continue!

______________________________________________

#include <iostream>
#include <string>
using namespace std;

int main() {

/* Type your code here. */

return 0;
}

In: Computer Science

write a 700- to 1,050-word paper evaluating economists’ assessments of the role the 4 factors of production played in determining how the economic concentration you selected has evolved.

select 1 of the economic concentrations (clusters) below:

  • Hollywood movie industry

write a 700- to 1,050-word paper evaluating economists’ assessments of the role the 4 factors of production played in determining how the economic concentration you selected has evolved. Complete the following in your paper:

  • Analyze how the economic concentration in the area you chose was influenced by competition and pricing.

  • Analyze how the economic concentration in the area you chose influenced the supply chain.

  • Analyze which of the 4 factors of production were the most and least important in determining the economic concentration of the area you chose.

  • Predict changes you anticipate for the area of economic concentration you chose. Support your predictions.

In: Economics

Robert Campbell and Carol Morris are senior vice-presidents of the Mutual of Chicago Insurance Company. They...

  1. Robert Campbell and Carol Morris are senior vice-presidents of the Mutual of Chicago Insurance Company. They are co-directors of the company’s pension fund management division. A major new client has requested that Mutual of Chicago present an investment seminar to illustrate the stock valuation process. As a result, Campbell and Morris have asked you to analyze the Bon Temps Company, an employment agency that supplies word processor operators and computer programmers to businesses with temporarily heavy workloads. You are to answer the following questions.
  1. What is the value of a 1-year, $1,000 par value bond with a 8% annual coupon if its required rate of return is 12%? What is the value of a similar 10-year bond?

In: Finance

In this assignment. you will determine the probability of several different z-scores. Requirements: You may use...

In this assignment. you will determine the probability of several different z-scores.

Requirements:

  • You may use Word, Excel, or write out by hand to complete this assignment.
  • Using the charts available in Top Hat, complete the probabilities of the following:
    • P(x<2.78)
    • P(1.87<x<2.78)
    • P(-2.68<x<0.00)
    • P(0.15<x<1.15)
    • P(-1.33<x<1.33)
    • P(x>1.75)
    • P(x>2.21)
    • P(x<0.56)
    • P(x<-0.56)
    • P(x>1.49)
  • Make sure each answer is numbered
  • All answers must be rounded to four decimal places.
  • You must show your work (if any computation is required) for 100% credit.

In: Statistics and Probability

The number of cyclins of each type (G1/S cyclins, S cyclins, M cyclins) vary during different...

The number of cyclins of each type (G1/S cyclins, S cyclins, M cyclins) vary during different stages of the cell cycle?

True or False?

What is the function of SCF?

A. removes a H+ from a molecule

B. adds a phosphate to a molecule

C. add ubiquitin to a molecule

D. removes a phosphate from a molecule

Select all of the following which can inactivate a cyclin dependent kinase (cdk)

A. remove an inhibitory protein

B. remove the cyclin from the cdk

C. remove an inhibitory phosphate

D. add an inhibitory phosphate

E. add an inhibitory protein

What stage of mitosis does APC/cdc20 stimulate? Use one word: for example: prophase

In: Biology

1) written Submission 2) Group Presentation Overall Grade for this project will be out of 35%...

1) written Submission

2) Group Presentation

Overall Grade for this project will be out of 35% of the total course weight.

The topic of this project will be the pillars that those companies operate under. The ask is as per the below:

Select a company from the Canadian Stock Exchange or the USA, NASDAQ and analyse their pillars and visions. What this company stands for, its vision and explain how those pillars are being executed and how they are helping the business to drive growth from a sales perspective. To guide you with this project, look at the confectionary company, MARS and check out their 5 pillars.

Please pencil down your answers on a word document with no more than 5 pages and 12 Calibri font. This will be used for your written submission.

In: Economics

Your patient is a 35-year-old African American female patient that has allergic rhinitis. Her prescriptions include...

Your patient is a 35-year-old African American female patient that has allergic rhinitis. Her prescriptions include loratadine 5mg/day and fluticasone two nasal inhalations per day. Previously she had taken OTC drugs and asked if she could continue to take the OTC drugs with her prescription. She has never used a nasal inhaler before. She is admitted to your unit with a fever of 103? and you are supposed to take care of her. Write a care plan for this patient, providing six goals each with non-pharmacological interventions and scientific rationales that you would use. Present your interventions and scientific rationales in the form of a table in the attached word document.

In: Nursing

Here are the net cash flows for a project your company is considering: Year 0 =...

Here are the net cash flows for a project your company is considering: Year 0 = -1000 Year 1 = 250 Year 2 = 449 Year 3 = 800 Year 4 = 500 Year 5 = 500 If the payback period with interest is 3 years, for what range of interest rates is this project worth doing (start your analysis with an interest rate of 0%)? ** Kindly just don’t directly draw the table with values in it, it’ll be helpful to include explanation of how you get to fill the table . Already I posted this question earlier and noticed that someone had just randomly written someone else’s who has solved the question with no change in word format too.

In: Economics

From the following data, prepare a cash budget for the three months ending 31st December,2019                            

  1. From the following data, prepare a cash budget for the three months ending 31st December,2019                                                                                                  

(1)

Months

Sales (AED)

Materials (AED)

Wages (AED)

Overheads (AED)

September

10000

5000

1000

200

October

20000

4000

1000

200

November

25000

3000

2500

200

December

10000

4200

2000

300

(2) Credit terms are:

       (a) sales/debtors- 50% sales are on cash basis, 50% of the credit sales are collected next month.

       (b) Creditors

  • for materials- 1 months
  • for wages- Same months
  • for overheads – 1month

(3) Cash balance on 1st October, 2019 is expected to be AED 5000.

.

Note: Answers should be Kindly in Word or Excel Format

In: Accounting