README.md

Square

Author: James Henry

Date: Dec 18, 2016

This repo contains the code to create objects of class square, with a given side length. We can then use the accompanying methods to calculate the area and perimeter of the square

Build Status

Create object of class square:

#' An S3 class to represent a square
#' square
#' @param side A number to represent the length of the side
#' @return A square object with side value
#' @export
#' @examples
#' square(3)

Calculate area of square:

#' area.square() function
#' @return The area of a square with \code{side}
#' @examples
#' area(square(3))

Calculate perimeter of square:

#' perimeter.square() function
#' @return The perimeter of a square with \code{side}
#' @examples
#' perimeter(square(3))


jghenry/square documentation built on May 19, 2019, 9:25 a.m.