#ifndef square_h #define square_h #include #include "shape.h" double squareArea(Shape* square) { double side = square->perimeter / 4; double area = side * side; return area; } Shape* newSquare(double perimeter) { Shape* square = malloc(sizeof(Shape)); square->numSides = 3; square->perimeter = perimeter; square->area = squareArea; return square; } #endif