public bool Action() { var flag = true; var value = GetAndValidateInputInt(0, 8); Console.Clear(); switch (value) { case 1: Console.WriteLine($"Total revenue: {_parking.GetTotalRevenue()}"); break; case 2: Console.WriteLine($"Revenue for the last minute:{Parking.AmountForTheLastMinute()}"); break; case 3: Console.WriteLine($"Free spaces: {_parking.GetNumberOfFreePlaces()}.\nBusy spaces: {Parking.GetNumberOfBusyPlaces()}."); break; case 4: AddCarMenuItem(); break; case 5: RemoveCarMenuItem(); break; case 6: TopUpCarBalanceMenuItem(); break; case 7: DisplayTransactionsForTheLastMinuteMenuItem(); break; case 8: DisplayTransactionsFileMenuItem(); break; default: flag = false; break; } if (flag) { EndOfParagraph(); } return(flag); }