Finished ex 1b and added main method stub for ex 6