Chapter 6 Flashcards

1
Q

What are the four categories of programming languages?

A

Assembly

Compiled

Interpreted

Query

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

Assembly language:

A

developed in 1947 at the University of London

the lowest level of code

allows the developer to provide instructions directly to the hardware

is specific to processor architecture

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

What are assembly language’s advantages over higher-level languages?

A

It can be faster

used for direct hardware access such as in the BIOS, device drivers, and customized embedded systems

used for reverse engineering of code

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

Binary Notational System (base 2):

A

1s and 0s

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

Decimal Notational System (base 10):

A

the numbers 0 or through 9 are used

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

Binary Math:

1+1=?
10+1=?
11+1=?

A

10
11
100

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

Hexadecimal Notational System (base 16):

A

number 0-9 are used

letters A-F are used to represent numbers 10-15

F+1=10

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

American Standard Code for Information Interchange (ASCII, pronounced ask-e):

A

represent text and special characters on computers and telecommunications equipment

use seven bits to store information, which provides for only 128 characters

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

Unicode:

A

superset of ASCII

136,755 characters across 139 language scripts and several character sets

UTF-8 uses 8 bits and it identical to ASCII

UTF-16 uses 16 bits for 65,536 and is the most common standard in use today

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

What 2 things do you need to know when coding in assembly?

A

the version specific to the processor’s platform

how the processor codes will respond in protected and unprotected memory environments

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

What is the binary code to tell the processor to move data?

A

10110 followed by a 3-bit memory register identifier

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

MOV:

A

short for move

is a mnemonic to replace the binary or hex code

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

What section is after the semicolon on a line of code?

A

comments

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

What does the basic structure of a line of code contain?

A

processor instructions (do this)

directives (giving the processor specific ways of performing the task)

data

optional comments

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

Compiled Programming Language:

A

one that requires the use of a compiler to translate it into machine code

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

What are the three steps for creating and using a program using a compiled language?

A

Write the application in a programming language, such as Java or C++. This is called source code

Use a compiler to translate the source code into machine code. Most software development apps have a compiler

Execute the program file, which (in Windows) usually has an .exe extension

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

In the past what were the more common compiled languages?

A

Fortran

BASIC

Pascal

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

Currently what are the more common compiled languages?

A

Java

C

C++

C#

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

Compare Java code to assembly:

A

Java is a lot shorter

Java uses the { } brackets to indicate code blocks

use 2 slashes (//) to create comment section compared to semicolon

Java uses double quotes (“””) and assembly uses single quotes (‘’)

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

Compare C++ and Java:

A

both are derivatives of the C language

Both comments start with two slashes and braces are present to create blocks of code

both use a main function, double quotes for text, and a semicolon to end a statement

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

Interpreted Programming Language:

A

each line of code is read by an interpreter every time the program is executed

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

What do both an interpreter and a compiler do?

A

they take high-level source code and translate it into low-level machine code

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

Interpreter vs. Compiler

Task:
Translating source code

A

Interpreter translate one statement at a time

Compiler translates entire program at once

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

Interpreter vs. Compiler

Task:
Executing programs

A

Interpreter executes program by itself

Compiler creates an executable file (usually .exe)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Interpreter vs. Compiler Task: Analyzing source code:
Interpreter is faster than Compiler
26
Interpreter vs. Compiler Task: Executing code
Compiler is faster than Interpreter
27
Interpreter vs. Compiler Task: Using memory
Compiler is faster than Interpreter
28
Interpreter vs. Compiler Task: Debugging
Interpreter is easier than Compiler
29
When does the interpreter generate an error code?
when it gets to a line that is written incorrectly
30
When does the compiler generate an error code?
After it reads the entire code
31
What are the three types of interpreted languages to be familiar with?
Markup language Scripting language Scripted language
32
Markup language:
is a language that programmers can use to annotate text to tell the computer how to process or manipulate the text.
33
What do you need to create a markup language?
a codified set of rules telling the processor what to do with the marked-up text when it encounters it
34
What is the most common application of markup language?
the creation of web pages
35
Hypertext Markup Language (HTML):
the language in which most web pages are created allows web developers to format web pages pages are downloaded to a client and then processes by specialized software works by using tags to signify instructions for the browser
36
Bold penguin using tags
penguin
37
Scripting languages:
used for executing a list of tasks create a file that contains multiple actions to perform and then execute the file most common use is to execute tasks from within a web page written in HTML
38
Bourne again shell (Bash):
one of the earlier common scripting languages
39
What are some advantages to using scripting language?
can get more down with less code supports the use of objects, variables, and functions
40
What are the most popular scripting languages?
JavaScript (JS) Visual Basic (VB) Script PHP Perl Python
41
Scripted language:
needs a command interpreter to be built into the program often used to modify video games to add functionality above and beyond what the initial developers created- without altering the core of the game itself
42
What are some common scripted languages?
Lua Lisp
43
Query language:
is specialized to ask questions is designed to retrieve data from databases
44
What are some common Query Languages?
Structured Query Language (SQL) Lightweight Directory Access Protocol (LDAP)
45
Queries often follow a structure like:
Select From Where
46
Structured Query Language (SQL):
allows for insertion of data into tables, joining data from multiple tables, and several different types of operators, such as finding the minimum and maximum, counting, finding averages, and summing values
47
What is a programmer's goal?
to get a computer to do what he or she wants it to do
48
What is one way that programmers can simplify their work?
Reuse sections of code
49
How are many programs like Frankenstein in nature?
Blocks of code perform specific tasks and the developer figures out how to stitch them all together into a finished product
50
Programming logic:
refers to what the program does and includes topics such as logic components, data types, and identifiers
51
What are the two main ways the programs perform logic?
Branching Looping
52
Common data types: Char (Character)
one character, such as a UTF-16 or UTF-32 character
53
Common data types: String
Zero or more characters
54
Common data types: Integer
Whole number with no decimal point
55
Common data types: Floats
Any number with a decimal place
56
Common data types: Boolean
A true of false condition, usually represented by a 1 (true) or 0 (false)
57
Constant:
a set or predefined number
58
Variable:
number that can change
59
Branching logic:
used to compare variables and constants to other variables and constants and can be used across different data types
60
Boolean output:
used to determine the path that the program takes
61
Looping logic:
used for monitoring a state within a program, and then invoking an action when that state changes
62
What is at the center of looping?
a while statement
63
Flowchart:
a visual representation of a program that uses boxes to represent the logic created before the code is developed helps the developers visualize the flow of the program, making it easier to plan out the sections of code needed
64
Pseudocode:
a fake code used for comments
65
What are two types of containers?
Arrays Vectors
66
Arrays:
holds a list of values all elements in an array must be of the same data type is predefined in size and does not change
67
Vector:
holds a list of values elements don't need to be the same data type can shrink or grow as the program requires
68
Functions:
created to accomplish tasks generally designed to take input, transform it somehow, and deliver output starts at the beginning of the code block and finishes at the end, handing off to another process
69
Objects:
are collections of attributes, properties, and methods that can be queried or called upon to perform a task can be a variable, function, method, or data structure that can be referenced
70
Properties:
describes the characteristics of the object
71
Attributes:
refers to additional information about an object
72
How are properties and attributed used differently in coding?
Properties can be different data types Properties can be modified through code Attributes only have the data type of string and can't be changed
73
Object-Oriented Programming (OOP) languages are:
Java C++ C# Python PHP Perl Ruby
74
In most Object-Oriented Programming languages, objects consist of three things:
Identity, which is the name of the object State, which is represented by attributed and reflects properties of the object Behavior, which determines the response of the object and is represented by methods
75
Common data types example: Character
A or a
76
Common data types example: String
"This is a string"
77
Common data types example: Integer
5 or 500000
78
Common data types example: Floats
5.2 or 5.000001
79
Common data types example: Boolean
1 (true) or 0 (false)