Please enable JavaScript.
Coggle requires JavaScript to display documents.
Creating Java Programs (Features of the Java Programming Language (Java…
Creating Java Programs
Learning Programming Terminology
Computer Programs
Machine Language
Low-, High-level Programming Language
Program Statements
Features of the Java Programming Language
Java was developed as an object-orientated language
Java Virtual Machine (JVM) hypothetical computer that runs Java
Source code - High-level written program statements
Development Enviroment - set of tools to help the user write programs.
Java Interpreter - Communicates with the operating system
Applets - Web page embedded programs
Java Applications
Console Apps - supports character or text output to a screen
Windowed Apps - creates GUI with various elements etc.
Comparing Procedural and Object-Oriented
Procedural
Operations are executed in a sequence
Variables - Named computer memory locations
Procedures - individual operations logically
Object
Extension of procedural programming
Creates classes
Creates objects
Creates applications
Programming Concepts
Understanding Classes, Objects, and Encapsulation
Class - a term that describes a group of objects
Attributes - are the characteristics that define a object (properties)
Object - is a specific, concrete instance
Encapsulation - enclosure of of data and methods within an object, refers to the concealment of an object's data and methods
Understanding Inheritance and Polymorphism
Inheritance - Ability to create classes that share attributes and methods
Polymorphism - describes the feature of languages that allows the same word or symbol to interpreted correctly
Analyzing a Java Application that Produces the Output
Understanding the Statement that produces the Output
Literal string - characters displayed exactly as written
Arguments - Info sent into a method
Understanding first class
Identifier - Defines a java class
Pascal Casing - Style that joins words where each word starts with uppercase letters
Access specifier - Defines the circumstances under which a class can be accessed
Whitespace - combination of non printing characters
Understanding the main () method
static - method is accessible and usable
void - indicates that the main method doesn't return any value when it is called
Compiling a Java Class and Correcting Syntax Errors
Must compile the class your wrote ( source code into bytecode)
Must use Java interpreter to translate the bytecode into executable statements
Adding Comments to a Java Class
Comments - non executing statements added to program for documentation
Line comments (//)
Block comments (/
) (
/)
Javadoc (/
*) (
/)
Running a Java Application and Correcting Logic Errors
Modifying a Compiled Java Class
Correcting Logic Errors
Creating a Java Application that Produces GUI Output
Dialog box - a GUI object resembling a window in which messages are placed to be displayed
import statement - used to access a built-in java class that is contained in a group of classes called Package