Galaxy E7 Battery Percentage Suddenly %100

My Galaxy e7 device is when im charging device its shows suddenly 100 sometimes its suddenly closing restarting sometimes when on charge when i unplug charge cable its down to %3 whats happening is it depend from battery?
:confused::confused: