Student studentObj = new CSStudent(); Given the class hierar…

Student studentObj = new CSStudent(); Given the class hierarchy and code statement above, which of the following methods are allowed and are not allowed to be called on the studentObj variable? code() : [1] eat() : [2] For each statement below, indicate which class provides the implementation of each of the methods called. studentObj.study(); [3] studentObj.toString(); [4]

Identify the Big-O (i.e. worst-case complexity) of each of t…

Identify the Big-O (i.e. worst-case complexity) of each of the following blocks of code (assume the “stuff” being done is some constant time). n is the input size:  [block1] for(int i=0; i0; i–) {   // do some stuff…} [block3] for(int i=0; i=0; j–) {    // do some other stuff…    }} [block4] for(int i=0; i0; i=i/2) {   // do some stuff…}