Java Chapter 1
What are the 3 steps in writing object oriented programs?
1) Creating classes - which are blueprints for objects 2) Creating objects - Which are specific instances of those classes 3) Creating applications - that manipulate or use those objects
What three basic concepts need to be understood to understand OOP?
1) Encapsulation as it applies to classes as objects 2) Inheritance 3) Polymorphism
What is a logic error?
A command that allows a program to run, but which runs incorrectly (not how it was intended to be used)
What is the difference between a compiler or interpreter?
A compiler translates an entire program before executing them, Whereas an interpreter translates one program statement at a time, executing a statement as soon as it is translated.
What is jGRASP?
A development environment and source code editor.
What is a syntax error?
A misuse of the language, or incorrectly entering a command.
What is a method?
A self-contained block of program code that carries out some action, similar to a procedure in a procedural program. Ex: a program's GUI components might have methods for maximizing and minimizing them as well as determining their size. (verbs)
What is an object?
A specific, concrete instance of a class.
What is procedural programming?
A style of programming in which operations are executed one after another in sequence.
What is a Class?
A term that describes a group of objects with common properties.
What is Object-oriented programming?
An extension of procedural programming in which you take a slightly different approach to writing computer programs
What are the two types of programs you can write with Java?
Applets and Java Apps
What two major types of applications was OOP typically used for?
Computer Simulations and GUI's
What are the two types of Java Apps?
Console apps and Windowed apps
What is polymorphism?
Describes the feature of languages that allows the same word to be interpreted correctly in different situations based on the context.
True or False: It is much easier to correct logic errors than syntax errors.
False
True or False: A low-level programming language uses words easier to understand, like English vocab for commands.
False, a high-level does this
True or False: Java is less secure than other programming languages
False- it's actually more secure
What does architecturally neutral mean?
For Java, it's a feature that allows you to write programs that run on any platform.
What is creating an instance called?
Instantiation
What is a class definition?
It describes what attributes its objects will have and what those objects will be able to do.
What is encapsulation?
It refers to two closely related object oriented notions or The enclosure of data and methods within an object.
What does calling a procedure do?
It temporarily abandons the current logic so that the procedure's commands can execute.
What does a compiler or interpreter do?
It translates commands into machine language
What is JVM, and what does it stand for?
Java Virtual Machine - is a hypothetical (software-based) computer on which java runs.
Is a machine language a low-level or high-level programming language?
Low-level
What term do Java programmers usually call procedures?
Methods
What are 4 other names for procedures?
Modules Methods Functions Subroutines
What does OOP stand for?
Object-Oriented Programming
What are the two main approaches to writing programs?
Procedural programming and object-oriented programming
What is source code?
Programming statements written in a high-level programming language.
What are Applets?
Programs that are embedded in a Web page.
What is the first process of debugging a program?
Repairing all syntax errors.
What is a syntax?
Rules about how language elements are combined correctly to produce usable statements
What is a semantic error?
Similar to a logic error. Example: if you misspell a programming language word, you commit a syntax error, but if you use a correct word in the wrong context, you commit a semantic error.
What are Java Apps?
Stand alone programs.
What is inheritance?
The ability to create classes that share the attributes and methods of existing classes, but with more specific feautres.
What are attributes?
The characteristics that define an object; they are properties of the object.
What are procedures?
The individual operations used in a computer program grouped into logical units.
What is Machine Language or Machine Code?
The most basic set of instructions that a computer can execute
What are variables?
The named computer memory locations. They are called this because they hold values that might vary.
What is the "object's state"?
The object's attribute values
What are windowed apps?
They create a GUI with elements such as menus, toolbars, and dialog boxes.
What are console apps?
They support character or text output to a computer screeen.
True or False: A single procedural program often contains hundreds of variables and procedure calls.
True
True or False: Java is simpler to use than any other OOP language.
True
Is a low or high programming language easier to use?
high