Added size field
updated main with chart writer as well as proper array structure and outline for sorting
Created chart class so that the main method looked better