REALbasic

Study Guide for Conditional Test

Name ______________________

1.      Name two REALbasic Built-in Controls.

 

2.      A property is a variable associated with a Built-in Control. In the following two statements, identify the properties and the methods.

g.forecolor = rgb(255,0,0)

g.drawline 30,20,30, 120

 

g.forecolor  is a ____________________    ( Property or a Method)

 

rgb(255,0,0)  is a ___________________________( Property or a Method)

 

g.drawline 30,20,30, 120 ___________________________( Property or a Method)

 

3.      Fill in the two empty  blanks of this dim statement

Dim _______ as _______________________

 

 

4.      What are the two Data types we use most often?

 

 

5.      What does the Dim statement do?

 

6.      Using full sentences explain why we use conditional statements in computer programming.

 

7.      List the four constructs that make up all computer programs.

 

a.       ____________________________

 

b.      _____________________________

 

c.       _____________________________

 

d.      ______________________________

 

 

8.      Based on the following REALbasic code what are the values in statictext1.text and statictext2.text? You are to assume that this code is correct.

Dim numOfClasses, grades as Integer

Dim studentName as String

Dim gradesTom, gradesJerry, gradesHarry as Integer

 

grades = 0

numOfClasses = 2

studentName = “Joe”

gradesTom = 80

gradesJerry = 100

gradesHarry = 50

  

 if (studentName = “Tom”) then

      grades = numOfClasses * gradesTom

elseif (studentName = "Jerry") then

            grades = numOfClasses * gradesJerry

 else

           grades = numOfClasses * gradesHarry

end if

 

statictext1.text = studentName

staticText2.text = str(grades)

 

statictext1.text_________________________________

statictext2.text___________________________________

 

9.      What is a file manager?

 

10.  Explain in words why we use the str() method in REALbasic?

 

 

11.  Explain in words why we use the val() method in REALbasic?

 

12.  Explain the purpose of the = operator?

13.  Write correct or incorrect next to the follow five statements based on the two Dim statements.

dim myName as string

dim thisYear as integer

 

myName = "Ryan" _____________________________

 

thisYear= 2008        _____________________________

 

myName = 2008  ______________________________

 

myName = thisYear ____________________________

 

yourName = "Reader" __________________________

14.  Name two operators other than the = sign.

 

15.  Why do we sometimes quote strings and sometimes do not.

 

16.  Explain why an editfield is not explicitly Dim-ed by the programmer.

 

17.  Why do programmers use comments in their code?

 

18.  In the program Rock, Paper and Scissors how did the Computer play the game.

 

19.  Explain the difference between the H – Network Drive and the C Drive.

 

20.  Which programming environments do you like more Game Maker or REALbasic and explain why.

 

21.  Why do computer-programming languages use variables.

 

22.  Explain why we enter most of our code in the Action method of the PushButton.

 

23.  What is the difference between a statictext field and an editfield?

 

24.  Where can you find REALbasic  language information.

 

25.  What is our next project?

 

 

26.  After what project will we be getting back to Game Maker?

 

 

27.  Which REALbasic project did you like the most?

 

28.  How do you put a title on a Window?

 

29.   Why do we use a combo-box in our calculator program? What special feature does it have?

 

30.  In Game Maker what is the difference between Events and Actions?