Define three classes, iLine , iCurved , iStraight , where iLine is… Define three classes, iLine , iCurved, iStraight , where iLine is the parent of iCurved and iStraight . The attached figure might help visualize the hierarchy of these classes. a) The iLine should have the following methods:A method called whoAmI prints out Curved Line if the object has three coefficients: a, b and c or Straight Line if the object has only two coefficients: m and c.A method called lineEquation prints the equation of the line: – The iCurved equation is: ax2+bx+c=0 – The iStraight equation is: mx+c=0 A method called plotLine() plots the shape of the line. b) When creating the iCurved objects, the program should generate three random integers as the coefficients of the line. Similarly, the program should randomly generate two random integers denoting the coefficients of the iStraight objects. The coefficients can be any value between -10 and 10, inclusively.c) Each iCurved and iStraight class should have a method called plotLine to plot the respective shapes using the ( Pyplot) function, and only the iCurved class has another method called findRoots that computes the roots of the curve using the (Numpy Roots) function.The program should automatically create 3 Straight and 3 Curved objects and print out their properties. For example, upon execution, the program would return The attached plots. Image transcription textStraight Line Number of Coeffectents: 2 The equation of the Straight Line is: Y = 7X + -8200 100 -100 -200 -300 -40 -20 x o- 20 40 Curved Line Number of Coeffectents: 3The equation of the Curved Line is: Y = -3X2 + 7X + -3 The roots are: x1 = … Show more… Show more Engineering & Technology Computer Science CIND 830
You will get a plagiarism-free paper and you can get an originality report upon request.
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more