A bag model study ofD mesons