/****
 *
 * Test some of the Planet functions.  Note that this program performs some
 * initial tests, that do not exhaustively test the functionality of Planet
 * functions.
 *
 */

#include "planet.h"
#include <stdio.h>
#include <string.h>

int main() {

    Planet p;

    /*
     * Use the read_planet and print_planet functions to input and output
     * planet values.
     */
    p = read_planet();
    printf("\n");
    print_planet(p);

    /*
     * Change some planet components, and re-print.
     */
    change_diameter(&p, 10);          /* It exploded into small bits */
    change_rotation_time(&p, 0);      /* It stopped rotating */
    strcat(p.name, " (EXPLODED)");    /* Concatenate onto its name */

    printf("\n");
    print_planet(p);                  /* Output the bad news */

    return 0;
}