CS 115 Lab 3 Calculating and Comparing (Individual)

50 Points

Due Sunday, February 4, 2018, midnight

Educational goals of this lab - verify that every student can

Submit your files with this link. Use the Lab 3 menu choice. and the "Code" menu choice.

INSTRUCTIONS:

(50 points) Individual Problem: Computing a distance and determining a hit or miss

Points on a plane are specified by x and y coordinates. The distance between points can be calculated by the formula

You will ask the user for 4 numbers, which represent 2 points on the plane. Calculate the distance between the two points using the sqrt function. Then determine if the two points are within 25 units of each other, exactly 25 units from each other or more than 25 units from each other. You can imagine one point as the center of a target that is 25 units in radius and the other point as a dart being thrown at the target. The dart either lands inside the target, on the edge of the target or outside the target.

(20 points) Problem #1: Complete a test plan.

(30 points) Problem #2: Write the program


Log off properly - you don't want your account misused by someone else!

Remember NOT to leave files on the local hard drives in a lab or anywhere else on campus! Make sure you save your projects on a portable storage device you take with you!