object-oriented programming - in section we note that our vector class supports syntax such as [ - ]in which the sum of vector and list returns new vector howeverthe syntax [ - is illegal explain how the vector class definition can be revised so that this syntax generates new vector - implement the mul method for the vector class of section so that the expression returns new vector with coordinates that are times the respective coordinates of - exercise - asks for an implementation of mul for the vector class of section to provide support for the syntax implement the rmul methodto provide additional support for syntax - implement the mul method for the vector class of section so that the expression returns scalar that represents the dot product of the vectorsthat isdi= ui vi - the vector class of section provides constructor that takes an integer dand produces -dimensional vector with all coordinates equal to another convenient form for creating new vector would be to send the constructor parameter that is some iterable type representing sequence of numbersand to create vector with dimension equal to the length of that sequence and coordinates equal to the sequence values for examplevector([ ]would produce three-dimensional vector with coordinates modify the constructor so that either of these forms is acceptablethat isif single integer is sentit produces vector of that dimension with all zerosbut if sequence of numbers is providedit produces vector with coordinates based on that sequence - our range classfrom section relies on the formula max( (stop start step /stepto compute the number of elements in the range it is not immediately evident why this formula provides the correct calculationeven if assuming positive step size justify this formulain your own words - draw class inheritance diagram for the following set of classesclass goat extends object and adds an instance variable tail and methods milkand jumpclass pig extends object and adds an instance variable nose and methods eat(foodand wallowclass horse extends object and adds instance variables height and colorand methods runand jumpclass racer extends horse and adds method raceclass equestrian extends horseadding an instance variable weight and methods trotand is trained