Enhance bank account class by adding preconditions for the constructor and the deposit method that require the amount parameter to be atleast zero, and a precondition for the withdraw method that requires amount to be a value between 0 and the current balance.Use assertions to test the preconditions.

2 answers

For deposit method:
if(amount<0)
{ // do something to indicate invalid data
}
else
{ // proceed with deposit
}

Similar for withdrawal.
Modifications of this kind is much easier if the class and associated methods are available.

I suggest you try to code the best you can and post what you have, and where you have a difficulty.
computer the pay for an employee input wii be:
name of employee
employee number
hourly rate
regular pay will