Menu

[Solved]-1 Given Uml Definition Following Class Box Box Templatepy Module Box Length Width Height I Q37166388

Multiple Choice Python Programming

1 Given the UML definition of the following class of Box in box template.py module. Box length _width height init_(p_length,

5. The method compute volume in class Box should be written in the return statement as a. return (self.p_length*self.p_width*Thank you.

1 Given the UML definition of the following class of Box in box template.py module. Box length _width height init_(p_length, p_width, p_height) setLength (p_length) getLength ) setWidth (p_width) getLength) setHeight (p height) getHeight 0 compute_area() compute_volume ) printBox () 5. The method compute volume in class Box should be written in the return statement as a. return (self.p_length*self.p_width* b. return (p length* p width* p height) a. return 2 (p_length* p_width p_lengthc. return 2* (self. length* self. width + c. return (self. length*self. _width* pheight) self._height) d. return( length widthheight) 6. The method compute_area ) in class Box should be written in the return statement as self. length *self. height+ self. width self._height) * heightwidthheight) *p_height + p_width p_height) b. return 2* ( p_length* p_width+length d. return 2* length*width +length height+widthheight) 7. T The methods members in Box class are defined as a. private b Non private c. public d. generic 8. The printBox () method is executed whern a. you call the method init b. You set the data attributes of object d. You call the method printBox ) The body of setHeight method should be written as a. self.p_heightheight b. self. height= p height c you instantiate an obiect 9. height -pheight a. self. height= height 10. Which statement instantiates an object coursePython from class called Course in Python module course template.py? a. Course course_template. coursePython O b. coursePython course template. coursePython O d. coursePython course template.Course0 c. coursePython – Course. Course O Show transcribed image text 1 Given the UML definition of the following class of Box in box template.py module. Box length _width height init_(p_length, p_width, p_height) setLength (p_length) getLength ) setWidth (p_width) getLength) setHeight (p height) getHeight 0 compute_area() compute_volume ) printBox ()
5. The method compute volume in class Box should be written in the return statement as a. return (self.p_length*self.p_width* b. return (p length* p width* p height) a. return 2 (p_length* p_width p_lengthc. return 2* (self. length* self. width + c. return (self. length*self. _width* pheight) self._height) d. return( length widthheight) 6. The method compute_area ) in class Box should be written in the return statement as self. length *self. height+ self. width self._height) * heightwidthheight) *p_height + p_width p_height) b. return 2* ( p_length* p_width+length d. return 2* length*width +length height+widthheight) 7. T The methods members in Box class are defined as a. private b Non private c. public d. generic 8. The printBox () method is executed whern a. you call the method init b. You set the data attributes of object d. You call the method printBox ) The body of setHeight method should be written as a. self.p_heightheight b. self. height= p height c you instantiate an obiect 9. height -pheight a. self. height= height 10. Which statement instantiates an object coursePython from class called Course in Python module course template.py? a. Course course_template. coursePython O b. coursePython course template. coursePython O d. coursePython course template.Course0 c. coursePython – Course. Course O

Expert Answer


Answer to 1 Given the UML definition of the following class of Box in box template.py module. Box length _width height init_(p_len… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *