Question: PYTHON Homework 4 Could you please help me answer these questions? 21.) Which of the following statements about superclasses and subclasses is true? a.) A

PYTHON Homework 4 Could you please help me answer these questions?

21.) Which of the following statements about superclasses and subclasses is true?

a.) A superclass is larger than its subclass. b.) A superclass inherits from a subclass. c.) A superclass extends a subclass. d.) A subclass extends a superclass.

22.) In this code segment, ageValue is ____.

ageValue = IntVar()

ageValue.set(100)

age = Entry(root, width=5, textvariable=ageValue)

a.) The containing element for the widget b.) the name of the event-handling function called when the element is clicked c.) the name of the variable that represent any data entered in the widget d.) is the name of the layout manager used by the widget

23.) Consider classes Oranges, Pears, Apples, Fruit. Which should be the superclass? .

a.) Oranges b.) Pears c.) Apples d.) Fruit

24.) Which of the following is NOT true about a subclass that overrides a superclass method?

a.) The subclass extends the functionality of the superclass version b.) The subclass method carries out the action of the superclass method, and it also does some additional work c.) The subclass method can have additional arguments than the superclass method d.) A subclass method can replace the funcationality of a superclass method

25.) In GUI-based programs, ____ are boxes within which the program can output text or receive it as input from the user.

a.) labels b.) title bars c.) command buttons d.) entry fields

26.) Which method is being overridden in the following code segment?

class Car(mover) :

def __init__(self, make, model, color) :

. . .

def getMake(self) :

. . .

def getModel(self) :

. . .

def getColor(self) :

. . .

class Apple(fruit) :

def __init__(self, color) :

. . .

def getColor(self) :

. . .

a.) getMake b.) getModel c.) getColor d.) No method is being overridden in this code segment

27.) Consider the following class definitions. Which statement is most correct?

class Fruit : . . .

def getColor(self) :

. . .

class Apple(Fruit) :

. . .

a.) Apple cannot have a method named getColor b.) Apple inherits the getColor method from Fruit c.) Apple must override the getColor method from Fruit d.) Apple must call the getColor method from Fruit

28.) In this code segment, The button that is checked is ____.

self.fruit = StringVar()

Radiobutton(self, text = Pear, variable = self.fruit, value = "pear", command= self.d)

Radiobutton(self, text = Orange, variable = self.fruit, value = "orange", command = self.d)

a.) determined by the text property which is used to distinguish one button in the group from another. b.) determined by the value property which is used to distinguish one button in the group from another.

29.) In GUI-based programs, mouse-clicks are user-generated ____.

a.) triggers b.) events c.) labels d.) commands

30.) Consider the following code segment. Which statement is most correct?

class Fruit :

. . .

def getName(self) :

. . .

class Apple(Fruit) :

. . .

def getName(self) :

. . .

a.) The Apple class overrides the Fruit class b.) The Apple class overrides the getName method c.) The Fruit class overrides the Apple class d.) The Fruit class overrides the getName method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!