finding total marks using inheritance.