Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Organization, Eclipse Intro

Similar presentations


Presentation on theme: "Computer Organization, Eclipse Intro"— Presentation transcript:

1 Computer Organization, Eclipse Intro
CMSC 131 Object-Oriented Programming I Computer Organization, Eclipse Intro Dept of Computer Science University of Maryland College Park This material is based on material provided by Ben Bederson, Bonnie Dorr, Fawzi Emad, David Mount, Jan Plane

2 Software Overview Two levels  Operating System and Application
Operating system manages computer's resources; typically runs as soon as computer is turned on. Typical responsibilities: Process management Determines when, how programs will run on Memory management I/O, window system Security Applications  programs users interact directly with; usually are explicitly run. Examples: Word processors Games Music software Java Programs Etc Enough about hardware. Let's talk about software! SOFTWARE: 2 "levels" (operating system / applications) 1. operating system -- manages computer's resources. typically runs as soon as computer is turned on. * Process management -- determines which programs will run at what time and how much CPU time each gets * Memory management -- controls main memory and keeps programs from interfering with one another * I/O, window system, network control -- Programmers don't write this stuff from scratch. Programs we write call on the operating system to take care of the tricky details. * Security enforcement -- user ID's passwords, file security, etc. 2. Applications software: (anything else!) Word processors, games, spreadsheets, eclipse, everything

3 How Programs Are Executed
foo.exe CPU COPY Program “foo” initially stored in secondary storage Program copied into main memory CPU executes program instruction-by-instruction Program execution: programs are stored permanently in SECONDARY MEMORY. the instructions are stored in "machine code" -- binary numbers (Nobody writes programs in machine code -- we use other languages which are typically translated into machine code by a "compiler".) when you start up a program, it is copied (loaded) into PRIMARY MEMORY. Now the CPU starts executing the instructions in the program.

4 Compilers Computers can only execute machine code
Compilers are programs for translating programs (“source code”) into assembler / machine code compiler source asm/obj

5 Interpreters Another way to execute programs
Interpreters take source code as input Interpreters execute source directly Much slower than compiled programs Debuggers are based on interpreters Debuggers support step-by-step execution of source code Internal behavior of program can be closely inspected Common interpreter? Javascript is most common current interpreter Try these in browser bar: Javascript:a=3 javascript:a=3;b=a+2 Javascript:alert(“Hello”)

6 Object-Oriented Terminology
Procedural-oriented languages Programming centers around “actions” (verbs) Object Oriented Languages Centered around objects (nouns) Objects Principal entities that are manipulated by the program (nouns) Class A “blueprint”/recipe that defines the structure for one or more objects Method Java term for a “function”, a “procedure”, or a “subroutine” This is the code that does something (verbs) Why we prefer the object-oriented approach? One big reason: recycling

7 Tools for Writing Programs
Good old days  Text Editor  create source code files Compiler  generate executables from source Debugger  trace programs to find errors Cycle between editing, compiling, running, debugging Today, IDE (Integrated Development Environment) Editor, compiler, debugger, version control rolled in one IDE Examples Eclipse  Free!! What we will use Visual Studio Netbeans Others

8 Eclipse Fundamentals Eclipse IDE allow us to create, edit, compile, run, debug, programs Eclipse can be used for several languages; in this class Java Eclipse installation Eclipse tutorial

9 Eclipse Terminology Let’s run Eclipse
Workspace  folder/directory where your files are stored You can switch workspaces Projects Project  collection of related files Creating a program in Eclipse requires creating a project Let’s create a project

10 Eclipse Terminology Perspective
Framework for viewing/manipulation programs Three important perspectives Java  creating, running programs Debug  tracing, removing errors in programs CVS repository  accessing/managing project files Let’s change perspectives Resetting perspective Let’s create a program


Download ppt "Computer Organization, Eclipse Intro"

Similar presentations


Ads by Google