Java: Notes Chapter 1

¡Supera tus tareas y exámenes ahora con Quizwiz!

text editor

(computer science) an application that can be used to create and view and edit text files

operating system

(computer science) software that controls the execution of computer programs and may provide various services (UNIX, Linux, Mac OS, Windows are multitasking operating systems).

Major components of a computer

*CPU *main memory *secondary storage devices *input devices *output devices

2 parts of CPU

*control unit *arithmetic and logic unit (ALU)

Process a computer is engaged in when running a program.

*fetch *decode *execute cycle

CPU's job

*fetch instruction *follow the instructions *produce some resulting data

Features of a computer program

*logical flow of information *mathematical procedures *layout of the programming statements *appearance of the screens *how info is presented to user *user friendliness *manuals/help systems/written documentation

What do Java source files end with?

.java extension

List the 5 major components of a computer system

1. CPU 2. Main memory 3. Secondary Memory 4. input devices 5. output devices

Internally, the CPU consists of what two units?

1. Control Unit 2. Arithmetic and logic unit (ALU)

byte

8 bits, a byte has a unique number known as an address (ordered from lowest to hightest)

Why is a computer used by so many different people in so many different professions?

A computer can be programmed to fit the needs of the user.

input devices

A device used to provide information to a computer. A keyboard is an example of an input device. (mouse, scanner, digital camera, disk drives, optical drives, USB drives, etc)

USB drive

A flash memory storage device that plugs into a USB port or a computer or mobile device.

Describe the difference between a key word and a programmer-defined symbol.

A key word is a reserved word that is restricted for use for a specific purpose, while a programmer-defined symbol names a variable

What is a memory address?

A number that uniquely identifies a (memory) storage location.

What is the difference between a program line and a statement?

A program line is just a line in a program, while a statement is a complete instruction that takes up one or more lines.

Java Virtual Machine (JVM) (often called an interpreter)

A program that interprets Java byte codes and executes them.

compiler

A program that translates code in a high-level language (such as Java) to machine instructions (such as bytecode for the Java virtual machine).

C++

A programming language; takes C to an object-oriented level. (also from Bell Laboratories)

What is a runtime error?

A runtime error is an error that occurs while running the program. Runtime errors do not prevent an application from executing but cause it to produce incorrect results.

algorithm

A step-by-step procedure for solving a problem or performing a task (especially by a computer).

What is a syntax error?

A syntax error is the incorrect use of a programming language element, such as a keyword, operator, or programmer-defined name.

byte code

An intermediate language between source code and object code. Many modern languages first compile source code into byte code and then interpret the byte code with a program called a virtual machine.

Data hiding

An object's ability to hide its data from code that is outside the object. Only the object' methods may then directly access and make changes to the object's data. Outside code may access the object's methods that operate on the data. (the data is protected from accidental corruption).

Java

An object-oriented programming language designed specifically for programs (particularly multimedia) to be used over the Internet. Java allows programmers to create small programs or applications to enhance websites.

BASIC

Beginner's All-purpose Symbolic Instruction Code

What is byte code?

Bytecode is program code that has been compiled from source code into low-level code designed for a software interpreter. It may be executed by a virtual machine (such as a JVM) or further compiled into machine code, which is recognized by the processor.

C

C is a structured, general-purpose, procedural language developed at Bell Laboratories

object-oriented programming

Centered on creating objects-a software entity that contains data (attributes) and procedures (methods).

CPU

Central Processing Unit

encapsulation

Combining of data and code into a single object

Control Unit of CPU

Coordinates all of the computer's operations. Determines where to get the next instruction and regulates other major components of the computer with control signals.

Output devices

Devices that enable the computer to give the user the results of the processed data. (monitors, printers, disk drives, USB drives, CD recorders)

optical drives

Drives which are used for reading information on media discs such as CD's, DVD's and Blu-ray discs. Common drives include CD-ROM, DVD-ROM and Blu-Ray.

HTML

Hypertext Markup Language, a standardized system for tagging text files to achieve font, color, graphic, and hyperlink effects on World Wide Web pages. (does not have sophisticated abilities such as performing math calculations and interacting with a user)

IDE

Integrated Development Environment-consists of a text editor, compiler, debugger, and other utilities integrated into a package with a single set of menus.

What is JVM?

JVM is Java Virtual Machine a program that reads Java byte code instructions and executes them as they are read. (often called an interpreter)

JDK

Java Development Kit. A software development environment for writing applets and application in Java . (ex. Java SE, Java EE, Java ME)

Java ME

Java Micro Edition-provides small, highly optimized runtime environment for consumer products such as cell phones, pagers, and appliances.

Java SE

Java Standard Edition-provides all the essential software tools necessary for writing Java applications and applets

C#

Language invented by Microsoft for developing applications based on the Microsoft.NET platform

logical errors

Logical errors occur when a programmer uses a wrong strategy. To the computer, nothing is wrong with the syntax. The problem is that the instructions are just plain wrong.

Visual Basic

Object-oriented programming language used to create Windows applications.

syntax errors

Occur when the programmer does not follow the rules of the programming language.

FORTRAN

One of the original high level languages, short for Formula Translation, created by John Backus to make programming easier for math and science applications.

What are an object's methods?

Procedures or behaviors that an object performs.

PHP

Programming language used in websites - the bridge between the website and back end database

program

Provide a computer or other machine with coded instructions for the automatic performance of a particular task.

What is pseudocode?

Pseudocode is a cross between human language and a programming language. Although the computer can't understand pseudocode, programmers often find it helpful to plan an algorithm in a language that's almost a programming language but still very readable by humans.

What four item should you identify when defining what a program is to do?

Purpose, input, process, output

Why do computers have both main memory and secondary storage?

RAM (main memory) holds those items that the computer is currently working on, secondary storage is for long term storage.

applets

Small programs written in Java, which are downloaded as needed and executed within a Web page or browser.

application software

Software that performs some useful task such as word processing or playing a game for a user.

What is a compiler

Software that translates source program (similar to English) into a language that the computer can understand

Secondary storage

Storage that is remote to the CPU and permanently holds data, even when the PC is turned off, such as a hard drive.

Pascal

Structured, general-purpose , procedural language designed for teaching programming

Fetch

The CPU's control unit fetches, from main memory, the next instruction in the sequence of program instructions.

Main Memory (RAM-random access memory)

The computer's main memory is a device that holds information, specifically, RAM holds the sequences of instructions in the programs that are running and the data those programs are using

What are an object's attributes?

The data contained in an object

HotJava

The first Java-enabled Web browser

Decode

The instruction is encoded in the form of a number. The control unit decodes the instruction and generates an electronic signal.

machine language

The language made up of binary-coded instructions that is used directly by the computer

hardware

The physical components of a computer.

Execute

The signal is routed to the appropriate component of the computer (such as the ALU, a disk drive, or some other deice). The signal causes the component to perform an operation.

Syntax

Thee are rules that must be followed when writing a program. Syntax dictates how key words and operators may be used, and where punctutaion symbols must appear.

USB

Universal Serial Bus. A type of connection used to attach devices such as flash drives, scanners, cameras, and printers to a computer.

Programmer-Defined Names

Used to identify storage locations in memory and parts of the program that are created by the programmer.

What does it mean to "visualize a program running:? What is the value of such an activity?

When planning a program, this step helps to plan what procedures need to be in place in your program, how to make your program user friendly, and how to make sure that all the necessary steps are included.

Java EE

a collection of technologies and APIs for the Java platform designed to support "Enterprise Edition" Applications which can generally be classed as large-scale, distributed, transactional and highly-available applications designed to support mission-critical business requirements

statement

a complete instruction that causes the computer to perform some action. Statements can be a combination of key words, operators, and programmer-defined names. (can be one or more lines.

Portable

a program may be written on one type of computer and then run on a variety of computers with little or no modification. (ex. a compiled Java program may be run on any computer that has a JVM)

application

a stand-alone program that runs on your computer (word processors, spreadsheets, database managers, graphic programs. Although Java may be used to write these types of application, C, C++. and Visual Basic are also used)

Procedural Programming

a style of programming in which sets of operations are executed one after another in sequence

JavaScript

an object-oriented computer programming language commonly used to create interactive effects within web browsers.

Why are variables called "variables"?

because they vary depending on input

bit

binary digit-either 0 or 1 with 1 being the on position and 0 being the off position.

source code

contains instructions written by a programmer specifying the actions to be performed by computer software

In procedural programming, what two parts of a program are typically separated?

data and procedures

Describe the steps in the fetch/decode/execute cycle

fetch-CPU's control unit fetches from main memory, the next instruction in the sequence of program instruction Decode-instructions are encoded in the form of a number, the control unit decodes the instruction and generates an electronic signal Execute-signal is routed to component of the computer (ALU, disk drive, or other). Signal causes the component to perform an operation

executable files

files, such as applications, that contain instructions that can be executed from the computer

What is the purpose of a memory address

identifies the specific location of a piece of data

What happens to a variable's current contents when a new value is stored there?

it is replaced by the new value

punctuation

most programming languages require the use of punctuation characters. These characters serve specific purposes, such as marking the beginning or ending of a statement, or separating items in a list.

variables

names of memory locations that may hold data (named storage location in the computer's memory)

Python

object-oriented programming language used in both business and academia. Many popular Web sites contain features developed in Python.

2 types of software

operating system software and application software

What is the difference between operators and punctuation symbols.

operators run the code, while punctuation symbols group the code so it will run properly.

2 main methods of programming

procedural, object-oriented

What does the term multitasking mean?

running multiple programs at once

Ruby

simple but powerful object-oriented programming language. It can be used for a variety of purposes, from small utility programs to large Web applications.

program

software-set of instructions

operators

symbols or words that perform operations on one or more operands

Is a syntax error (such as misspelling a key word) found by the compiler or when the program is running?

the compiler

Describe what a compiler does with a program's source code.

the compiler checks for syntax errors and compiles the source code into executable code or to byte code.

Arithmetic and logic unit

the part of the CPU that performs arithmetic computations and logical operations.

What is the purpose of testing a program with sample data or input?

to test for any logic errors or any other errors that may be contained in the code. Basically to check your program for accuracy.

RAM

volatile memory that stores the running configuration and tables as generated by the device (RAM is erased when the computer is turned off).

Key words or reserved words

words that make up a high-level programming language (can't be used for anything else)

Perl

• A general-purpose programming language developed for text manipulation. • Used for web development, network programming, system administration, GUI development, other tasks • Widely used for web server programs to perform automatic tasks such as updating user accounts and newsgroup postings


Conjuntos de estudio relacionados

PHY :: c8 :: Az elektrosztatika, az atomok,elektronok, vezetők és szigetelők

View Set

Starting Out with Python, 3e Ch 11

View Set

Adaptive Quizzing - Integumentary System

View Set

Chapter 4: Health assessment Prep U

View Set