Docsity

Computer Science Fundamentals: Loops, Memory, Compilers, and Java, Quizzes of Computer Science

Toggle sidebar
bg1
TERM 1
Parts of A Loop
DEFINITION 1
initialization - assigning variables and starting loop... loop
test - a boolean test that determines if the loop will be
executed again... body- The useful part of the loop... update-
modification of the loop control to keep track of how many
times the loop has run
TERM 2
Difference between Main and Auxiliary
Memory
DEFINITION 2
Main Memory - Volatile (erases when you take away the
power), faster than auxiliary Secondary Memory - Hard drive
- slower, but saves your data when you cut the power. When
you have a document open in word and have not saved it, it
is in main memory. When you save it, however, is is copied
to auxiliary memory
TERM 3
Definition of a Loop
DEFINITION 3
repetitive action or a portion of a program that repeats a
statement or group of statements ** Remember that
variables defined within the loop header are not available
outside the loop**
TERM 4
Branch
DEFINITION 4
Chooses one action from one or more possible actions . Ex. If
(condition1) do (action1); If (condition2) do (action2)
TERM 5
Compiler
DEFINITION 5
A compiler is a computer program that transforms source
code (high level) into a lower level machine language. Ex.
Java -> Bytecode
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Computer Science Fundamentals: Loops, Memory, Compilers, and Java and more Quizzes Computer Science in PDF only on Docsity!

Parts of A Loop

initialization - assigning variables and starting loop... loop test - a boolean test that determines if the loop will be executed again... body- The useful part of the loop... update- modification of the loop control to keep track of how many times the loop has run TERM 2

Difference between Main and Auxiliary

Memory

DEFINITION 2 Main Memory - Volatile (erases when you take away the power), faster than auxiliary Secondary Memory - Hard drive

  • slower, but saves your data when you cut the power. When you have a document open in word and have not saved it, it is in main memory. When you save it, however, is is copied to auxiliary memory TERM 3

Definition of a Loop

DEFINITION 3 repetitive action or a portion of a program that repeats a statement or group of statements ** Remember that variables defined within the loop header are not available outside the loop** TERM 4

Branch

DEFINITION 4 Chooses one action from one or more possible actions. Ex. If (condition1) do (action1); If (condition2) do (action2) TERM 5

Compiler

DEFINITION 5 A compiler is a computer program that transforms source code (high level) into a lower level machine language. Ex. Java -> Bytecode

Interpreter

Executes a portion of high-level language code TERM 7

Difference between hardware and software

DEFINITION 7 Hardware are the physical components of the machine (i.e. Screen, motherboard, cd drive) Software are the instructions that run on the hardware. TERM 8

Class vs. Object

DEFINITION 8 A class is a framework for an object. Think of it as a set of plans for an object. An object is the particular instance of a class. TERM 9

While Loop vs. Do While loop

DEFINITION 9 A while loop may not execute a line of code if the loop condition is not met. A do...While loop is always executed once, and thereafter executed depending on the loop condition. TERM 10

Java vs. Bytecode vs. Machine Language

DEFINITION 10 Java -> [java compiler] -> bitecode ->Machine language (High level-------------------------------------------------------Low Level)

Byte

Arrangement of 8 bits. Several of these are used to store a particular character, string, number, etc. TERM 17

Assembly Language

DEFINITION 17 A language that the computer can directly understand TERM 18

Compiler

DEFINITION 18 Turns java text into bytecode TERM 19

Interpreter

DEFINITION 19 Turns java byte code into machine language TERM 20

Method

DEFINITION 20 Action performed by objects

Encapsulation

Information hiding-- Packages and hides the details of the program TERM 22

Polymorphism

DEFINITION 22 Allows the same program instruction to mean different things in different contexts. TERM 23

Inheritance

DEFINITION 23 A method of class organization that allows more specific methods to use the information form the more general methods TERM 24

Pseudocode

DEFINITION 24 Code that is written in the same logical structure of programming languages but uses the language language for the actual code. Used to express the idea of the program. TERM 25

Algorithm

DEFINITION 25 An effective method for solving a problem expressed as a finite sequence of instructions.

Variable

Used to store data such as numbers. Can be changed. TERM 32

int

DEFINITION 32 integer number - no decimals TERM 33

double

DEFINITION 33 number with two numbers after the decimal place. Ex. 2. or 6798. TERM 34

char

DEFINITION 34 a single character TERM 35

Primitive type variables

DEFINITION 35 Much simplier than an object, has no methods only a single value. Ex: int, char, String

identifier

technical term for a name of a data member TERM 37

initialization

DEFINITION 37 assigning a number to a variable TERM 38

"final" modifer

DEFINITION 38 marks a variable as unchangable TERM 39

Public Object

DEFINITION 39 can be called outside the class. SYNTAX: object.method TERM 40

Private Object

DEFINITION 40 Object that cannot be called up outside it's method.

Documentation (// and /**)

use // to comment out the rest of a line use /* to start a paragraph and */ to end it.