/*
 ============================================================================
 Name        : Dog.h
 Author      : David Mutchler, November 2008.
 Description : A simple Dog structure and associated functions.
 ============================================================================
 */

#ifndef DOG_H_
#define DOG_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct {
	char name[7];
	char* breed;
	char* owner;
	int age;
	float weight;
} Dog;

// Constructs and returns a pointer to a Dog with the given characteristics.
Dog* constructDog(int age, float weight, char* name, char* breed, char* owner);

// Prints the given Dog's characteristics.
void printDog(Dog* dog);

// Deallocates the space allocated for the given Dog and its fields.
void destructDog(Dog* dog);

// Constructs and returns a pointer to a random Dog.
Dog* constructRandomDog();

// Returns a random string of lowercase letters (a-z) of the given length.
char* randomString(int size);

// Constructs and returns a pointer to Dog whose:
//   -- name, breed and owner are the empty string (i.e., "")
//   -- age and weight are 0
// We will call such a Dog a "Null Dog".
Dog* constructNullDog();

#endif /* DOG_H_ */