%  Program File Name: Shape.m
%  Written by: S. Scott Moor                Date Created: January 2019
%  Purpose of Script: This script calculates the area and parameter of a
%  shape consisting of a rectangle and a half circle attaching to the
%  length of the rectangle based on the width and length of the rectangle. 
%
%
%               Variable    = description [units]
%  Input:       L           = Length of rectangle/diameter of semicircle [Length Units] 
%               W           = Width of rectangle [same Length Units]
%  Output:      A         	= Area of shape  [Length Units Squared] 
%           	P	      	= Parameter of shape  [Length Units]
 
% Input Section (hard coded) 
    L = 6;
    W = 2;
     
% Calculation and output of Area
disp('The area of the figure is:')
A = L*W + (pi*L^2)/8
% Calculation and output of Parameter 
disp('The parameter of the figure is:')
P = 2*W+ L +1/2*pi*L
