How to display "Insufficient amount"
Hello I am woriking on a bank account program, it accept balance amount, deposit amount and wihtraw amount, as a result of this display account balance. I want to add a feature on my withraw method, if withraw amount is greater that balance display "Insufficient amount" message. Below is my withraw method;
I don't know where to place
public double withraw()
//Check if we can do withraw
if (balance >= withraw)
balance = balance - withraw;
I tried before and after return 0.0; however I did not see message when I tried to withraw amount bigger than balance .
If you request all codes I can post it.