chapter 1 Flashcards

(46 cards)

1
Q

What is Computer Program

A

Set of instructions that tell pc what to do

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

What is machience language

A

most basic circutry level language

low level programming language

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

What is high level language

A

programming language with reasonable vocab and terms

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

What is syntax

A

A specific set of rules for the language

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

program statement

A

Similar to English sentences

Commands to carry out program tasks

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

Compiler or interpreter

A

Translates language statements into machine code

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

Syntax error

A

Misuse of language rules

A misspelled programming language word

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

Debugging

A

Freeing program of all errors

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

Logic errors

A

Also called semantic errors
Incorrect order or procedure
The program may run but provide inaccurate output

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

Procedural programming

A

Sets of operations executed in sequence

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

Variables

A

Named computer memory locations that hold values

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

Procedures

A

Individual operations grouped into logical units

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

Object-oriented programs

A

Create classes
-Blueprints for an object
Create objects from classes
Create applications

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

what applications is object oriented programming most used for

A

Computer simulations
Graphical user interfaces (GUIs)
-Not all object-oriented programs are written to use a GUI

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

what differs object oriented programming from traditional procedural programming

A

Polymorphism
Inheritance
Encapsulation

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

Class

A

Describes objects with common properties
A definition
An instance

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

Attributes

A
Characteristics that define an object
Differentiate objects of the same class
The value of attributes is an object’s state
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Objects

A

Specific, concrete instances of a class

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

Method

A

A self-contained block of program code that carries out an action
Similar to a procedure

20
Q

Encapsulation

A

Conceals internal values and methods from outside sources
Provides security
Keeps data and methods safe from inadvertent changes

21
Q

Inheritance

A

An important feature of object-oriented programs
Classes share attributes and methods of existing classes but with more specific features
Helps you understand real-world objects

22
Q

Polymorphism

A

Means “many forms”

Allows the same word to be interpreted correctly in different situations based on context

23
Q

Java

A

Developed by Sun Microsystems
An object-oriented language
General-purpose
Advantages
-Security features
-Architecturally neutral
-Can be run on a wide variety of computers
-Does not execute instructions on the computer directly
-Runs on a hypothetical computer known as a Java Virtual Machine (JVM)

24
Q

Source code

A

Programming statements written in high-level programming language

25
Development environment
A set of tools used to write programs
26
Bytecode
Statements saved in a file | A binary program into which the Java compiler converts source code
27
Java interpreter
Checks bytecode and communicates with the operating system | Executes bytecode instructions line by line within the Java Virtual Machine
28
WORA
Write once, run anywhere
29
Console applications
Support character output
30
Windowed applications
Menus Toolbars Dialog boxes
31
Literal string
Will appear in output exactly as entered | Written between double quotation marks
32
Arguments
Pieces of information passed to a method
33
Method
Requires information to perform its task
34
System class
Refers to the standard output device for a system
35
What are the requirments for class identifiers
Must begin with one of the following: - Letter of the English alphabet - Non-English letter (such as α or π) - Underscore - Dollar sign - Cannot be a digit - Cant be a reserved Java word - cannot be true, false or null
36
Upper Camel casing (Pascal casing)
Each word of an identifier begins with uppercase letter - UnderGradStudent - InventoryItem
37
Access specifier
Defines how a class can be accessed
38
static
- A reserved keyword | - Means the method is accessible and usable even though no objects of the class exist
39
void
- Use in the main() method header - Does not indicate the main() method is empty - Indicates the main() method does not return a value when called - Does not mean that main() doesn’t produce output
40
how does a java class need to be saved
- Save the class in a file with exactly the same name and .java extension - For public classes, class name and filename must match exactly
41
compiling a java class
Compile the source code into bytecode Translate the bytecode into executable statements Using a Java interpreter Type javac First.java
42
Parsing
Compiler divides source code into meaningful portions
43
Logic error
The syntax is correct but incorrect results were produced when executed
44
Run-time error
Not detected until execution | Often difficult to find and resolve
45
comments
non executed statements used for documenting a program or for notes to yourself and or others Should include author, date, class' name and its function
46
Java API
``` Also called the Java class library Provides prewritten information about Java classes ```