using this powerpoint this powerpoint presentation assumes your computer science teacher has...

79

Upload: tiffany-mccarthy

Post on 18-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 2: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Using This PowerPointThis PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains the necessary files to install the JDK (Java Development Kit) and jGRASP.

Page 3: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 4: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

The Need for File ExtensionsIn this class, we will frequently be working with multiple files that have the same name, but have a different extension. See Java0408 below:

In the next several slides, there are 3 different sets of directions for showing file extensions:

1) Windows 72) Windows 83) Mac

Page 5: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 6: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Open any window.Click Organize.

Page 7: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

ClickFolder and search options.

Page 8: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click View

Page 9: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Remove this checkmark.

Page 10: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click OK.

Page 11: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Now, file extensions like .docx, .pptx, .exe, .java, .html, .bat and .class will show up.

Page 12: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 13: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Select Desktop.It is the tile in the lower-left corner.

Page 14: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Open any window and click View.

Page 15: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Check File name extensions.

Page 16: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 17: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Go to Finderand select Preferences.

Page 18: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Select the Advanced tab and checkShow all filename extensions.

Page 19: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 20: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Frequent JDK UpdatesThis PowerPoint presentation was created in August 2014.

At the time, the latest version of the JDK was Java Version 8 Update 11.

It is very likely that you will use a newer version of the JDK when you install.

There will only be a slight difference between the appearance of your screen and this presentation.

Page 21: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Open the appropriate folder:Windows or Mac.

Page 22: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Double Click the appropriate JDK.

For 32-bit Windows

For 64-bit Windows

For Mac

Page 23: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

How do I know if my Windowscomputer is 32-bit or 64-bit?

Right-click Computer and select Properties.

Look atSystemtype:

Page 24: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

NOTE: if you do not have a Computer icon on your desktop, you can also

right-click it in the Start Menu.

Page 25: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

In Windows, you will be asked for permission to install. Go ahead and “Allow” it.

The next few slides show the installation of JDK Version 8 Update 11 for a 32-bit Windows platform.

The process is similar for all JDK versions and platforms.

Page 26: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 27: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 28: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 29: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 30: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 31: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 32: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 33: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Load your web browser.The message below may appear.If so, select Enable to allow Java

programs to execute in your browser.

Page 34: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 35: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Double Click the appropriate jGRASPfor your platform.

For Windows

For Mac

Page 36: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

As before, Windows will be asked for permission to install. “Allow” it again.

The next few slides show the installation of jGRASP Version 2 Update 15 for a Windows platform.

As with the JDK, the process is similar for all jGRASP versions and platforms.

Page 37: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 38: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 39: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 40: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 41: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 42: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 43: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 44: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 45: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 46: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Double Click the jGRASP icon.

Page 47: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

This window only shows up the first time.To avoid potential headaches

Don’t Allow this feature.

Page 48: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

If jGRASP informs you that a new updateis available, go ahead and accept it.

Page 49: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

This is the jGRASP IDE with no files loaded.

Page 50: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click Settings.Scroll to

Compiler Settingsand select

Workspace.

Page 51: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Select the Compiler tab followed by the HTML tab.

Page 52: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Highlight the code in this window and press

<Control>-<C>.

Page 53: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click here to remove the small square.

By doing this, we are indicating that we do NOT want the default

width and height.

Page 54: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

After you click the square the default code will vanish.

Click in the empty white space and

press <Control>-<V> to paste or

velcro the text you copied earlier.

Page 55: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Now change the width to 1000 and the height to 650.

Page 56: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

NOTE: If you were not able to copy and paste the text, then you need to manually type the

code above EXACTLY as it appears in the white box.

Page 57: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Select the Font tab.

Page 58: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Do NOT alter these Default values!

Page 59: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

If you have difficulty reading small textyou may alter these values:

Page 60: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

First, de-select these default boxes.

Page 61: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

With the boxes de-selected, you can make the text bigger. Do NOT make it smaller than 10.

When done, click Apply followed by OK.

Page 62: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 63: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click the Open File icon.

Page 64: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Browse to Programs02 or Programs02B.

Page 65: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Browse to Programs02 or Programs02B.

Page 66: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Browse to Programs02 or Programs02B.

Page 67: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Browse to Programs02 or Programs02B.

Page 68: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Open Java0201.java

Page 69: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Now Java0201.java is loaded in the Edit Window.

Page 70: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click this icon to see all of the files in the same folder as the loaded file.

Page 71: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

NOTE: Files can be loaded directly from this window.

Page 72: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click this icon to show the line numbers.Visible line numbers are very useful

when your program has errors.

Page 73: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains
Page 74: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click the green Plus Sign ( + )to compile the program.

Page 75: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

The message below indicates that the compiler is finished compiling.

The fact that there are no errors and the Java0201.class bytecode file has been created indicates the compiling was successful.

Page 76: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

NOTE: You will not see the .class file in the File Window unless this is set to All Files.

Page 77: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

Click the red Running Man icon to “run” or execute the program.

Page 78: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

For some programs, you may have to drag the border between the top and bottom windows up to see the entire output.

Page 79: Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains

NOTE: Now that both the JDK and jGRASP are installed, and we have an understanding of how to function in jGRASP, we now wish to focus on the actual Java programs. A GUI display like this might look nice, but only a small part of the screen is devoted to the program. GUI displays also take up considerable memory and are not at all practical for a textbook with hundreds of examples. A different format will be used to view all remaining programs in both the textbook and the PowerPoint slides.