Computer programming test 1

studied byStudied by 1 person
0.0(0)
get a hint
hint

The location in memory that a byte resides at is called

1 / 46

Tags and Description

47 Terms

1

The location in memory that a byte resides at is called

address

New cards
2

When speaking about computer systems, how many categories of memory are there?:

2, main and auxiliary

New cards
3

Blank are tangible components of a computer

hardware and software

New cards
4

Blank is the program that’s purpose is to manage computer hardware and execute other programs

Application program

New cards
5

Which type of language is typically the input to a compiler?

High level language

New cards
6

Every statement in java ends with

semicolon ;

New cards
7

What is an error in a program called?

bug

New cards
8

What is eliminating errors called?

debugging

New cards
9

What are the 3 kinds of errors?

syntax, runtime, logic

New cards
10

What is a syntax error

grammatical error

New cards
11

What is a runtime error

Errors that are detected when your program is \n running, but not during compilation

New cards
12

Example of a runtime error

attempting to divide by 0

New cards
13

What is a logic error

Errors that are not detected during compilation or \n while running, but which cause the program to \n produce incorrect results

New cards
14

What is an algorithim

a set of instructions for solving a \n problem.

New cards
15

What is an inheritance for in java?

Used to organize classes, A class at lower levels inherits all the \n characteristics of classes above it in the hierarchy

New cards
16

What are actions?

methods

New cards
17

What do objects that have the same type and same kind belong to

same class

New cards
18

What can objects perform

actions

New cards
19

When a Java program is compiled, the byte-code \n version of the program has the same name, but the \n ending is changed to what?

.java → .class

New cards
20

How do you print something on the screen?

System.out.println (““)

New cards
21

What is a variable?

something that can store data

New cards
22

What is a statement;

An instruction to the computer, ends in semicolon

New cards
23

What is a package

a library of classes that have been \n defined already

import java.util.Scanner;

New cards
24

What are two kinds of java programs

applications and \n applets

New cards
25

What is an interpreter

A program that translates each byte-code \n instruction, executing the resulting machine-language \n instructions on the particular computer before translating the \n next byte-code instruction.

New cards
26

What does a Java compiler translate a java program into?

byte code

New cards
27

What is byte code?

the machine language for a hypothetical computer (or \n interpreter) called the Java Virtual Machine

New cards
28

What is a operating system?

a supervisory program that \n oversees the operation of the computer

New cards
29

What input does a computer receive

program and data needed by program

New cards
30

What is a program

a set of instructions for a computer to \n follow

New cards
31

What do variables store?

Numbers and letters

New cards
32

Data stored by the variable is called

Its value

New cards
33

When you declare a variable you provide its

name and type

int numberOfBaskets,eggsPerBasket;

New cards
34

What does a variables type determine

what kinds of values it \n can hold (int, double, char, etc.)

Variable must be declared before it can be used

New cards
35

What is an identifier

a name, such as the name of a \n variable

may contain only \n • Letters \n • Digits (0 through 9) \n • The underscore character (_) \n • And the dollar sign symbol ($) which has a special \n meaning

New cards
36

What is uninitialized?

A variable that has been declared, but not yet given \n a value

New cards
37

What code is needed for a keyboard to be able to input?

Scanner keyboard = new Scanner(System.in);

New cards
38

What can parantheses do?

can communicate the order in which \n arithmetic operations are performed \n •examples: \n (cost + tax) * discount \n (cost + (tax * discount)

New cards
39

What code is at the beginning of code for a keyboard scanner?

import java.util.Scanner;

New cards
40

How can you write a comment

/

/***

/**

New cards
41

What does a loop statement do

repeats an action until a stopping \n condition occurs

New cards
42

What is an if-else statement

A branching statement that chooses between two \n possible actions

if (Boolean_Expression) \n Statement_1 \n else \n Statement_2

New cards
43

The value of a boolean expression is

either true \n or false

\n •Examplestime < limit \n balance <= 0

New cards
44

Multi branch if else statement

if (score >= 90) \n grade = 'A'; \n else if ((score >= 80) && (score < 90)) \n grade = 'B'; \n else if ((score >= 70) && (score < 80)) \n grade = 'C'; \n else if ((score >= 60) && (score < 70)) \n grade = 'D'; \n else \n grade = 'F';

New cards
45

How can a program be terminated

System.exit(0)

New cards
46

What is a switch statement

a mutltiway branch that \n makes a decision based on an integral (integer or \n character) expression

switch (Controlling_Expression) \n { \n case Case_Label: \n Statement(s); \n break; \n case Case_Label: \n ... \n default: \n ... \n }

New cards
47

Which are valid boolean expressions?

&&

<=

||

New cards

Explore top notes

note Note
studied byStudied by 3937 people
Updated ... ago
4.9 Stars(11)
note Note
studied byStudied by 38 people
Updated ... ago
4.0 Stars(2)
note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 94 people
Updated ... ago
4.8 Stars(5)
note Note
studied byStudied by 48 people
Updated ... ago
4.0 Stars(3)
note Note
studied byStudied by 21 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 14 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 16 people
Updated ... ago
4.0 Stars(1)

Explore top flashcards

flashcards Flashcard55 terms
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard198 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard100 terms
studied byStudied by 113 people
Updated ... ago
5.0 Stars(3)
flashcards Flashcard137 terms
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard126 terms
studied byStudied by 209 people
Updated ... ago
4.0 Stars(14)
flashcards Flashcard126 terms
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard106 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard119 terms
studied byStudied by 38 people
Updated ... ago
5.0 Stars(2)