Menu

(Solved) : Write Unit Test Addinventory Error Call Redsweateraddinventory Parameter Sweatershipment P Q37297044 . . .

Write a unit test for addInventory(), which has an error. CallredSweater.addInventory() with parameter sweaterShipment. Print theshown error if the subsequent quantity is incorrect. Sample outputfor failed unit test given initial quantity is 10 andsweaterShipment is 50:

Beginning tests. UNIT TEST FAILED: addInventory()Tests complete.

Note: UNIT TEST FAILED is preceded by 3 spaces.

Write a second constructor as indicated. Sample output: User1: Minutes: e, Messages: 0 User2: Minutes: 1000, Messages: 5000 1

Write a second constructor as indicated. Sample output: User1: Minutes: e, Messages: 0 User2: Minutes: 1000, Messages: 5000 1 // ===== code from file phon eplan.java 2 public class PhonePlan t 3 private int freeMinutes; 4 private int freeMessages; lic PhonePlan() f freeMinutes 0 freeMessages 0 7 8 10 12. // FIXME: Create a second constructor with numMinutes and numMessages parameters. 13 14 Your solution goes here / 15 16 public void print() f 17 18 19 20 11 end System.out.println(“Minutes: “+ freeMinutes + “, Messages: ” freeMessages); Run Show transcribed image text Write a second constructor as indicated. Sample output: User1: Minutes: e, Messages: 0 User2: Minutes: 1000, Messages: 5000 1 // ===== code from file phon eplan.java 2 public class PhonePlan t 3 private int freeMinutes; 4 private int freeMessages; lic PhonePlan() f freeMinutes 0 freeMessages 0 7 8 10 12. // FIXME: Create a second constructor with numMinutes and numMessages parameters. 13 14 Your solution goes here / 15 16 public void print() f 17 18 19 20 11 end System.out.println(“Minutes: “+ freeMinutes + “, Messages: ” freeMessages); Run

Expert Answer


Answer to Write a unit test for addInventory(), which has an error. Call redSweater.addInventory() with parameter sweaterShipment….

OR