1 00:00:00,270 --> 00:00:05,400 In the solution of inequality, control the item class, and so starting with the constructor, the 2 00:00:05,400 --> 00:00:08,150 color shouldn't be allowed to pass anything that is blank. 3 00:00:08,520 --> 00:00:11,370 So if the name is null or if it's blank. 4 00:00:16,740 --> 00:00:19,350 Well, throw a new legal argument exception. 5 00:00:21,960 --> 00:00:23,820 Name cannot be no blank. 6 00:00:27,800 --> 00:00:31,220 The caller also shouldn't be allowed to pass in a price that's less than zero. 7 00:00:34,850 --> 00:00:38,000 In such a case, we'll throw a new illegal argument exception. 8 00:00:42,560 --> 00:00:44,510 Price cannot be less than zero. 9 00:00:52,140 --> 00:00:57,240 And now we need to quality control our methods, starting with a name the caller should not be allowed 10 00:00:57,240 --> 00:01:01,020 to update an object with a name that is no or blank. 11 00:01:07,510 --> 00:01:10,570 In which case, through a new legal argument, exception. 12 00:01:21,220 --> 00:01:23,720 And do the same thing inside set price. 13 00:01:23,750 --> 00:01:27,010 Well, throw an exception if the price they pass then is less than zero. 14 00:01:43,660 --> 00:01:45,750 And that's really it for quality control. 15 00:01:47,510 --> 00:01:53,030 If the caller misuses our methods or constructor, they're going to throw an exception and force them 16 00:01:53,030 --> 00:01:54,230 to improve their code.