Project 74: Partitioning a Segment

Two friends (Alana and Britney) plan to meet at a meeting place between their houses.  Alana's house is at coordinate (-2, -2).  Britney's house is at coordinate (3, 4).


The midpoint (.5, 1) would be the meeting place that makes the distance traveled for both friends equal.  However, Britney has a hurt leg, so the girls decide that Alana will walk 70% of the distance and Britney will walk 30% of the distance.  

Where would the meeting place be?

(1.5, 2.2)

Project 74: Variables 'firstX', 'firstY', 'secondX', 'secondY' and 'proportion' are initialized.  

firstX is the x-coordinate of the first endpoint (-1 in the example above)

firstY is the y-coordinate of the first endpoint (6 in the example above)

secondX is the x-coordinate of the second endpoint (-4 in the example above)

secondY is the y-coordinate of the second endpoint (2 in the example above)

proportion is the proportion of the total segment distance that the desired point is from the first Point (.25 in the example above).

Task: Appropriately initialize the values of 'x' and 'y' which represent the x-y coordinate of the desired point (-1.75, 5)

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0