Chapter 1 - COP 2800
Byte code files end with the ... file extension
.class
Source code files have a ... file extension
.java
A bit is either ...
1 = on 0 = off
Example of a machine language instruction ...
1011010000000101
A line is ...
A tool to organize and fine code. *
Programmers must continuously perform the following ...
Analyze. Experiment. Correct. Redesign.
Java programs can be of two types ...
Applications or Applets
Multitasking is being ...
Capable of running multiple programs at once.
Major hardware components are...
Central Processing Unit (CPU). Main memory. Secondary storage device. Input and Output devices.
CPU consists of two parts...
Control Unit -> Coordinates the computer's operations Arithmetic and Logic Unit (ALU) -> Performs mathematical operations
RAM contains ...
Currently running programs. Data used by those programs.
Common Secondary Storage
Disk drive Solid-state drive USB drive Optical devices CD/DVD
Other possible input devices (when data is read from them)
Disk drives Optical drives USB drives
Other possible output devices (when data is being sent to them)
Disk drives USB drives CD/DVD
The CPU's job is to...
Fetch instructions -> Follow instructions -> and produce some resulting data.
Computer Programmers ...
Implement programs that perform these functions
Byte code instructions are the machine language of the ... and cannot be executed directly by the CPU.
Java Virtual Machine (JVM)
`HotJava` was a ...
Java enabled web browser
Keywords are lower case because ...
Java is a case sensitive language
A program is made of ...
Key Words Operators Punctuation Programmer-Defined Names Syntax
Common input devices are...
Keyboard Mouse Scanner Digital Camera
Data in a Java program is stored in ...
Memory
Common output devices ...
Monitors Printers
What was Java first named?
Oak
The two classifications of software are ...
Operating Systems Application Software
Output is sent to the outside world using ...
Output Devices
Hardware
Physical pieces of the computer.
... means that a program may be written on one type of computer and then run on a wide variety of computers, with little or no modification.
Portable
Java
Powerful language that runs on practically every type of computer. Can be used for large or small applications. Small applications are called applets that are part of a Web site.
Computers are versatile because they can be ...
Programmed
Programs rarely work the first time they are ...
Programmed
Punctuation
Required by most programming languages. Used to signify beginning or end of something as well as separate list items.
Syntax
Rules to follow when writing a program. Syntax dictates how key words and operators may be used, and where punctuation symbols must appear.
Applets are ...
Small applications that require the use of a Java enabled web browser to run. (Enhanced security model since the user merely goes to a web page and the applet runs itself)
Computers are tools that can be programmed to perform many functions, such as:
Spreadsheets Databases Word Processing Games Etc.
Common application software includes ...
Spreadsheets Word processors Accounting software Tax software Games
Applications are ...
Stand-alone programs that run without the aid of a web browser. (Ran with relaxed security model since the user runs the program locally)
Operators
Symbols or words that perform operations on one or more operands.
Aspects of a computer program that must be designed:
The logical flow of the instructions. The mathematical procedures. The layout of the programming statements. The appearance of the screens. The way information is presented to the user. The program's "user friendliness". Manuals, help systems, and/or other forms of written documentation.
Multitasking Operating Systems include ...
UNIX Linux & Modern versions of... Windows Mac OS
Programmer-Defined Names
Used to identify storage locations in memory and parts of the program that are created by the programmer. Often called identifiers.
JVMs exist on many platforms such as ...
Windows Mac Linux Unix BSD Etc.
Key Words
Words that have special meaning in the programming language. They can only be used for their intended purpose. Also called `reserved words`
A statement is ...
a complete Java instruction that causes the computer to perform an action.
Application software provides ...
a more specialized type of environment for the user to work in.
Software is...
a program that runs on a computer.
Keywords cannot be used as ...
a programmer-defined identifier.
A program is ...
a sequence of instructions stored in the computer's memory in order to perform a task
An Operating System is ...
a set of programs that manages the computer's hardware devices and controls their processes.
An algorithm is ...
a set of well defined steps for performing a task or solving a problem.
A programming language is ...
a special language used to write computer programs
Each byte in memory is assigned a unique number known as...
address
Collectively, the instructions in a computer program are form an ...
algorithm
Input is ...
any data the computer collects from the outside world.
Output is ...
any data the computer sends to the outside world.
Machine language is written using ...
binary numbers
A byte consists of eight ... that may be either ... or ...
bits ; on ; off
The Java compiler translate a Java source file into a file that contains ... instructions.
byte code
Ram is divided into units called ...
bytes
The bits form a pattern that represents a ...
character or number
Syntax errors that may be in the program will be discovered during ...
compilation
A ... is a program that translates source code into an executable form.
compiler
Java is ... meaning that it can run on various computer operating systems.
cross paltform
Programming languages were invented to ...
ease the task of programming
The JVM is a program that ... a micro-processor.
emulates
Semi-colons are used to ...
end Java statements. (However, not all lines of a Java program end a statement)
Most compilers translate source code into ... files containing ...
executable files ; machine code ;
The CPU performs ...
fetch / decode / execute cycle
The computer collects input from ...
input devices
Java is often referred to as an ... language
interpreted
JVM is often called an ...
interpreter
A computer needs the algorithm to be written in ...
machine language
Each CPU has its own ...
machine language
The binary numbers are encoded as a ...
machine language
Variable names represent a location in ...
memory
Most modern operating systems are...
multitasking
Secondary storage devices are ...
non-volatile (capable of storing information for longer periods of time)
Variables are created by the programmer who assigns it a ...
programmer-defined identifier
Applications software refers to ...
programs that make the computer useful to the user.
Java (previously Oak) was developed to ...
provide a language that would run on various devices.
Example keywords ...
public class static void
Part of learning Java is to learn where to properly use ...
punctuations
Main Memory
random-access memory (RAM)
The steps in an algorithm are performed ...
sequentially
A computer program is ...
set of instructions that enable the computer to solve a problem or perform a task
Programmers use ... to translate a programming language to machine language.
software
Statements written by a programmer for a program is called the ...
source code
Programming languages have strict rules known as ...
syntax
... are mistakes that the programmer has made that violate the rules of the programming language.
syntax errors
A ... is used to edit and save a Java source code file.
text editor
[CPU] Fetch
the CPU's control unit fetches, from main memory, the next instruction in the sequence of program instructions. (Fetches the next instruction from the program)
Java byte code runs on ... and not on any particular CPU.
the JVM (making compiled Java programs highly portable)
[CPU] Decode
the instruction is encoded in the form of a number. The control unit decodes the instruction and generates an electronic signal. (Turns the 1's and 0's into electrical signal)
[CPU] Execute
the signal is routed to the appropriate component of the computer (such as the ALU, a disk drive, or some other device). The signal causes the component to perform an operation. (Sends the electrical signal to the component to perform operation)
Computers multitask by ...
time sharing: dividing the hardware resources and the attention of the CPU among all the executing programs.
The compiler creates another file that holds the ...
translated instructions
A program can be written in a programming language and ...
translated into machine language
The binary numbering system only has ... digits ( ... and ... )
two digits (base 2) ; 0 and 1;
An operand is ...
usually an item of data, such as a number.
RAM is volatile, which means ...
when the computer is turned off, the contents of the RAM are erased.