Questions
Write a function addStrings(string1, string2) that takes in two decimals as strings and returns a string...

Write a function addStrings(string1, string2) that takes in two decimals as strings and returns a string of their sum. *Simply converting strings to numbers and adding them together isn’t acceptable.* The program must be able to handle large decimals.

Be sure to touch on these when solving for the solution:

  • Pad the right side
  • Pad the left side
  • Make sure string is same length by putting 0’s where it was missing (be careful w/ decimal points)
  • Make sure to remove trailing 0’s
  • Chunk out each step into it’s own function *NOT REQUIRED BUT CODE LOOKS CLEANER DOING SO*

Please do the solution in either JavaScript or Ruby so that I can understand better.

// let testCase_string1 = '3.92';

// let testCase_string2 = '0.09';

// let testCase2_string1 = '103.00000000909';

// let testCase2_string2 = '0.0000000019101';

// let testCase3_string1 = '1099.999999999990001';

//let testCase3_string2 = '10000000.000000000000000201000';

In: Computer Science

Sell or Process Further Abica Coffee Company produces Columbian coffee in batches of 4,300 pounds. The...

Sell or Process Further Abica Coffee Company produces Columbian coffee in batches of 4,300 pounds. The standard quantity of materials required in the process is 4,300 pounds, which cost $6 per pound. Columbian coffee can be sold without further processing for $9 per pound. Columbian coffee can also be processed further to yield Decaf Columbian, which can be sold for $12 per pound. The processing into Decaf Columbian requires additional processing costs of $9,013 per batch. The additional processing also causes a 5% loss of product due to evaporation. a. Prepare a differential analysis dated October 6 on whether to sell regular Columbian (Alternative 1) or process further into Decaf Columbian (Alternative 2). For those boxes in which you must enter subtracted or negative numbers use a minus sign. Differential Analysis Sell Regular Columbian (Alt. 1) or Process Further into Decaf Columbian (Alt. 2) October 6 Sell Regular Columbian (Alternative 1) Process Further into Decaf Columbian (Alternative 2) Differential Effect on Income (Alternative 2) Revenues $ $ $ Costs Income (Loss) $ $ $ b. Should Abica sell Columbian coffee or process further and sell Decaf Columbian? c. Determine the price of Decaf Columbian that would cause neither an advantage nor a disadvantage for processing further and selling Decaf Columbian. Round your answer to two decimal places. $ per pound

In: Accounting

Company A plans to replace with one of their current equipment with one of the three...

Company A plans to replace with one of their current equipment with one of the three options shown in the table.

Option

A

B

C

Initial Cost

200

350

475

Annual Operation Cost

450

275

300

Salvage Value

75

60

80

Estimated Life in Year

20

20

20

Perform AW analysis to figure out which option should company A choose. The rate of return is 8% per year compounded Monthly. Please see correct answer below how do you get this?

Time Window - Year
A B C
PMT ($469.24) ($310.18) ($347.77)
Winner

In: Finance

research Amazon’s in-house relational database AWS. Consider some of the following questions. How does Amazon approach...

research Amazon’s in-house relational database AWS.

Consider some of the following questions.

  • How does Amazon approach its database solution?
  • Why did Amazon develop its own database solution?
  • How important is reliability to Amazon, and what challenges do they face?
  • What is Dynamo? What techniques does it involve?
  • How does Dynamo handle failure? Does it rely on redundancy?
  • What are your personal experiences with Amazon’s reliability?

In: Computer Science

When is a woman’s purse likely to be perceived as a primary territory?  When can it become...

  1. When is a woman’s purse likely to be perceived as a primary territory?  When can it become a secondary territory?

In: Psychology

How to write email as a way of saying goodbye to your coworkers on last day...

How to write email as a way of saying goodbye to your coworkers on last day of work? write three or four sentences saying goodbye to your coworkers.

In: Psychology

. Compare the business models and areas of strength of Apple, Google, and Microsoft. 2. Why...

. Compare the business models and areas of strength of Apple, Google, and Microsoft. 2. Why is mobile computing so important to these three firms? Evaluate the mobile platform offerings of each firm. 3. What is the significance of mobile applications, app stores, and closed versus open app standards to the success or failure of mobile computing? 4. Which company and business model do you think will prevail in this epic struggle? Explain your answer. 5. What difference would it make to a business or to an individual consumer if Apple, Google, or Microsoft dominated the Internet experience? Explain your answer.

In: Computer Science

Company B must choose one of two methods for its validation activity. Based on the information...

Company B must choose one of two methods for its validation activity. Based on the information below, perform an AW analysis and make recommendation. MARR is 10% per year compounded quarterly. Please use the AW analysis.

Method

X

Y

Initial Cost

100,000

250000

Annual Operation Cost

30,000 in year one increasing by 5000 each year

200,00

Salvage Value

0

0

Estimated Life in Year

3

6

Please see below correct answer. How do you get this? Use Excel.

X Y
FV
PMT ($75,152.98) ($78,044.72)
Winner

In: Finance

Voters arrive at a polling station at an average of 9 per minute (Poisson) where the...

  1. Voters arrive at a polling station at an average of 9 per minute (Poisson) where the service rate is 150 per hour (Poisson).
    1. What is the average number of voters in the system with 4 voter booths? (10 pts)

  1. What is the minimum number of voting booths needed to keep the average time in the system under 1 minute (must show time)? (10 pts)

In: Operations Management

thesis statement about : about the impeachment of president trump

thesis statement about : about the impeachment of president trump

In: Psychology

Broussard Skateboard's sales are expected to increase by 20% from $8.6 million in 2016 to $10.32...

Broussard Skateboard's sales are expected to increase by 20% from $8.6 million in 2016 to $10.32 million in 2017. Its assets totaled $5 million at the end of 2016. Broussard is already at full capacity so its assets must grow at the same rate as projected sales. At the end of 2016 current liabilities were $1.4 million consisting of $450000 of accounts payable $500000 of notes payable and $450000 of accruals. The after tax profit margin is forecasted to be 7% and the forecasted payout is 70%. Use the AFN equation to forecast Broussard's additional funds needed for the coming year.

In: Finance

1. What do you believe is the one dimension of employee compensation that triggers more complaints...

1. What do you believe is the one dimension of employee compensation that triggers more complaints than any other? Why?

2. Describe a set of circumstances under which you might legitimately consider disciplinary action for a chronic complainer.

3. Under what circumstances would you consider that one employee asking another for a date could constitute sexual harassment?

In: Operations Management

The x2 statistic from my study was close to zero, so I rejected the null hypothesis.

The x2 statistic from my study was close to zero, so I rejected the null hypothesis.

In: Math

Information on a project’s activities is shown in the following table: Activity Immediate Predecessor Activity Time...

  1. Information on a project’s activities is shown in the following table:

Activity

Immediate Predecessor

Activity Time (wks)

Total Budgeted Cost

A

-

4

24,000

B

-

3

27,000

C

B

2

14,000

D

A

8

32,000

E

D

3

24,000

F

C, E

4

60,000

G

D

6

30,000

H

F

6

30,000

I

G

4

20,000

J

G, H

3

18,000

K

I

2

10,000

L

J

4

16,000

  1. Create a Gantt chart based on earliest start times. (20 pts)

  1. Create a budget cost chart, using earliest start times. (20 pts)

In: Operations Management

Using R language: Given a vector or list of numbers, call this variable x , write...

Using R language: Given a vector or list of numbers, call this variable x , write down the code that will create a new vector, y , where all the odd number entries are set to 0. In other words, the first, third, fifth, etc entries should all be 0.

In: Computer Science