parts of a computer why use binary numbers? source code - assembly - machine code

Post on 25-Dec-2015

224 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Parts of a Computer

Why Use Binary Numbers?

Source Code - Assembly - Machine Code

Why Java?

Safety

The safety features of the Java language make it possible to run Java programs in a browser without fear that they might attack your computer. As an added benefit, these features also help you to learn the language faster. When you make an error that results in unsafe behavior, you receive an accurate error report.

Portability

The other benefit of Java is portability. The same Java program will run, without change, on Windows, UNIX, Linux, or Macintosh. In order to achieve portability, the Java compiler does not translate Java programs directly into CPU instructions. Instead, compiled Java programs contain instructions for the Java virtual machine, a program that simulates a real CPU. Portability is another benefit for the beginning student. You do not have to learn how to write programs for different platforms.

Java Versions

every Java program has a class

the program must have a main method

A Java Program

A Java Program

programming languages use reserve words that have special meaning and cannot be used for other purposes

the programmer names the program and decides what it should do

this line tells the computer where to display the message later, we will learn some other options for displaying messages

Another Java Program

line numbers are used in book to help with descriptions of programsbook uses a different style to define program blocks

Another Java Program

Computers can "Do the Math"

Steps in the Development of a Java Program

JVM1

JVM2

JVM3

JVMn

:

One Bytecode, Many JVM's

Java Source CodeText Editor

FileAccess

Program I/O - Compiler Messages

jGraspIntegrated Development Environment (IDE)

There is a different configuration of the Java Virtual Machine (JVM)for every platform (type of computer) and Operating System (OS)

this computer

that computer

mobile device

the other computer

Installing NetBeans

The NetBeans Integrated Development Environment (IDE) is available at the NetBeans Web site: https://netbeans.org/downloads/7.1/

If the Java Development Kit (JDK) is not already installed on your computer, you will need to download and install it as well. The JDK is available on the Oracle Web site:

The Standard Edition (SE) is preferred for both NetBeans and the JDK.

http://www.oracle.com/technetwork/java/javase/downloads/

https://netbeans.org/downloads/7.1/

http://www.oracle.com/technetwork/java/javase/downloads/

don't forget to acceptthe license agreement

For Windows OS...

32-bit computers use x86 version

64-bit computers use x64 version

NetBeans IDE 7.4

New Project

Project Name

Writing the Source Code

Installing jGrasp

http://www.jgrasp.org/

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Starting jGrasp

Quick StartOpen - Compile - Run

A New Editor Window in jGrasp

Creating and Saving a Java Program

The Encode / Debug Cycle

Summary

A Textbook for Two Courses

Parts of a Computer

Why Computers use binary numbers.

Source Code, Assembly, and Machine Code

Structure of a Java Program

Java Program Development

Bytecode and the JVM

Installing and Using jGrasp

Encoding and Debugging

top related