Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.) In wxPython setting a control location using pos=(x, y) is called _____. abs

ID: 3885848 • Letter: 1

Question

1.) In wxPython setting a control location using pos=(x, y) is called _____.

absolute positioning

base positioning

grid positioning

relative positioning

2.) Consider the following class. Which method(s) are mutators?

class Counter :

    def getValue(self) :

        return self.value

    def click(self) :

        self.value = self.value + 1

    def unClick(self) :

        self.value = self.value - 1

    def reset(self) :

        self.value = 0

click, unClick and reset

Only reset

Only click and unClick

All four methods are mutators

3.) "If you want one class to acquire properties or methods from another class, an alternative to inheritance is called _____."

composition

accumulation

superposition

4.) In almost all cases we add wxPython user controls like textboxes, buttons, etc to a _____.

panel

rect

brick

box

5.) How do you access instance variables in a method?

Using the self reference

Using the constructor

Using a list

Using a constant

6.) How might you indicate a set of radio buttons are a group?

by seeing style = wx.RB_GROUP for the first radio button in the group

this cannot be done

by seeing style = wx.GROUP for any radio button in the group

by seeing style = wx.RB_GROUP for each and every radio button in the group

7.) With wxPython our overall parent window will be a child of the _____ class.

wx.Frame

wx.StaticText

wx.Window

wx.BigPanel

8.) Before invoking an instance method on an object, the object must have first been instantiated."

True

False

9.) Methods that allow a user to modify an object's state are called ____.

mutators

modifiers

writers

output methods

10.) A first step in creating a wxPython app is to bring the wxPython environment into existance using _____.

wx.App()

wx.Begin()

wx.Show()

wx.Fetch()

Explanation / Answer

1) grid positioning

2) click, unClick and reset

3) composition

4) box

5) Using the self reference

6) by seeing style = wx.RB_GROUP for the first radio button in the group

7) wx.Window

8) True

9) mutators

10) wx.Show()

**Comment for any further queries