1.2 & 1.3 Flashcards

1
Q

is an object for sending output to the screen.

A

System.out

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

is a method to print whatever is in parentheses to the screen.

A

println

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

the object performs an action when you _____ or _____ one of its methods.

A

invoke or call

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

the person who interacts with the program is called…

A

the user

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

T or F: A java program consists of one or more classes, which must be compiled before running the program

A

true

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

T or F: you need to compile classes that accompany Java (e.g. System and Scanner)

A

false, do not need to compile

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

Each class should be in a seperate file and ending with _____

A

.java

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

T or F: the name of the file doesn’t have to be the same as of the class

A

F, it has to be the same.

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

IDE is short for

A

integrated development enviroment

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

What is a IDE?

A

it is used to combine a text editor with commands for compiling and running java programs.

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

T or F: after the java program is compiles, the byte-code version of the program will have a different name.

A

false, it will have the same name, but the ending is changed from .java to .class

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

T or F: A java program can involve any number of classes.

A

true

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

A java program can involve any number of classes, but the class to run will contain the words….. somewhere in the file

A

public static void main(String[] args);

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

there are two kinds of java programs..

A

applications and applets

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

applications are meant to be run on…..

A

your computer

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

applets are meant to be run on…

A

the internet

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

T or F: Applets are regular programs.

A

F, they are little applications. Applications are regular programs.

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

T or F: Applets are not supported by many web browsers today.

A

true, as they are in favor of HTML5 and JavaScript.
they are also deprecated by Oracle.

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

A _______ is a library of classes that have been defined already.

A

package

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

Give an example of a package (library) and a class from the package

A

import java.util.Scanner;

-package: java.util

-class: Scanner

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

the items inside paranthesises are called ______ and provide the info needed by methods.

A

arguments

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

A ______ is something that can store data.

23
Q

An instruction to the computer is called a ______ it ends with a semicolon.

A

statement;

24
Q

the grammar rules for a programming language are called the ________ of the language.

25
What are the two known programming approaches?
the structured programming, and the object-oriented programming
26
T or F: the Object-Oriented programming is also known as modular programming.
F, the structured programming is also known as...
27
In the ________ programming, the problem is divided into smaller sub problems (______)
structured, modules
28
In structured programming, each sub-problem is then ________ and _______.
analyzed, solved
29
The solutions of all sub-problems, in structured programming, are then _______ to solve the overall problem.
combined
30
Pascal, C, and Fortran are examples of ____________ programming languages.
programming model languages (structured).
31
T or F: Java is an OOP language.
true
32
OOP is short for
object-oriented programming
33
In ____ language, the components (also called ____) of the problem are identified.
OOP, objects
34
In OOP, for each object, it identifies the relevant data and operations (also called________) to be performed on that data.
methods
35
In OOP, it defines the relationship betweeen each ______ and the other.
object
36
Examples of OOP languages.
C++ and Java.
37
T or F: programming is a creative process.
true
38
(OOP/Structured programming) treats a program as a collection of objects that interact by means of actions.
OOP
39
In OOP, the actions are called
methods
40
In OOP, the objects of the same kind have the same type and belong to the same _____.
class
41
T or F: In OOP, objects within a class have a common set of methods and the same kind of data, but each object cannot have it's own data values.
false, each object can have it's own data value
42
What are the three primary design principles in OOP?
encapsulation, polymorphism, inheritance.
43
An _______ describes the means of performing an action.
algorithm
44
T or F: Algorithms usually are expressed in english and pseudocode.
true
45
T or F: An algorithm is a set of instructions used to solve a problem
true
46
T or F: Most programs are created by combining components that exist already.
true
47
an error in a program is called a _____.
bug
48
eliminating errors is called _______
debugging
49
what are the three kinds of errors?
syntax error, run-time error, logic error
50
______ errors are errors that are detected when your program is running, but not during compilation.
runtime
51
example of a runtime error.
attempting to divide by 0
52
______ are errors that are not detected during compilation or while running, but which cause the program to produce incorrect results
logic errors
53
T or F: programs are not usually created entirely from scratch.
true.