This lab explores simple uses of structures.
You can get support files by downloading lab8.zip.
Develop the following programs in the files specified for each part. To compile your program, in the respective directory, type make debug for the debug version and make run for the run version.
As always, you must develop test cases for the functions that you write. It is recommended that you develop these test cases before you write the code for each function. Place the test cases in the test_cases function. You are writing two separate programs. Each program must contain a test_cases function.
Using the following definition for a vector structure, implement a single function to compute the cross product of two vectors (reference assignment 1 for details). Develop this in the cross_product directory.
struct vector
{
double x;
double y;
double z;
};
Using the following definition for a circle structure, reimplement the circle_collision function from lab 3 (develop this in the circle_collision directory).
struct point
{
double x;
double y;
};
struct circle
{
struct point center;
double r;
};
Demonstrate your work to your instructor to have this lab recorded as completed.