create Scanner class
replace input with scanner in constructor
modify cartService in App
modify CartServiceTest