1/86
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Variables
Named memory locations holding varying contents over time.
Constants
Values that do not change during program execution.
Data Types
Classifications describing values, storage, and operations on data items.
Numeric Data
Consists of numbers, possibly with decimals or signs.
String Data
Nonnumeric data items used in text processing.
Unnamed Constants
Values without identifiers like variables.
Declaration
Statement specifying data type, identifier, and optionally, initial value for a variable.
Type-Safety
Feature in some languages preventing incorrect data type assignments.
Identifier
Name chosen by the programmer for a program component.
Type-Specific Variables
Variables intended for numeric or string data.
Variable
Named memory locations holding changing values for calculations.
String Constants
Alphanumeric values enclosed in quotation marks.
Numeric Constants
Numbers that remain constant during program execution.
Memory Storage
Location where data items are stored for processing.
Data Type Classification
Description of values, storage, and operations for a data item.
Variable Declaration
is a statement that reserves a named memory location and includes a data type, an identifier, an optional assignment operator and assigned value, and an ending semicolon.
Type-Safe Languages
Languages preventing incorrect data type assignments.
Identifier Naming Rules
Guidelines for creating names for program components.
Type-Safe Data Assignment
Assigning data items to variables of correct data type.
Variable Identifier
Name associated with a specific memory address in a program.
Variable Declaration Components
These are components that include data type, identifier, and optional initial value in a variable statement.
Numeric Variable
Variable intended to hold numerical values for arithmetic operations.
String Variable
Variable holding text and special characters, not intended for arithmetic operations.
Reserved Keywords
Words not allowed as variable names due to language syntax
Variable Name Length
Limits vary; newer languages often allow virtually unlimited lengths
Case Sensitivity
Identifiers differ based on case in modern languages
Variable Naming Conventions
Consistent naming improves program readability
Variable Naming Rules
1. One word only, 2. Starts with a letter, 3. Meaningful
Identifier Clarity
Descriptive names aid program comprehension and maintenance
Variables
are named memory locations
Assignment Operator
Symbol for assigning values; always operates from right to left, which means that it has right-associativity or right-to-left associativity
Binary Operator
Requires two operands for operation
Lvalue
Result to the left of an assignment operator; always a memory address
Initializing Variables
Assigning a starting value to a declared variable
Garbage Value
Unknown value in an uninitialized variable
Named Constant
Values assigned once and remain constant throughout the program
Named Constant
A constant variable with a recognizable identifier and unchangeable value
Magic Number
An unnamed constant with unclear purpose, like 0.06
Arithmetic Operators
Symbols used in programming to perform mathematical operations
Precedence
Order in which operations are carried out in an arithmetic statement
Associativity
Direction in which operations with the same precedence are evaluated
Integer Data Type
Numeric data type for whole numbers in programming
Floating-Point Data Type
Numeric data type for numbers with decimal places in programming
Unary Operator
Operator that requires only one operand
Literal
Directly written value in code, like 0.06
Program Translation
Process of converting code into machine language
Program Maintenance
Process of updating and managing a program over time
Machine Language
Low-level language directly understood by a computer
Expression
A combination of variables, operators, and values that represents a single result value.
Parentheses
Symbols used to group expressions and control the order of operations
Conversion
Process of changing data from one type to another
Logical Error
Error in program logic that causes unexpected behavior
Binary Number System
Number system with base 2, using 0s and 1s
Decimal Number System
Number system with base 10, using digits 0-9
Hexadecimal Number System
Number system with base 16, using digits 0-9 and A-F
Octal Number System
Number system with base 8, using digits 0-7
Bitwise Operator
Operator that performs operations on individual bits
Truncated
Decimal portion of the result is cut off
Modulo Operator
Returns the remainder after division of two integers
Even Number
Number with a remainder of 0 when divided by 2
Odd Number
Number with a remainder of 1 when divided by 2
Module
Smaller unit in programming, like subroutine or function
Abstraction
Process of focusing on important properties, ignoring details
Functional Decomposition
Breaking down a program into modules
Main Program
Executes modules by calling them
Modularization
Breaking down a program into modules
Abstraction
Enables focusing on important details, ignoring nonessential
High-Level Programming Languages
Uses English-like vocabulary, abstracting low-level details
ComputeFederalWithholdingTax()
Example of a module name for a payroll program
Reusability
Ability to use modules in multiple programs
Reliability
Assurance that a module functions correctly
Stand-Alone Modules
Functional components that can be used independently
Mainline Logic
Basic steps in the main program of a software
Module Header
Includes module identifier and necessary identifying information
Module Body
Contains all statements in the module
Return Statement
Marks the end of the module and identifies the point of control return
Module Naming
Follows rules similar to variable naming, often with parentheses
Chained Calls
Modules calling other modules in a sequence
Flowchart Symbol
Rectangle with a bar across the top used to call a module
Encapsulation
Containing instructions within a module
Functional Cohesion
Degree to which statements in a module contribute to the same task
Local Variables
Declared within a module and usable only within that module
Global Variables
Declared at the program level and known to the entire program
Housekeeping Tasks
Initial steps in a program like variable declarations and displaying instructions
Detail Loop Tasks
Core work of the program executed repeatedly for each set of input data
End-of-Job Tasks
Steps taken at the end of the program to finish the application