Deck 3: Objects, Events, and Graphical User Interfaces
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/48
العب
ملء الشاشة (f)
Deck 3: Objects, Events, and Graphical User Interfaces
1
Until this century, most programming languages were procedural.
False
2
Object oriented languages such as FORTRAN, COBOL, Basic, Pascal, and C, focused on actions to be performed.
False
3
Object-oriented languages focus on the objects of programming, not just the actions performed on them.
True
4
In programming, objects have properties, which describe the object's characteristics.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
5
An object's properties are defined in the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
6
Methods are usually represented by modules or functions, which are run or "called" when needed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
7
Calling an object's method is sometimes described as sending a message to the object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
8
The computer creates an object in two steps: associating a class name with an object name and then calling the constructor method to prepare memory space for the object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
9
A constructor usually has the same name as the class and is called with the keyword var in an assignment statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
10
When you instantiate an object from a class, you give a name to this particular object so that your program can distinguish it from other objects you instantiate from the same class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
11
A class is like a blueprint; it is not the actual object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
12
In object-oriented programming, class definition files can be stored separately from programs that use them to instantiate objects, or class definitions can be combined with a program into one file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
13
In pseudocode, a constructor method starts with the keywords Constructor Method and ends with the keywords End While.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
14
Methods in class diagrams include the method name and data types as well as parameter names in parentheses to match any arguments the method needs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
15
Methods are usually nouns because they describe things.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
16
Variable names are usually verbs because they describe actions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
17
In JavaScript, a constructor needs to link an object to other functions so that methods are performed only on the object that calls them.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
18
A dynamic property has only one value for the whole class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
19
A static method can be called independently of a separate object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
20
Google developed the Disk Operating System (DOS) for IBM and IBM-compatible computers, which became known as PCs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
21
A form is created with HTML tags, not JavaScript code, in the <body> section of the HTML file with the <form> tag.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
22
Text boxes are a group of circular buttons, used to select one item from a group.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
23
You will need a <script> section in the body of an HTML file used to create a form.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
24
Text boxes are used for two purposes: to give the user a place to enter text and to give the programmer a label with text that can be changed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
25
With event-driven programming, users being asked predetermined questions in a specified order, they can decide what options to choose at any time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
26
A(n) ____ is an entity, something with a distinct existence.
A) class
B) object
C) function
D) parameter
A) class
B) object
C) function
D) parameter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
27
In programming, objects have ____, which define what the object can do or be made to do.
A) events
B) access modifiers
C) methods
D) parameters
A) events
B) access modifiers
C) methods
D) parameters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
28
A(n) ____ is the template or description a programmer uses to create an object.
A) class
B) access modifier
C) function
D) parameter
A) class
B) access modifier
C) function
D) parameter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
29
A(n) ____ method is called when an object is instantiated.
A) parameter
B) instance
C) constructor
D) static
A) parameter
B) instance
C) constructor
D) static
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
30
____ are variables that need to receive arguments.
A) Parameters
B) Objects
C) Properties
D) Modifiers
A) Parameters
B) Objects
C) Properties
D) Modifiers
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
31
The following constructor method has ____ parameters.
Constructor Method Account(String type, Numeric num,
String lName, String fName, Numeric bal)
AcctType = type
AcctNumber = num
LastName = lName
FirstName = fName
AcctBal = bal
End Method
A) two
B) three
C) four
D) five
Constructor Method Account(String type, Numeric num,
String lName, String fName, Numeric bal)
AcctType = type
AcctNumber = num
LastName = lName
FirstName = fName
AcctBal = bal
End Method
A) two
B) three
C) four
D) five
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
32
A(n) ____ is a UML diagram describing the makeup of a class.
A) screen form
B) class diagram
C) object
D) access modifier
A) screen form
B) class diagram
C) object
D) access modifier
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
33
A(n) ____ has a simple format, with three sections: name, properties, and methods.
A) screen form
B) class diagram
C) access modifier
D) graphical user interface
A) screen form
B) class diagram
C) access modifier
D) graphical user interface
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
34
Which of the following functions correctly returns the argument value times 10?
A) new timesTen(num) {var result = num * 10; return result;}
B) timesTen(num) {var result == num * 10; return result;}
C) function timesTen(num) {var result == num; return result;}
D) function timesTen(num) {var result = num * 10; return result;}
A) new timesTen(num) {var result = num * 10; return result;}
B) timesTen(num) {var result == num * 10; return result;}
C) function timesTen(num) {var result == num; return result;}
D) function timesTen(num) {var result = num * 10; return result;}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
35
Function definitions are placed in the ____ section of an HTML file.
A) <head>
B) <body>
C) <title>
D) <br>
A) <head>
B) <body>
C) <title>
D) <br>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
36
You create an object with the keyword ____.
A) input
B) prompt
C) new
D) var
A) input
B) prompt
C) new
D) var
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
37
Which of the following methods returns a value?
A) Method changeName(String lName, String fName)
LastName = lName
FirstName = fName
Display "The name has been changed to " + firstName + " " + lastName
End Method
B) Method displayInfo()
Display "Account #: " + acctNumber
Display "Account type: " + acctType
Display "Owner name: " + lastName + ", " + firstName
Display "Current balance: " + acctBal
End Method
C) Method withdraw(Numeric amt)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
D) Method inquire()
Return acctBal
End Method
A) Method changeName(String lName, String fName)
LastName = lName
FirstName = fName
Display "The name has been changed to " + firstName + " " + lastName
End Method
B) Method displayInfo()
Display "Account #: " + acctNumber
Display "Account type: " + acctType
Display "Owner name: " + lastName + ", " + firstName
Display "Current balance: " + acctBal
End Method
C) Method withdraw(Numeric amt)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
D) Method inquire()
Return acctBal
End Method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
38
Which of the following methods correctly withdraws an amount from a bank account?
A) Method withdraw(Numeric amt)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
B) Method withdraw(String amt)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
C) Method withdraw(Numeric amount)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
D) Method withdraw(String amount)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
A) Method withdraw(Numeric amt)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
B) Method withdraw(String amt)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
C) Method withdraw(Numeric amount)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
D) Method withdraw(String amount)
AcctBal = acctBal - amt
Display "The new balance is: $" + acctBal
End Method
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
39
The keywords Public and Private are used to allow and disallow access by other programs, so they are called ____.
A) access values
B) constructors
C) access modifiers
D) access prompts
A) access values
B) constructors
C) access modifiers
D) access prompts
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
40
In JavaScript, the ____ object refers to the Web page where the text in HTML documents and output from your JavaScript programs are displayed.
A) HTTP
B) document
C) UML
D) DNS
A) HTTP
B) document
C) UML
D) DNS
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
41
In JavaScript, the ____ object is instantiated automatically when an HTML file is opened in a Web browser, and it belongs to the Document Object Model (DOM).
A) UML
B) document
C) HTTP
D) DNS
A) UML
B) document
C) HTTP
D) DNS
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
42
Properties and methods belonging to each object instantiated from a class are known as ____.
A) instance properties and instance methods
B) validated properties and validated methods
C) compiled properties and compiled methods
D) interpreted properties and interpreted methods
A) instance properties and instance methods
B) validated properties and validated methods
C) compiled properties and compiled methods
D) interpreted properties and interpreted methods
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
43
Which of the following represents an HTML paragraph break?
A) var ES = "";
B) var PA = "<p />";
C) var BR = "<br />";
D) var NL = "\n";
A) var ES = "";
B) var PA = "<p />";
C) var BR = "<br />";
D) var NL = "\n";
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
44
The Math object includes the ____ method, which returns the value of the next highest whole number.
A) abs()
B) floor()
C) ceil()
D) max()
A) abs()
B) floor()
C) ceil()
D) max()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
45
The Math object includes the ____ method, which takes two arguments and returns the higher value.
A) abs()
B) floor()
C) ceil()
D) max()
A) abs()
B) floor()
C) ceil()
D) max()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
46
Which of the following tags creates a form with the name OrderForm?
A) <form name="OrderForm">
B) <form name="OrderForm" action="">
C) <form name=="OrderForm" action>
D) <form name=OrderForm action="">
A) <form name="OrderForm">
B) <form name="OrderForm" action="">
C) <form name=="OrderForm" action>
D) <form name=OrderForm action="">
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
47
Elements of a form - including buttons, text boxes, radio buttons, check boxes, and other graphical items used to interact with a program - are placed on a Web page with the ____ HTML tag.
A) <input>
B) <form>
C) <body>
D) <script>
A) <input>
B) <form>
C) <body>
D) <script>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
48
Which of the following functions assigns the current radio button's value to the nextColor variable?
A) displayName()
B) setImage()
C) setColor()
D) changeColor()
A) displayName()
B) setImage()
C) setColor()
D) changeColor()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck