Implimented a __construct function and used the string variable in the
class.