Create your own awesome maps

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account?
Log In

Java by Mind Map: Java
5.0 stars - 5 reviews range from 0 to 5

Java

BlueJ

Chapter 3

To open a project, select Open from the Project menu.

To create an object, select a constructor from the class popup menu.

To execute a method, select it from the object popup menu.

To edit the source of a class, double-click its class icon.

To compile a class, click the Compile button in the editor. To compile a project, click the Compile button in the project window.

To get help for a compiler error message, click the question mark next to the error message.

Chapter 4

Object inspection allows some simple debugging by showing an object’s internal state.

An object can be passed as a parameter to a method call by clicking on the object icon.

Chapter 5

To create a project, select New... from the Project menu

To create a class, click the New Class button and specify the class name.

To create an arrow, click the arrow button and drag the arrow in the diagram, or just write the source code in the editor

To remove a class or an arrow, select the remove function from its popup menu.

Chapter 6: Code Pad

To start using the code pad, select Show Code Pad from the View menu. (CTRL-E)

To evaluate Java expressions, just type them into the code pad.

To transfer objects from the code pad to the object bench, drag the small object icon.

To inspect result objects in the code pad, double-click the small object icon.

Statements that are typed into the code pad are executed

Use shift-Enter at the end of a line to enter multi-line statements.

Local variables can be used in single, multi-line statements. The names of objects on the object bench serve as instance fields.

Use up-arrow and down-arrow keys to make use of the input history.

Chapter 7: Debugging

To set a breakpoint, click in the breakpoint area to the left of the text in the editor.

To single-step through your code, use the Step and Step Into buttons in the debugger.

Inspecting variables is easy – they are automatically displayed in the debugger.

Halt and Terminate can be used to halt an execution temporarily or permanently.

Chapter 8: Stand-alone applications

To create a stand-alone application, use Project - Create Jar File...

Chapter 9: Creating applets

To run an applet, select Run Applet from the applet’s popup menu.

To create an applet, click the New Class button and select Applet as the class type.

Chapter 10: Other operations

Non-BlueJ packages can be opened with the Project: Open Non BlueJ... command.

Classes can be copied into a project from outside by using the Add Class from File... command.

Static methods can be called from the class's popup menu.

To generate documentation for a project, select Project Documentation from the Tools menu.

The Java standard class API can be viewed by selecting Help - Java Class Libraries.

To create objects from library classes, use Tools – Use Library Class.

Java itself

The Java Environment

Java Runtime Engine

Java Software Development Kit

Command line use, Path, CLASSPATH, javac, java

Java notes

Other features, import, packages, Java API, Jar files, Creating Jar Files, Javadoc, Exception handling, Applications vs. Applets vs. Servlets

Additional topics, Programming style, Debugging, Unit testing, Stepwise Development, Swing (GUI package), Packages, Classpath, Compiler, Path

Solid-line points to superclass, Superclass is more general, Parent, "is-a", "inherits from"

Dashed line points to the class of a data member, "has-a", "uses", always come from top or bottom and point to a side

Only subclasses of an abstract class can have instances, example: pets

BlueJ lets you test classes before the application is complete

document icon is README.TXT for project

structure above, instances below, "object bench"

Everything is an Object

Editor window has code and documentation views, Properly formatted comments generate documentation

Striped classes are not yet compiled

Inspector can view but not change

When we add lines between classes, how is each affected?

code pad, literals, object bench items, drag results to object bench

camelCase

Classes

Abstract Classes

Interfaces

Static variables and methods

Superclasses and Subclasses

Nested Classes, Anonymous Classes

Access, public, private, protected

Methods

Basic programming structures

Variables

Declarations

Primitive types, int, double, boolean, char, less common, float, long, short, byte

Objects, String, Array

Assignments

"new" operator

Blocks

Looping

for

while

do ... while

Conditional execution

if / then / else

switch / case

OO: Head First p. 32

Basics

Abstraction

Encapsulation, setters and getters

Polymorphism

Inheritance, Superclasses and Subclasses

Principles

Encapsulate what varies

Favor composition over inheritance

Program to interfaces, not implementations

Strive for loosely-couples designs between objects that interact

Classes: extendable but not modifiable

Patterns

Strategy

Decorator

Observer

Factory

Singleton

Model / View / Controller

Computational Thinking and Creating

Concepts

Sequences: series of steps

Loops: make the same thing happen multiple times

Parallelism: make multiple things happen at once

Events: one thing causes another to happen

Conditionals: make decisions based on conditions

Operators: math and logical expressions

Variables: storing and updating information

Lists: organize a collection of items

How can these concepts be taught without tying new students to a particular implementation?

Practices

incremental / iterative: do a little; try it out; do some more

testing / debugging: make sure things work; fix mistakes

re-using / re-mixing: build on what you or other have done

abstracting / modularizing: build a larger thing with smaller parts

Perspectives

expressing: I can create

connecting: I can do more when I, create with others, create for others

questioning: I can ask questions to make sense of the world (and how it works)

Expectations

There is no homework as such, but I strongly encourage you to get Greenfoot running and start using at home so that I can help you with any problems that may come up. I want you to be completely comfortable with it at home by the time this class is over.

I expect each of you to have a notebook or section of a notebook dedicated to this class. What notes you take about what I have to say is completely up to you, but I expect you to write something each week about what you are doing in class.