Question: how would I write a unit test for this code? /* When squirrels get together for a party, they like to have cigars. A squirrel

how would I write a unit test for this code?
/* When squirrels get together for a party, they like to have cigars. A squirrel party is successful when the number of cigars is between 40 and 60 , inclusive. Unless it is the weekend, in which case there is no upper bound on the number of cigars. Return true if the party with the given vazues is successful, or false otherwise. haveParty (30, false) false haveParty(50, false) true haveParty(70, true) true I public boolean haveParty(int cigars, boolean isweekend) \{ int minimumcigarcount =40; int maximumcigarcount =60; boolean hasNinimumCigars = cigars >= minimumCigarcount ; boolean withinMaxRangeofCigars = (!isweekend 8& cigars s= maximumCigarCount) 1 isWeekend; boolean successful = hasMinimuncigars \&\& withinMaxRangeofCigars; return successful; \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
