IFSM247P – Introduction to PowerBuilder Programming

QUIZ #1

 

 

True of False

 

1.       PowerBuilder can only produce multi-tiered, distributed applications.

 

 

2.       PowerBuilder can’t produce 16 bit software for Windows 3.1.

 

 

3.       PowerBuilder is available for AIX, Solaris, HP/UX, and Macintosh.

 

 

4.       A PowerBuilder application must have a window object.

 

 

5.       The message box function returns a value based on which button a user selects.

 

 

6.        For counter = 1 to len(slepassword.text) is a valid way to begin a for loop

 

 

7.       The datetime variable type is used for inserting date and time values into a database.

 

 

8.        A Boolean variable can return the values (0, 1, TRUE, false).

 

 

9.        All PowerBuilder objects have properties, events, and functions.

 

 

10.    IsValid(wwindowname) is used to check if a window is already open

 

 

 

Multiple Choice – circle ALL correct answers (there are likely to be more than one)

 

11.   Which of the phrases can be used to describe the PowerBuilder development tool:

a.       data aware

b.       low level language

c.       object oriented

d.       event driven

 

12.   Which of the following are true about PBL files.

a.       they are created by the project painter

b.       they are binary files

c.       the contents can be easily dumped to a printer

d.       they contain all of the objects that make up the application

e.       they contain only the PowerScript code associated with an application

 


13.   The single most powerful feature of PowerBuilder is:

a.       the DataWindow

b.       the context sensitive help

c.       the Project Builder

d.       the Application Object

 

14.   PowerBuilder objects always have the following:

a.       events

b.       functions

c.       global scope

d.       properties

 

15.   If you wanted to use native database drivers to connect to a database, and create a multi-tiered distributed PowerBuilder application, which version of PowerBuilder would you use:

a.       Enterprise

b.       Professional

c.       Desktop

 

16.   Which of the following are valid ways of noting comments in PowerBuilder?

a.       beep(1)  // this adds a comment to the end of a line

b.       // this is a single line comment

c.       ! this is a single line comment !

d.       /*
if you want to comment multiple lines
you should comment like this
*/

 

17.   Which of the following characters allows you to continue a code statement on the next line?

a.       +

b.       ^

c.       !

d.       &

 

 

18.   Which of the following is true about assigning a value to a variable

a.       any variable can be assigned a value as part of the declaration

b.       any variable can be designated as a constant

c.       an instance variable in one window can be modified in another window

d.       only global variables can be assigned when they are declared

 

 

19.   Which of the following pairings of variable types and values are valid?

a.       (Boolean, False)

b.       (Int, 40,000)

c.       (Double, 2.45)

d.       (Long, 2,000,000,000)

 

 

20.   Which of the following are valid variable names?      

a.       1variablename

b.       variable name 1

c.       $totaldollarvalue

d.       percent%

 


21.   I can set the variable of a string named mystring using which of the following statements:

a.       mystring = “some text”

b.       set my string equal to “some text”

c.       mystring.text = “some text”

d.       mystring = sletextfield.text

 

22.   Which event must contain script to run an application:

a.       Application open

b.       Window open

c.       Application close

d.       Window close

 

 

 

Matching – Match the PowerBuilder Painter with its function

 

23.    Application Painter                 a. Track down and fix programming errors

 

 

24.    DataWindow Painter         b. Create menus that will be attached to some/all windows

 

 

25.    Data Pipeline Painter            c. Create, edit, and activate database connection profiles

 

 

26.    Debugger                        d.  Copy data from one database to another

 

 

27.    Function Painter                 e.  Utility for creating and managing PowerBuilder libraries

 

 

28.    Help Painter                 f.   Used to create executables

 

 

29.    Library Painter                 g.  Used to create application objects

 

 

30.    Menu Painter                 h.  Provides developer with context sensitive help

 

 

31.    Project Painter                 i.  Creates objects that encapsulate data access and  manipulation



32.   Window Painter            j.  Where developer declares and codes procedures callable  throughout the application

 

33.    Database Painter                 k.  Create windows and add controls using a graphical interface