/*
 * pointTest.c
 * Quick-n-dirty test client for operations on Point objects
 */

#include <stdio.h>

#include "point.h"   // required to get the definition of Point

/*
 * All executable C programs require a main function and it is always executed first
 * this one runs a simple test of our Point functionality
 */

int main(int argc, char *argv[]) {

  // the arguments argc and argv above are used with the command line
  // and are required for main

  // define two Point objects
  struct Point p1, p2;

  char name[20];
  printf("Enter your first name: ");
  scanf("%19s", name);
  printf("Hey there, %s\n", name);

  // read in (and display) information for each point
  readPoint(&p1);
  printPoint(p1);
  readPoint(&p2);
  printPoint(p2);

  // compute and output the distance between the points
  double dist = distance(p1, p2);
  printf("\nDistance = %f\n", dist);

  return 0; // return value optional

}