Functional Programming Answers

Questions: 9

Answers by our Experts: 9

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Can you think of a new way to collect consumer data that will give CPG companies the information they need to improve products and services, but at the same time, deliver real benefits to consumers?

  1. Explain your idea in terms of who the consumer is and what type of data will be gathered.
  2. How will the data be gathered? 
  3. How can the CPG brand use the data that is gathered?
  4. What is the reward/benefit for the consumers sharing their data?
  5. List 1-2 CPG brands that are currently doing a good job of collecting and rewarding for consumer data. How do they do it?
  • Submissions will be graded on the following criteria:
  • Meets Deliverables 
  • Creativity 
  • Feasibility 

Task 2:

Write C++ program, with multiple functions, that reads text, txt, from the file and accepts two patterns, pat and rpat, from the user. The program replace all occurrences of pat from the txt with rpat. The program output shall be as shown below in the example.



Suppose, there is a legacy system utilizing the Von Neumann architecture for the past twenty years of sales forecast. But due to the increasing amount of data and processing requirements, the Von Neumann Bottleneck has reduced the overall system’s performance. Among the many ways, you need to select either “in-memory processing” or providing a “cache” between the processor and main memory to overcome the Von Neumann bottleneck. The factors to be considered are cost, floating point operations, and scalability.

Your selection must be supported by logical arguments.


In a Fortran program, if I have set x=2.0,a=2.0, b=4.0, what is the value of y. If y=a*x+b**2/x?


Write a regular expression for the following languages, over sigma=(a,b) All strings that do not end with aa.All strings that contain an even number of b’s. All strings which do not contain the substring ba.


Construct NFA for the regular Expression R=(a+b) ∗abb


Draw DFAs for the regular expression R= a ∗ (ba∗ ba∗ ) ∗


– If a programmer chooses java, a special approach is used. Identify one feature of this special approach. 


g(0, Y, Y):- !.
g(X, C, R):- Y is X - 1, C1 is C * 2, g(Y, C1, R).

What is the final value of Y after g(3, 2, Y)?
LATEST TUTORIALS
APPROVED BY CLIENTS