Shared Flashcard Set

Details

Java CS170 Chapter. 1
Terms and Test Questions
41
Computer Science
Undergraduate 1
08/31/2011

Additional Computer Science Flashcards

 


 

Cards

Term
Digital signals
Definition
represent information with a sequence of 0s and 1s.
Term

Which of the following is NOT an output device?


A.)  Printer

B.)  CPU

C.)  Speaker

D.)  Monitor

Definition

B.) CPU

 

CPU, the processor, is the "brains" inside your computer. The CPU interprets and carries out the basic instructions that operate the computer.

Term
When you write a list of instructions to carry out a particular task, you are _____________ a method.
Definition
defining
Term
Every Java statement:
Definition
Every statement ends with a semicolon. Statements do not have to fit on a single line, though. Blocks, which are enclosed in braces, are not statements (although some statements, like array initialization statements, do incorporate blocks).
Term
In Java, the mechanism that allows you to combine data and operations on the data into a single unit is called a(n) ____.
Definition
Term
To run a Java ____, you must use either a Web browser or an applet viewer.
Definition
applet
Term
If your Java source code program compiles and runs without displaying an error message, but the output is not what was expected, then your program has a:
Definition
Term
Java applets
Definition
are programs that run inside the context of a Web browser, usually downloaded from the Web. Applets run inside a "sandbox" that limits harmful side effects.
Term
Java applications
Definition
run on your local computer, using its JVM. Console applications use text input and output, while graphical (GUI) applications use windows, buttons and other interactor widgets.
Term
"What is an input device"?
Definition
An input device is a piece of hardware that's used for two purposes:

to enter data, such as the text in a letter, or the numbers in your checkbook.
to enter instructions for the computer to carry out; that is, to tell the computer what to do
Term
system unit
Definition
where the computer itself is usually located. Described as The box-like case containing the electronic components used to run programs and process data.
Term
The early high-level programming language designed around the notation of Lambda Calculus and used to develop early artificial intelligence programs was named ___________________.
Definition
LISP
Term
LISP
Definition
LISP uses notation derived from Lambda Calculus, and was the first of a family known as functional programming languages. LISP is still commonly used in the Computer Science specialization known as Artificial Intelligence.
Term
Algol
Definition
Algol (the Algorithmic Language) was the product of a committee of the "best-and-the-brightest" intent on producing a common numeric and scientific programming language that would not be tied to a particular vendor like FORTRAN.
Term
COBOL
Definition
Stands for "Common Business Oriented Language." More programs have been written in COBOL (in the last 40 years) than in any other language. COBOL was created by a committee called the Conference on Data System Languages (CODASYL). It was let by led by Joe Wegstein of NBS (now NIST), who was an early computer pioneer. The driving force behind COBOL, though, was Grace Hopper.
Term
FORTRAN
Definition
Developed by John Backus at IBM stands for the FORmula TRANslator language let engineers write programs using familiar notation. Beginning in 1954, FORTRAN also set the standard for estimating the length of a programming project, when Backus predicted it would be finished in six months. The first version was delivered in 1958.
Term
Here is a fragment of source-code for a computer program:

int main() {
cout << "Hello cruel world!" << endl;
}

This program is an example of ______________________.
Definition
high-level language
Term
Java is made up of three parts known as a Java platform. What are those three parts?
Definition
1) an object-oriented programming language. The Java language, like C++ or Smalltalk, can be supported on different runtime systems, like the Sun Virtual Machine, or even on Microsoft's .NET.

2) a cross-platform runtime system called the Java Virtual Machine or JVM. Modern JVMs almost all use a JIT or Just-In-Time compiler to convert Java's platform-neutral machine language (called bytecode) into native, high-performance machine code your specific hardware.

3) a set of universally distributed classes called the Java Class Libraries. These extensive class libraries provide support for GUI programming, network and file I/O, Web applications and a host of other features. You can think of these as pre-built parts that you can use to build your own programs.
Term
Java applets
Definition
are graphical Java programs that are "hosted" inside a Web page.

The compiled Java machine code (known as a .class file) for your program is stored on a Web server, much like an .gif or .jpg image file, or like a Flash animation file.
The code is automatically downloaded to the viewer's machine when a user visits a Web page that contains a reference to the applet (called an applet tag).
The user's Web browser starts running a Java Virtual Machine when it encounters a Java applet, and the JVM runs the applet inside the browser's JVM. This is similar to the way Flash/Shockwave animation, or other browser plug-ins, like QuickTime, are handled. The JVM browser plug-in is installed when you install the Java JRE (Java Runtime Environment). If you can see this applet, you already have a JRE installed, but if you don't, installing a JRE only takes a few minutes.
Term
Java applications
Definition
programs that are installed and run on the user's local machine, in the same way you would install and run a program written in Visual Basic or C++.
Term
How is Java different from other programming languages you might use, like Visual Basic, Pascal, or C++?
Definition
cross-platform binary portability.
Term
source code portability only works if:
Definition
there is a compiler or interpreter available on each platform
the program uses no platform-dependent facilities
Term
The acronym WORE means that the Java program you compile on your local machine should:
Definition
With WORE, you should be able to compile your Java program on a Mac and then run it, with no changes at all, on a Windows or Unix computer.
Term
When you create an identifier, the first character may be:
Definition
Term
All data must be brought into ____ before a program can manipulate it.
Definition
Term
Assembly Language
Definition
Assembly language is simply a one-for-one mnemonic replacement for machine language. Instead of entering the numbers 54 24 66 9C FE C2 84 92 into memory, the assembly language programmer can write something like this: LDX 24, [669C].
Term
eywords, (also sometimes called reserved words), are the built-in vocabulary of a language. Name two:
Definition
Both public and class are two of the fifty-or-so Java keywords.
Term
Which of these identifiers follows the Java conventions (not just the syntax rules) for a variable name?

a) total_cost
b)
c)
d)
Definition
Variables should start with a lower-case letter and embedded words should be capitalized.
Term
An identifier is a:
Definition
name that you make up to label classes, attributes, methods, and variables. You can use any name you like, as long as you follow a few simple rules:

you can use letters, digits, and the underscore character
your identifier cannot start with a digit
identifiers are case sensitive
you cannot use keywords as identifiers
Term
Runtime errors are errors that
Definition
cause your program to "crash" when it runs, usually displaying a nasty error message on the screen.
Term
Logic errors occur when
Definition
your program produces the wrong output; it may give the wrong answer or carry out an action at the wrong time, like giving you a "C" when your percentage grade in the class is exactly 80%. (This kind of logic error is called a fencepost error).
Term
The GUI is also responsible for
Definition
controlling the different ways you'll enter data, providing input widgets such as text fields, text areas, sliders and buttons, and for controlling the display of information, translating things like the plain text code that make up a Web page into the printed type and graphics that you see on the page in front of you.
Term
System software
Definition
is the software that "runs" your computer.
Term
shrink-wrap or horizontal-market is
Definition
"pre-packaged" software includes things like word processors, spreadsheets, database software, and presentation software.
Term
custom made or vertical-market software is
Definition
This might seem exotic, kind of like having custom-made shoes or shirts, but it's really very common; it's more like ordering dinner in a restaurant. Most applications software is this.
Term
Embedded software
Definition
is code that runs "behind the scenes", kind of like the operating system, on your mobile phone, your TV tuner, your music player, your automobile and maybe even your toaster. And with new platforms like the iPhone and Google's Android, this market will only get bigger.
Term
computer programmers
Definition
is Shrink-wrap software, custom software, applications programs, and operating systems.
Term
source code
Definition
hich contains instructions that the computer is able to follow.
Term
CPU itself into two main subsystems:
Definition
The Control Unit coordinates all of the operations of the CPU. When the CPU needs to "talk" to memory, for instance, the CU issues the commands to retrieve or store the necessary bytes or instructions.
When it comes to actual calculation or decision making, however, the CU turns that over to the Arithmetic-Logic Unit or ALU. All math, comparison, or logical operations are performed by the ALU.
Term
Machine cycle
Definition
begins by retrieving a machine language instruction from memory. Once the instruction is retrieved, or fetched, the program counter is automatically ratcheted forward to point to the next instruction in memory. This part of the cycle is called decoding the instruction. Ultimately, all programs involve arithmetic, logic, or comparisons at some point, and when one of those instructions arrive, the CU hands off the code to the ALU, which executes the instruction. Finally, once the ALU calculates a value, that value is normally stored back into memory. In the picture shown here, it looks like the ALU is responsible for writing the results back to memory, but that's not really correct. The Control Unit handles all reading and writing from memory.
Term
Debug has some serious limitations:
Definition
It does not permit the use of variable names
You can't use or see the 32-bit registers on your CPU
It doesn't let you edit existing programs.
Even more limiting, is that it only works on Windows and doesn't work at all on 64-bit Windows, which includes most of the machines you will own (including the new machines in the OCC Computing Center.
Supporting users have an ad free experience!