started defined a class with a function that just does cout and cin and called it from main