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
Q

Interpreter vs. Compiler

Task:
Analyzing source code:

A

Interpreter is faster than Compiler

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

Interpreter vs. Compiler

Task:
Executing code

A

Compiler is faster than Interpreter

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

Interpreter vs. Compiler

Task:
Using memory

A

Compiler is faster than Interpreter

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

Interpreter vs. Compiler

Task:
Debugging

A

Interpreter is easier than Compiler

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

When does the interpreter generate an error code?

A

when it gets to a line that is written incorrectly

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

When does the compiler generate an error code?

A

After it reads the entire code

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

What are the three types of interpreted languages to be familiar with?

A

Markup language

Scripting language

Scripted language

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

Markup language:

A

is a language that programmers can use to annotate text to tell the computer how to process or manipulate the text.

33
Q

What do you need to create a markup language?

A

a codified set of rules telling the processor what to do with the marked-up text when it encounters it

34
Q

What is the most common application of markup language?

A

the creation of web pages

35
Q

Hypertext Markup Language (HTML):

A

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
Q

Bold penguin using tags

A

<b> penguin </b>

37
Q

Scripting languages:

A

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
Q

Bourne again shell (Bash):

A

one of the earlier common scripting languages

39
Q

What are some advantages to using scripting language?

A

can get more down with less code

supports the use of objects, variables, and functions

40
Q

What are the most popular scripting languages?

A

JavaScript (JS)

Visual Basic (VB)

Script

PHP

Perl

Python

41
Q

Scripted language:

A

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
Q

What are some common scripted languages?

A

Lua

Lisp

43
Q

Query language:

A

is specialized to ask questions

is designed to retrieve data from databases

44
Q

What are some common Query Languages?

A

Structured Query Language (SQL)

Lightweight Directory Access Protocol (LDAP)

45
Q

Queries often follow a structure like:

A

Select

From

Where

46
Q

Structured Query Language (SQL):

A

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
Q

What is a programmer’s goal?

A

to get a computer to do what he or she wants it to do

48
Q

What is one way that programmers can simplify their work?

A

Reuse sections of code

49
Q

How are many programs like Frankenstein in nature?

A

Blocks of code perform specific tasks and the developer figures out how to stitch them all together into a finished product

50
Q

Programming logic:

A

refers to what the program does and includes topics such as logic components, data types, and identifiers

51
Q

What are the two main ways the programs perform logic?

A

Branching

Looping

52
Q

Common data types:

Char (Character)

A

one character, such as a UTF-16 or UTF-32 character

53
Q

Common data types:

String

A

Zero or more characters

54
Q

Common data types:

Integer

A

Whole number with no decimal point

55
Q

Common data types:

Floats

A

Any number with a decimal place

56
Q

Common data types:

Boolean

A

A true of false condition, usually represented by a 1 (true) or 0 (false)

57
Q

Constant:

A

a set or predefined number

58
Q

Variable:

A

number that can change

59
Q

Branching logic:

A

used to compare variables and constants to other variables and constants and can be used across different data types

60
Q

Boolean output:

A

used to determine the path that the program takes

61
Q

Looping logic:

A

used for monitoring a state within a program, and then invoking an action when that state changes

62
Q

What is at the center of looping?

A

a while statement

63
Q

Flowchart:

A

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
Q

Pseudocode:

A

a fake code used for comments

65
Q

What are two types of containers?

A

Arrays

Vectors

66
Q

Arrays:

A

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
Q

Vector:

A

holds a list of values

elements don’t need to be the same data type

can shrink or grow as the program requires

68
Q

Functions:

A

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
Q

Objects:

A

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
Q

Properties:

A

describes the characteristics of the object

71
Q

Attributes:

A

refers to additional information about an object

72
Q

How are properties and attributed used differently in coding?

A

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
Q

Object-Oriented Programming (OOP) languages are:

A

Java

C++

C#

Python

PHP

Perl

Ruby

74
Q

In most Object-Oriented Programming languages, objects consist of three things:

A

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
Q

Common data types example:

Character

A

A or a

76
Q

Common data types example:

String

A

“This is a string”

77
Q

Common data types example:

Integer

A

5 or 500000

78
Q

Common data types example:

Floats

A

5.2 or 5.000001

79
Q

Common data types example:

Boolean

A

1 (true) or 0 (false)