{"ScriptPreparationCode":null,"TestCases":[{"Name":"Override","Code":"class BaseClass {\r\n a\r\n construct(a) {\r\n this.a = a\r\n }\r\n performTask(b) {\r\n return this.a \u002B b;\r\n }\r\n}\r\nclass ActualClass extends BaseClass {\r\n performTask(b) {\r\n return this.a * b;\r\n }\r\n}\r\nconst random1 = Math.random() * 50\r\nconst random2 = [...Array(100)].map(v =\u003E Math.random() * 10)\r\nconst expectedResult = random2.reduce((acc, cur, i) =\u003E acc \u002B ((i % 2) * 2 - 1) * random1 * cur, 0)\r\n\r\nconst instance = new ActualClass(random1)\r\nlet result = 0\r\nfor (i = 0; i \u003C random2.length; \u002B\u002Bi) {\r\n result \u002B= ((i % 2) * 2 - 1) * instance.performTask(random2[i])\r\n}\r\nconsole.log(result == expectedResult)","IsDeferred":false},{"Name":"assignment","Code":"class ActualClass2 {\r\n a\r\n construct(a) {\r\n this.a = a\r\n }\r\n performTask = (a, b) =\u003E a \u002B b\r\n}\r\nconst random1 = Math.random() * 50\r\nconst random2 = [...Array(100)].map(v =\u003E Math.random() * 10)\r\nconst expectedResult = random2.reduce((acc, cur, i) =\u003E acc \u002B ((i % 2) * 2 - 1) * random1 * cur, 0)\r\n\r\nconst instance = new ActualClass2(random1)\r\ninstance.performTask = (a, b) =\u003E a * b\r\nlet result = 0\r\nfor (i = 0; i \u003C random2.length; \u002B\u002Bi) {\r\n result \u002B= ((i % 2) * 2 - 1) * instance.performTask(random2[i])\r\n}\r\nconsole.log(result == expectedResult)","IsDeferred":false}]}