Closed scrable closed 8 years ago
In that case you could actually use anything <= 0 because it would prevent invalid answers. -1 is the bookIdentifier of books that don't exist in the database, and is given if they search for an identifier that is not found in the database.
Ahh I see what you mean, I'll change that real quick.
Wait if you say 0, because it says use 0 to exit, now it will say "A book with identifier 0 was not found." instead of "Exiting..." or something. lol too many conditions to keep track of.
I'll just edit the text and it won't matter anymore. If we keep it like this and I remove the "enter 0 to exit" thing it will just prompt the user to press enter to return to the main menu after either an invalid ID or not found.
Sounds good. :+1:
Whoops forgot to uncheck the database file. Let me get rid of that real quick.
;)
I always forget about this thing...
Looks good. Merging now.
I still have to check a few other portions for valid inputs. Is there anything else we need to do?
Added check for char in addBookMenu().
Added option to exit from entering an identifier to cart. Previously you would get stuck in the menu with no way to get back to the main menu other than closing the program. This is currently set to 0 but it can be changed to any value you guys want. It's all I could think of since the program already tracks -1 for no ID found. I don't believe 0 is ever used as an identifier since the default constructor sets it to 1. Change it if I'm wrong please!
Added a check to make sure something is in cart before proceeding to checkout.
Changed some output text