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.

A

variable

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.

A

syntax

25
Q

What are the two known programming approaches?

A

the structured programming, and the object-oriented programming

26
Q

T or F: the Object-Oriented programming is also known as modular programming.

A

F, the structured programming is also known as…

27
Q

In the ________ programming, the problem is divided into smaller sub problems (______)

A

structured, modules

28
Q

In structured programming, each sub-problem is then ________ and _______.

A

analyzed, solved

29
Q

The solutions of all sub-problems, in structured programming, are then _______ to solve the overall problem.

A

combined

30
Q

Pascal, C, and Fortran are examples of ____________ programming languages.

A

programming model languages (structured).

31
Q

T or F: Java is an OOP language.

A

true

32
Q

OOP is short for

A

object-oriented programming

33
Q

In ____ language, the components (also called ____) of the problem are identified.

A

OOP, objects

34
Q

In OOP, for each object, it identifies the relevant data and operations (also called________) to be performed on that data.

A

methods

35
Q

In OOP, it defines the relationship betweeen each ______ and the other.

A

object

36
Q

Examples of OOP languages.

A

C++ and Java.

37
Q

T or F: programming is a creative process.

A

true

38
Q

(OOP/Structured programming) treats a program as a collection of objects that interact by means of actions.

A

OOP

39
Q

In OOP, the actions are called

A

methods

40
Q

In OOP, the objects of the same kind have the same type and belong to the same _____.

A

class

41
Q

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.

A

false, each object can have it’s own data value

42
Q

What are the three primary design principles in OOP?

A

encapsulation, polymorphism, inheritance.

43
Q

An _______ describes the means of performing an action.

A

algorithm

44
Q

T or F: Algorithms usually are expressed in english and pseudocode.

A

true

45
Q

T or F: An algorithm is a set of instructions used to solve a problem

A

true

46
Q

T or F: Most programs are created by combining components that exist already.

A

true

47
Q

an error in a program is called a _____.

A

bug

48
Q

eliminating errors is called _______

A

debugging

49
Q

what are the three kinds of errors?

A

syntax error, run-time error, logic error

50
Q

______ errors are errors that are detected when your program is running, but not during compilation.

A

runtime

51
Q

example of a runtime error.

A

attempting to divide by 0

52
Q

______ are errors that are not detected during compilation or while running, but which cause the program to produce incorrect results

A

logic errors

53
Q

T or F: programs are not usually created entirely from scratch.

A

true.