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
Q

What is syntax

A

Rules that describe how code should be structured

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

Dot notation refers to

A

The syntax of identifying and chaining together attributes or methods in OOP

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

Dot notation example

A

dog. age = 15

dog. bark();

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

Whats a statement

A

A single line of code terminated by a semicolon

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

What’s a block

A

INcludes multiple statements enclosed between curly braces

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

Methods require what to enclose statement parameters

A

( )

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

What must be used to enclose a string

A

Single quotes

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

Where do you open curly braces

A

on the line above the block

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

Two types of commenting

A

// AND /* */

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

Whats an operator

A

A symbol that performs an action on one or more arguments to product a result

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

3 types of operators

A

Math, logical, and comparsion

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

++

A

Increment by 1

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

A

Decrement by 1

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

Read a single equal sign as

A

is assigned the value of

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

Read double equal sign as

A

is equal to the value of

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

&& Logical AND

A

TRUE && TRUE = TRUE

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

|| Logical OR

A

TRUE || FALSE = TRUE

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

! Logical NOT

A

TRUE && !FALSE = TRUE

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

Expression

A

a statement made up of variables and operators resulting in a single value

44
Q

If statements

A

allow you to execute code if a particular condition is met

45
Q

if-Then Example

A

if (bell.isRinging == true){
spot.bark();
}

46
Q

If-Then-else Example

A
if (bell.isRinging == true){
    spot.bark();
}  else  {
    spot.rest();
}
47
Q

Else-if Example

A
if(cmd.type == 'speak'){
   spot.bark();
}
else if (cmd.type == 'stay'){
    spot.rest();
}
48
Q

Whats a loop

A

A loop is used to run a block of code several times

49
Q

Apex loop statments include

A

For Loops, While Loops, Do-While Loops

50
Q

For looks are typically used when

A

the number of iterations is defined prior to entering the loop

51
Q

Apex supports three types of for loops

A

Tradtional for loops, list or set iteration for loops, SOQL for loops

52
Q

Traditional for loops contain how many statements

A

3

53
Q

When is the condition checked in the do-while loop

A

not until AFTER the first pass is executed

54
Q

When is the condition checked in the while loop

A

before the first pass

55
Q

A nest loop is?

A

A loop that occurs within another loop. Think ODOMETER

56
Q

How are methods named?

A

camel case

57
Q

Primitives

A

Basic building blocks that are built into a language and cannot be broken down

58
Q

Composites

A

Non-primitive data types that are built from other data types

59
Q

Composites are

A

collections of primitives

60
Q

Null

A

The absence of any value. A placeholder signifying that no value exists

61
Q

Is null different from zero or an empty string

A

Yes

62
Q

Variables are created with what initial value

A

NULL unless they are initialized

63
Q

Null Pointer Exception

A

A program referenced something without a value

64
Q

Declare a primitive with an initialized value

A

Boolean dogAwake = false; | Primitive datatype variable name

65
Q

Declare a primitive variable without a value

A

Boolean dogAwake;

66
Q

Primitive Numeric data types

A

Integer, Long, Double, Decimal

67
Q

Primitive Calendar Data

A

Date, Time, DateTime

68
Q

What’s a string?

A

Text data that can be any sequence of characters

69
Q

How do you used reserved characters in strings

A

Precede them using a backslash \

String petstore = ‘Marc\s Pet World’

70
Q

What’s an enum

A

Is an enumerated list, similar to a picklist, where one must choose from a pre-defined site of values

71
Q

How do you declare an enum

A

Enum PetType {Dog, Cat, Fish, Bird}

72
Q

What is a blob

A

A blob is used to store data as a collection of binary data

73
Q

What is an ID

A

It’s a special primitive data type unique to the force.com Platform

74
Q

Is the 15-char ID case sensitive

A

Yes

75
Q

Is the 18-char ID case sensitive

A

NO

76
Q

What is a composite data type

A

Any data type that is not a primitive data type

77
Q

In Apex, composite data types include

A

sObjects, Collection data types, User or System Supplied Apex Classes

78
Q

Composite data types must be declared using?

A

The new keyword and a special method of the same name as the data type called a constructor

79
Q

What’s the syntax for composite

A

CompositeDataType variableName = new CompositeDataType();

80
Q

What do the sObject composite data types represent?

A

sObjects in the Force.com database

81
Q

What does a variable of an sObject represent

A

a single row of data in that sObject

82
Q

How can initial field values be specified for sObjects

A

Using name value pairs

83
Q

What are the three different types of collections in Apex?

A

Lists, Sets, Maps

84
Q

What is a list

A

An ordered collection of primitive or composite data types distinguished by its index

85
Q

What is a set

A

An unordered collection of unique data

86
Q

What is a map

A

An unordered collection of unique keys that map to single values

87
Q

Each element in a list contains two pieces of information?

A

An Index (integer) and a value (Data)

88
Q

List for loops do what?

A

Iterate over all of the elements in a list one by one with the help of an iteration variable

89
Q

Lists and maps can be up to how many levels deep?

A

5

90
Q

Maps are often used to map what?

A

IDs to sObjects

91
Q

An object oriented programming language uses

A

Classes, objects, modularity, inheritance, encapsulation

92
Q

Classes model what?

A

real world ideals and consist of attributes and methods

93
Q

Classes are where you define

A

attributes(nouns or adjectives) and methods (verbs)

94
Q

Attributes describe?

A

properties

95
Q

Methods describe?

A

Behavior

96
Q

Class code syntax includes?

A

Access modifier, keyword class, unique class name, code block surrounded by curly braces

97
Q

Can the class store attribute data or perform method actions

A

No, but it defines what objects created from the class can do

98
Q

New attributes must be?

A

Declared

99
Q

Attribute declaration includes

A

access modifier, data type, unique attribute name

100
Q

Attribute example

A

public String name = ‘Toby’

101
Q

Attributes can be?

A

Variables or Constants

102
Q

Variables hold?

A

Data that is modifiable

103
Q

Most attributes are?

A

Variables

104
Q

Example of a variable

A

Integer that holds the earth’s population

105
Q

Constants have what value?

A

a pre-defined, fixed value

106
Q

Example of constant

A

the area of the earth

107
Q

Variables allow developers

A

to write code without knowing exactly the data that will lie underneath