Chapter 1 Flashcards

1
Q

What are programs?

A

Set of instructions you write to tell a computer what to do

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

What are the two types of programs?

A

Application software = program that preforms a task for th euser
System software = program that manages the computer itself
Can be written in high level or low level programming language

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

What is a high level programming language?

A

Language that allows you to use a vocabulary of reasonable terms

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

What is a languages keywords?

A

A high-level languages specific, limited vocabulary

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

What is low level programming?

A
  • corresponds closely to the computers circuitry and not as easily read or understood
  • Must be customized for every type of machine in which a computer runs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is machine language?

A
  • Most basic circuitry-level language
  • Low-level programming language
  • All programs get translated into machine language
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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
8
Q

What are program statements?

A
  • Commands to carry out program tasks
  • Similar to English Sentences
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is source code?

A

Programing statements written in a high-level programming language

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

What is a compiler/intepreter?

A
  • Translate language statement from a high level language to machine language
  • Issue one or more error messages each time they encounter an invalid programing statement (eg invalid syntax)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a compiler?

A

Translates an entire program before executing any statements

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

What is a intepreter?

A

Translates one programming statement at a time

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

What is Debugging?

A

Freeing program of all errors/bugs

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

What are logic errors

A
  • Syntax is correct but incorrect results were produced when executed
  • Also called semantic errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a development enviorment?

A
  • Set of tools that help you write programs by providing features such as displaying a languages keywords in color
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is procedual programming?

A
  • Operations are executing one after another in sequence
  • Defines and uses named computer memory locations that hold values called variables
  • Individual operations used in a computer program are grouped into logical unitss called procedures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is object oriented programming?

A
  • Extention of procedual programming
  • Create classes
  • Create objects
  • Create applications that manipulate those objects
18
Q

What is a class?

A
  • A group or collection of objects with comon properties
19
Q

What is a class definition?

A
  • Describes what attributes its objcts have and what those objects will be able to do and defines methods their object can use
20
Q

What are attributes?

A

Characteristics that define an object, they are properties of the object

21
Q

What are methods?

A

Self contained block of program code that carries out some action

22
Q

What is an object?

A
  • Specific, concrete instance of a class
    – Attributes and methods are encapsulated into objects
23
Q

What are the two notions of encapsulation?

A

1.) Enclosure of data and methods within an object
- allows you to treat all of an objects methods and data as a single entity
2.) Concealment of an objects data and methods from outside sources
- provides security
- Keeps data and methods safe from inadvertent changes

24
Q

What is inheritance?

A

The ability to create classes that share the attributes and methods of existing classes, but with more specific features

25
Q

What is polymorphism?

A

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

26
Q

What is Java?

A
  • Object oriented language
  • Advantages: Security and versitile (runs on any operating system)
27
Q

How is java versitile?

A

Because it runs on a hypothetical computer known as the Java Virtual Machine (JVM)

28
Q

How is Java secure?

A

Due to its isolation from OS, it’s insulated from hardware which it is run on providing security

29
Q

What happens when you execute a Java program?

A
  • Java compiler converts the source code into a binary program of bytecode
  • A program called the Java interpreter then checks the bytecode and communicates with the operating system, executing the bytecode instructions line by line within the JVM
30
Q

What are the two types of Java applications?

A
  1. Console applications = support character or text output to a computer screen
  2. Windowed applications, create a gui with elements such as menus, toolbars, and dialog boxes
31
Q

What must an identifier begin with?

A
  • Letter of the english Alphabet
  • Non-english letter
  • Underscore
  • Dollar Sign
32
Q

What must an identifier only contain?

A
  • Letters
  • Digits
  • Underscores
  • Dollar signs
33
Q

What must an identifier cannot be?

A
  • A java reserved keyword
  • Be true, false, or null
  • Begin with a digit
34
Q

What is pascal casing?

A
  • Every word begins with an upper letter
  • Use for classes
35
Q

What is a compile-time error?

A
  • The compiler detects a violation of language rules
  • Refuses to translate the class to machine code
36
Q

What is parsing?

A

Computer divides source code into meaningful portions

37
Q

What is a run-time error?

A
  • Not detected until execution
  • Often difficult to find and resolve
38
Q

What are line comments?

A
  • Start with /* end with */
39
Q

What are block comments?

A
  • Start with /* and */
40
Q

What are Javadoc comments?

A
  • used to generate documentation
  • start with /** and end with */
41
Q

How do you import JOptionPane?

A

java.swing.JOptionPane

42
Q

How do you use JOptionPane?

A

JOptionPane.showmessagedialouge(null, “string here)”