ADM231 Flashcards

1
Q

Apex is

A

a cloud based, object oriented programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Classes

A

Blueprints used for creating objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Objects

A

Code is divided into objects that do work

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Attributes

A

Characteristics of a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Methods

A

The things that a class can do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Way to invoke apex

A

save, sending an email, anon blocks, web services, scheduled job, vf page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an sObject

A

A salesforce object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the Metadata API allow

A

access to salesforce metadata

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Two characteristics of the metadata API

A

View metadata using the force.com ide and create modify metadata by writing apex code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is metadata

A

refers to data that describes data. Custom object definitionss, page layouts, for your org

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Force.com platform metadata can be described as>

A

XML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does the force.com ide interact with the force.com platform?

A

Metadata API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What allows you to view the metadata and data for your org

A

The Schema Explorer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Anonymous blocks

A

are discrete sections of code run out of context

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Anonymous blocks is a good way to

A

Test sections of code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

System.debug()

A

a special method of the system class that you can add to your code to generate output when code is executed to provide feedback

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Is system.debug() considered testing?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Pascal Case

A

When first letter of each word is in uppercase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Camel Case

A

When first letter of the first word is in lowercase and subsequent words are capitalized

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Is Apex case sensititive?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Attribute names are typically written how

A

nouns and start with a lowercase letter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Constants are written?

A

All Capitalized and sometimes with an underscore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Methods use what case

A

Camel case. are typically verbs and followed by ()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Classes always start with?

A

Uppercase letter and followed by curly braces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is syntax
Rules that describe how code should be structured
26
Dot notation refers to
The syntax of identifying and chaining together attributes or methods in OOP
27
Dot notation example
dog. age = 15 | dog. bark();
28
Whats a statement
A single line of code terminated by a semicolon
29
What's a block
INcludes multiple statements enclosed between curly braces
30
Methods require what to enclose statement parameters
( )
31
What must be used to enclose a string
Single quotes
32
Where do you open curly braces
on the line above the block
33
Two types of commenting
// AND /* */
34
Whats an operator
A symbol that performs an action on one or more arguments to product a result
35
3 types of operators
Math, logical, and comparsion
36
++
Increment by 1
37
--
Decrement by 1
38
Read a single equal sign as
is assigned the value of
39
Read double equal sign as
is equal to the value of
40
&& Logical AND
TRUE && TRUE = TRUE
41
|| Logical OR
TRUE || FALSE = TRUE
42
! Logical NOT
TRUE && !FALSE = TRUE
43
Expression
a statement made up of variables and operators resulting in a single value
44
If statements
allow you to execute code if a particular condition is met
45
if-Then Example
if (bell.isRinging == true){ spot.bark(); }
46
If-Then-else Example
``` if (bell.isRinging == true){ spot.bark(); } else { spot.rest(); } ```
47
Else-if Example
``` if(cmd.type == 'speak'){ spot.bark(); } else if (cmd.type == 'stay'){ spot.rest(); } ```
48
Whats a loop
A loop is used to run a block of code several times
49
Apex loop statments include
For Loops, While Loops, Do-While Loops
50
For looks are typically used when
the number of iterations is defined prior to entering the loop
51
Apex supports three types of for loops
Tradtional for loops, list or set iteration for loops, SOQL for loops
52
Traditional for loops contain how many statements
3
53
When is the condition checked in the do-while loop
not until AFTER the first pass is executed
54
When is the condition checked in the while loop
before the first pass
55
A nest loop is?
A loop that occurs within another loop. Think ODOMETER
56
How are methods named?
camel case
57
Primitives
Basic building blocks that are built into a language and cannot be broken down
58
Composites
Non-primitive data types that are built from other data types
59
Composites are
collections of primitives
60
Null
The absence of any value. A placeholder signifying that no value exists
61
Is null different from zero or an empty string
Yes
62
Variables are created with what initial value
NULL unless they are initialized
63
Null Pointer Exception
A program referenced something without a value
64
Declare a primitive with an initialized value
Boolean dogAwake = false; | Primitive datatype variable name
65
Declare a primitive variable without a value
Boolean dogAwake;
66
Primitive Numeric data types
Integer, Long, Double, Decimal
67
Primitive Calendar Data
Date, Time, DateTime
68
What's a string?
Text data that can be any sequence of characters
69
How do you used reserved characters in strings
Precede them using a backslash \ | String petstore = 'Marc\s Pet World'
70
What's an enum
Is an enumerated list, similar to a picklist, where one must choose from a pre-defined site of values
71
How do you declare an enum
Enum PetType {Dog, Cat, Fish, Bird}
72
What is a blob
A blob is used to store data as a collection of binary data
73
What is an ID
It's a special primitive data type unique to the force.com Platform
74
Is the 15-char ID case sensitive
Yes
75
Is the 18-char ID case sensitive
NO
76
What is a composite data type
Any data type that is not a primitive data type
77
In Apex, composite data types include
sObjects, Collection data types, User or System Supplied Apex Classes
78
Composite data types must be declared using?
The new keyword and a special method of the same name as the data type called a constructor
79
What's the syntax for composite
CompositeDataType variableName = new CompositeDataType();
80
What do the sObject composite data types represent?
sObjects in the Force.com database
81
What does a variable of an sObject represent
a single row of data in that sObject
82
How can initial field values be specified for sObjects
Using name value pairs
83
What are the three different types of collections in Apex?
Lists, Sets, Maps
84
What is a list
An ordered collection of primitive or composite data types distinguished by its index
85
What is a set
An unordered collection of unique data
86
What is a map
An unordered collection of unique keys that map to single values
87
Each element in a list contains two pieces of information?
An Index (integer) and a value (Data)
88
List for loops do what?
Iterate over all of the elements in a list one by one with the help of an iteration variable
89
Lists and maps can be up to how many levels deep?
5
90
Maps are often used to map what?
IDs to sObjects
91
An object oriented programming language uses
Classes, objects, modularity, inheritance, encapsulation
92
Classes model what?
real world ideals and consist of attributes and methods
93
Classes are where you define
attributes(nouns or adjectives) and methods (verbs)
94
Attributes describe?
properties
95
Methods describe?
Behavior
96
Class code syntax includes?
Access modifier, keyword class, unique class name, code block surrounded by curly braces
97
Can the class store attribute data or perform method actions
No, but it defines what objects created from the class can do
98
New attributes must be?
Declared
99
Attribute declaration includes
access modifier, data type, unique attribute name
100
Attribute example
public String name = 'Toby'
101
Attributes can be?
Variables or Constants
102
Variables hold?
Data that is modifiable
103
Most attributes are?
Variables
104
Example of a variable
Integer that holds the earth's population
105
Constants have what value?
a pre-defined, fixed value
106
Example of constant
the area of the earth
107
Variables allow developers
to write code without knowing exactly the data that will lie underneath