PATH 환경 변수에 메인 자바 디렉토리 밑에 있는 /bin 디렉토리(자바 바이너리 파일이 들어 있음)를 추가해야 한다. bin 디렉토리를 PATH 변수에 추가하면 된다. 그러면 명령행에서 "% javac" 명령을 입력했을 때 터미널에서 javac라는 자바 컴파일러를 바로 실행시킬 수 있다.
44p main method 메소드 : 컴퓨터로 하여금 어떤 일을 하게 만드는 모든 일반적인 지시사항을 담고 있다
코드 - 선언문/순환문/분기문
45p 표준 순환 구조 - while, do-while, for
순환문 while > 조건 테스트 > 부울 값 boolean ; 조건 테스트의 결과 ; true 또는 false > 비교 연산자(<, >, ==)를 이용하여 변수의 값을 확인함으로써 간단한 부울 테스트 가능 cf. == ; 동치 연산자 / = ; 대입 연산자 * 조건 테스트를 직접 할 수 있는 변수는 부울 변수 뿐. * 부울 테스트는 괄호 안에 들어간다. eg. while (x==4) { }
: 자바플랫폼의기반을이루며, 다양한하드웨어기반플랫폼에포팅porting 된다. 자바가상머신은기존의운영체제들또는웹브라우저등여러가지플랫폼에설치되어사용될수있으며, 사용자는자바바이트코드로컴파일된자바프로그램을실행시키기위해서이자바가상머신을이용하면된다.
자바가상머신은 JDK(Java Development Kit)에포함되어있을수도있고, 자바호환웹브라우저내에내장되어있을수도있으며, 또는자바칩과같이하드웨어에직접구현될수도있다.
Java Application Programming Interface = 자바 API
: 자바 API는운영체제에서제공해주는라이브러리와같은것으로, 자바프로그램을개발하기위해사용할수있는라이브러리또는클래스들이다. 자바 API는서로관련된클래스들을묶어서패키지단위로제공된다.
port
(v.) To move a program from one type of computer to
another. To port an application, you need to rewrite sections that are
machine dependent, and then recompile the program on the new computer.
Programs that can be ported easily are said to be portable.
portable
(adj.) (1) When used to describe hardware, portable means small and lightweight. A portable computer is a computer small enough to carry. Portable computers include notebook and subnotebook computers, hand-held computers, palmtops, and PDAs. (2) When used to describe software, portable means that
the software has the ability to run on a variety of computers. Portable
and machine independent mean the same thing—that the software does not depend on a particular type of hardware.
object-oriented design : A software design method that models the characteristics of abstract or real objects using classes and objects.
Object : a software bundle of related variables and methods. (Software objects are often used to model real-world objects you find in everyday life.) A software object can represent real-world objects and abstract concepts like an event. > what the software object knows is 'state' and what it can do is 'behavior'.
variable : an item of data named by an identifier. Each variable has a type, such as int or Object, and a scope 컴퓨터 프로그래밍 언어에서의 변수의 의미는, 컴퓨터 기억 장소를 가리키는 추상적인 표현방법입니다. 즉, 기억 장소의 주소를 상징화한 것입니다. 변수에 대한 정의가 아직까지 정확하게 이해되지 않는 분들이 많으시리라 생각됩니다. 다른 예에 빗대자면 이렇습니다. '동경 135˚, 북위 37.5˚'가 메모리 주소라면, '한국(Korea)'은 이를 나타내는 변수(정확히 변수의 이름)가 되는 것입니다. 변수는 다음과 같은 속성을 가지고 있습니다.
이름(Name) 변수의 호칭입니다.
주소(Address) 변수와 연결되는 메모리의 위치를 말합니다. 이 때, 변수가 나타내는 메모리 위치는 항상 동일하지 않습니다. 즉, 동일한 이름을 가진 변수라도 이 변수가 각기 다른 용도로 쓰일 때에는 서로 독립적인 개체로 보고, 이들 변수가 가리키는 주소도 서로 다르게 됩니다. 변수의 주소를 가끔 'l-value'라고도 하는데, 이는 할당문에서 변수가 좌변에 위치한다는 사실에 기인한 것입니다.
값(Value) 변수의 값은 변수와 연결된 메모리 위치에 담겨 있는 내용을 말합니다. 'Apple'이라는 이름을 가진 변수의 메모리 주소가 '00DE'이고, 이 공간에 저장된 내용이 실수 '3.41'라고 하면, 이것이 바로 변수의 값이 되는 것입니다. 변수의 값을 가리켜 'r-value'라고도 합니다.
자료형(Type) 변수의 자료형은 변수가 가질 수 있는 값의 범위와 적용 가능한 연산자의 집합을 결정합니다. 예를 들어, C 언어에서 'int' 자료형은 -32768~32767 까지의 범위에 해당하는 값을 가질 수 있으며, 사칙연산 및 라이브러리 함수로 제공되는 연산자를 사용할 수 있습니다. scope : class variable : A data item associated with a particular class as a whole--not with particular instances of the class. Class variables are defined in class definitions. = static field instance variable : Any item of data that is associated with a particular object. Each instance of a class has its own copy of the instance variables defined in the class. field : A data member of a class. Unless specified otherwise, a field is not static.
- 수명에 따라 정적 변수(Static Variable) 스택 기반 동적 변수(Stack-Dynamic Variable) 명시적 힙 기반 동적 변수(Explicit Heap-Dynamic Variable) 묵시적 동적 변수(Implicit Dynamic Variable)
- 실효 범위(:변수의 값을 참조할 수 있는 범위, 즉 변수가 사용되는 문장의 범위)에 따라 local variable : A data item known within a block, but inaccessible to code outside the block. For example, any variable defined within a method is a local variable and can't be used outside the method. 지역 변수는 변수가 선언된 프로그램 단일체나 함수 혹은 블록 안에서만 사용할 수 있는 변수 cf. 스택 기반 동적 변수(Static Dynamic Variable)는 선언문이 실행될 때 저장 장소 바인딩이 이루어지고, 그에 대한 자료형은 정적으로 바인딩 됩니다. 다시 말해서, 변수가 프로그램 시작 시에 바인딩 되는 것이 아니라, 프로그램을 한 줄 한 줄 수행하고 있는 동안, 변수를 선언하는 코드 부분이 나오면 그제서야 변수에 대한 저장 장소가 할당되고, 바인딩이 이루어지는 것입니다. 이러한 함수에서 선언되는 변수들을 지역 변수(Local Variable)라고 하는데, 지역 변수들에 대한 기억 장소가 바로 이 때 할당되며 함수의 수행이 모두 끝나면 반환됩니다. non-local variable : 비지역 변수는 전체 프로그램에 걸쳐 사용 가능한 변수를 말합니다.
pointer variable : 포인터 변수는 저장 장소의 주소값과 그 저장 장소에 들어 있는 값을 모두 나타낼 수 있는 변수
method : a function (subroutine) associated with an object. A function defined in a class. Unless specified otherwise, a method is not static. instance method : Any method that is invoked with respect to an instance of a class. class method : A method that is invoked without reference to a particular object. Class methods affect the class as a whole, not a particular instance of the class. = static method
Message Software objects interact and communicate with each other using messages.
Class : a blueprint or prototype that defines the variables and the methods common to all objects of a certain kind.
Inheritance A class inherits state and behavior from its superclass. Inheritance provides a powerful and natural mechanism for organizing and structuring software programs. Interface : a contract in the form of a collection of method and constant declarations. When a class implements an interface, it promises to implement all of the methods declared in that interface.
programming; the process of creating steps for a computer to perform a desired task.
The order of the instructions is just as important as the instructions themselves!
algorithm; a procedure or formula for solving a problem
data; the stuff that the program knows about and operates on
IMPORTANT ALGORITHM CONSTRUCTS:
Sequence:series of steps
Selection:choice between alternative paths
Iteration:repetition
Steps for developing your program
# Specify your idea / problem to solve.
# Design an algorithm (sequence of steps) for implementing the idea.
# Express the algorithm as a computer program in a programming language.
# Compile and run the program.
Processing
Processing is an open source programming language and environment
for people who want to program images, animation, and sound. It is used
by students, artists, designers, architects, researchers, and hobbyists
for learning, prototyping, and production. It is created to teach
fundamentals of computer programming within a visual context and to serve as a software sketchbook and professional production tool. Processing is developed by artists and designers as an alternative to proprietary software tools in the same domain.
* Processing is an extension of Java and supports many
of the existing Java structures, but with a simplified syntax. The
application runs locally and exports programs to Java applets, which
may be viewed over the Internet.
# index.html -- html source for viewing the applet page
C 는벨연구소에서운영체제를디자인하는가운데탄생한언어로, 프로그래머지향적언어입니다. 프로그램설계가체계적이고이식성이좋으며강력함과유연성을갖춘언어입니다. C++ 는 C 언어를객체지향형프로그래밍(Object-Oriented Programming)에접목시킨언어로서기존 C가갖고있는특징을기반으로하고있습니다.
위의예에서보시는바와같이, 'REAL'이라는단어뒤에이름이오면, 'REAL'은실수형을의미하는키워드입니다. 그러나, 'REAL' 다음에연산자가오면변수로간주됩니다. 이경우특정단어가프로그램의문맥에따라서로다른용도로쓰이기때문에애매할수있고, 따라서 '읽기쉬움'에문제가있다고볼수있습니다.
컴퓨터프로그래밍언어에서의변수의의미는, 컴퓨터기억장소를가리키는추상적인표현방법입니다. 즉, 기억장소의주소를상징화한것입니다. 변수에대한정의가아직까지정확하게이해되지않는분들이많으시리라생각됩니다.
다른예에빗대자면이렇습니다. '동경 135˚, 북위 37.5˚'가메모리주소라면, '한국(Korea)'은이를나타내는변수(정확히변수의이름)가되는것입니다.
변수는다음과같은속성을가지고있습니다.
이름(Name)
변수의호칭입니다.
주소(Address)
변수와연결되는메모리의위치를말합니다. 이때, 변수가나타내는메모리위치는항상동일하지않습니다. 즉, 동일한이름을가진변수라도이변수가각기다른용도로쓰일때에는서로독립적인개체로보고, 이들변수가가리키는주소도서로다르게됩니다. 변수의주소를가끔 'l-value'라고도하는데, 이는할당문에서변수가좌변에위치한다는사실에기인한것입니다.
명시적힙기반동적변수는연결리스트(Linked List)나트리(Tree)처럼수행시간동안변수의크기가일정하지않고계속변화하는동적인구조를표현하는데편리하게사용될수있습니다. 그러나, 이러한변수를생성한후에는반드시반환을해주어야하는등세심한배려가필요하며, 포인터를통해값을참조하는데따르는부담들도단점으로지적됩니다.
(1) 에서 'type' 은사용자가직접특정자료형을정의하는것입니다. 따라서, (1)은 'constant'라는새로운자료형을선언해준것이고 constant는정수형이라는것을의미합니다. (2)와 (3)은변수선언문입니다. 여기서 'count_1'은정수형이고, 'count_2'는 'constant' 형입니다. 그러나, 이두변수는결국은모두정수형이기때문에형호환이일어나서서로값을주고받을수가있습니다.
문자형은컴퓨터에서숫자코딩방식에의해저장되는데, 가장많이사용되는코딩방식은 ASCII(American Standard Code for Information Interchange)로서각각의문자는그에해당하는숫자로변환되어저장됩니다. 예를들어문자 'a'는 65, '+'는 43입니다.
프로그래밍자료형으로쓰이는배열도배열자체의이름과그배열의원소의위치를나타내는첨자(Index)라는것이있어서위와같은배열의형태를얼마든지나타낼수있습니다. 이에관해서는다음절에서배우기로하겠습니다. 다만, 배열형에관한본격적인내용에들어가기전에여러분이기억하셔야할것은, 배열형은그배열을이루는자료형이모두같아야한다는것입니다.
: it is a term that describes a new approach to using a
number of existing technologies together, including the following: HTML
or XHTML, Cascading Style Sheets, JavaScript, the Document Object
Model, XML, XSLT, and the XMLHttpRequest object. When these
technologies are combined in the Ajax model, Web applications are able
to make quick, incremental updates to the user interface without
reloading the entire browser page. [Source: mozilla developer center]
Ajax is also seen written in all capital letters (AJAX).
AJAX (Asynchronous JavaScript and XML) is a newly coined
term for two powerful browser features that have been around for years,
but were overlooked by many web developers until recently when
applications such as Gmail, Google suggest, and Google Maps hit the
streets.
The two features in question are that you can:
* Make requests to the server without reloading the page
: a specification developed by the W3C. XML is a
pared-down version of SGML, designed especially for Web documents. It
allows designers to create their own customized tags, enabling the
definition, transmission, validation, and interpretation of data
between applications and between organizations.
하이퍼텍스트생성언어(HTML)를대체할목적으로월드와이드웹컨소시엄(WWW Consorsium)이라는단체가표준화작업을진행하고있는페이지기술언어. 보통 XML이라는약어로불린다. HTML에서사용되는연결(link) 기능등을확장함과동시에표준범용문서생성언어(SGML)를인터넷용으로최적화한것으로 HTML과 SGML의장점을모두가지도록규정하였다. 마이크로소프트사는 XML을바탕으로한푸시형(push type) 소프트웨어용의정보배포형식(information distribution format)인채널정의형식(CDF)을규정하여, 인터넷익스플로러 4.0에서실현하고있다.
API = Application Program Interface : a set of routines, protocols, and tools for building software applications.
A good API makes it easier to develop a program by providing all the building blocks. A programmer puts the blocks together. (more: 대부분의운영환경(operating environment)
이 API를제공하는데, 동일한 API를사용하여만들어진프로그램들은비슷한 interface를가지기때문에사용자가새프로그램을배우기쉽게한다.) 예를들어 Cocoa는 MacOS X의객체지향 API이다. (ref: http://www.osxdev.org/cocoa/)
software는두부류로나뉜다. systems software와 applications software. 시스템소프트웨어는컴퓨터(하드웨어)와직접상호작용하는가장기본적인낮은단계의프로그램으로 OS를포함한다. 어플리케이션소프트웨어는최종사용자(end-user)가사용하는워드프로세서, 그래픽툴등이다. 어플리케이션소프트웨어는 OS와 system utilities 없이는돌아가지않기때문에당연히시스템소프트위에얹혀있는것이다.
Open Source :a program in which the source code is available to the
general public for use and/or modification from its original design
free of charge, i.e., open.
The distribution terms of open-source software must comply with the following criteria: (ref. OSI @ http://www.opensource.org/)
1. The license shall not require a royalty or other fee for sale.
2. The program must include source code, and must allow distribution in source code as well as compiled form.
3. The license must allow modifications and derived
works, and must allow them to be distributed under the same terms as
the license of the original software.
4. The license must explicitly permit distribution of software built from modified source code.
5. The license must not discriminate against any person or group of persons.
6. The license must not restrict anyone from making use of the program in a specific field of endeavor.
7. The rights attached to the program must apply to all
to whom the program is redistributed without the need for execution of
an additional license by those parties.
8. The rights attached to the program must not depend on the program's being part of a particular software distribution.
9. The license must not insist that all other programs distributed on the same medium must be open-source software.
10. No provision of the license may be predicated on any individual technology or style of interface.
source code원시부호原始符號 : program instructions in their original form
program language > source code -(compiler)-> object code -(assembler)-> machine language
compile : to transform a program written in a high-level programming language from source code into object code. Programmers write programs in a form called source code.
Source code must go through several steps before it becomes an
executable program. The first step is to pass the source code through a
compiler, which translates the high-level language instructions into
object code. The final step in preducing an executable program -- after
the compiler has produced object code -- is to pass the object code
through a linker. The linker combines modules and gives real values to
all symbolic addresses, thereby producing machine code.
Java :A high-level programming language developed by Sun Microsystems.Java
is an object-oriented language similar to C++, but simplified to
eliminate language features that cause common programming errors.
Java applet :An applet
is a small Internet-based program written in Java, a programming
language for the Web, which can be downloaded by any computer
애플릿은응용프로그램(application)과작다는의미의접미사(let)를조합한합성어이다.
JavaScript :A scripting language developed by Netscape to enable Web authors to design interactive sites.
Although it shares many of the features and structures of
the full Java language, it was developed independently. Javascript can interact with HTML source code,
enabling Web authors to spice up their sites with dynamic content.
JavaScript is endorsed by a number of software companies and is an open language
that anyone can use without purchasing a license. It is supported by
recent browsers from Netscape and Microsoft, though Internet Explorer
supports only a subset, which Microsoft calls Jscript.
미국의넷스케이프커뮤니케이션즈사(Netscape Communications)가개발한스크립트언어. 1996년 2월에발매한월드와이드웹(WWW) 브라우저인넷스케이프내비게이터(Netscape Navigator) 2.0에실장하였다. 웹브라우저에서실행하는스크립트언어를기술한다. 언어규격은자바의부분집합(subset)으로되어있다. 하이퍼텍스트생성언어(HTML) 문서를작성하는수준의사용자가사용하는것을주안점으로하여자바의언어규격으로부터변수의형(정수형이나문자열형등)을생략하거나새로운클래스정의를할수없도록하였다. 스크립트는 HTML 문서속에직접기술하며, ‘script’라는꼬리표를사용한다. 자바스크립트와같은기능을갖는것으로서마이크로소프트사에서는 ‘Virtual Basic Scripting Edition’을개발하였다.
applet :A program designed to be executed from within another application
cf. With the growing popularity of OLE (object linking
and embedding), applets are becoming more prevalent. A well-designed
applet can be invoked from many different applications.
Perl = Practical Extraction and Report Language Perl is a programming language developed by Larry Wall,
especially designed for processing text. Because of its strong text
processing abilities, Perl has become one of the most popular languages
for writing CGI scripts. Perl is an interpretive language, which makes
it easy to build and test simple programs.
object-oriented programming; OOP 객체지향(客體指向) 프로그래밍 : A type of programming in which programmers define not
only the data type of a data structure, but also the types of
operations (functions) that can be applied to the data structure.
In this way, the data structure becomes an object that
includes both data and functions. In addition, programmers can create
relationships between one object and another. For example, objects can
inherit characteristics from other objects. To perform object-oriented programming, one needs an object-oriented programming language(OOPL). Java, C++ and Smalltalk are three of the more popular languages, and there are also object-oriented versions of Pascal.
* Processing is an extension of Java and supports many
of the existing Java structures, but with a simplified syntax. The
application runs locally and exports programs to Java applets, which
may be viewed over the Internet.
syntax구문構文 ([논리]=syntactics) : the spelling and grammar of a programming language.
Computers are inflexible machines that understand what
you type only if you type it in the exact form that the computer
expects. The expected form is called the syntax.
Each program defines its own syntactical rules that
control which words the computer understands, which combinations of
words are meaningful, and what punctuation is necessary.
server-side Occurring on the server side of a client-server system.
For example, on the World Wide Web, CGI scripts are server-side
applications because they run on the Web server. In contrast,
JavaScript scripts are client-side because they are executed by your
browser (the client). Java applets can be either server-side or
client-side depending on which computer (the server or the client)
executes them.
HTML
XML
MP3
Unicode
HTTP
FTP = File Transfer Protocol Internet의 TCP/IP protocols을사용해서데이터를전송한다는점에서 HTTP나 SMTP와같다.
TCP/IP = Transmission Control Protocol/Internet Protocol : the suite of communication protocols used to connect hosts on the internet.
CGI = Common Gateway Interface
servlet A small program that runs on a server. The term usually refers to a Java applet that runs within
a Web server environment. This is analogous to a Java applet that runs
within a Web browser environment.
Java servlets are becoming increasingly popular as an
alternative to CGI programs. The biggest difference between the two is
that a Java applet is persistent. This means that once it is started,
it stays in memory and can fulfill multiple requests. In contrast, a
CGI program disappears once it has fulfilled a request. The persistence
of Java applets makes them faster because there's no wasted time in
setting up and tearing down the process.
debug (v.) To find and remove errors (bugs) from a software
program. Bugs occur in programs when a line of code or an instruction
conflicts with other elements of the code.
ASP = Active Server Pages
: a specification for a dynamically created Web page with
a .ASP extension that utilizes ActiveX scripting -- usually VB Script
or Jscript code. When a browser requests an ASP, the Web server
generates a page with HTML code and sends it back to the browser. So
ASPs are similar to CGI scripts, but they enable Visual Basic
programmers to work with familiar tools.
index.html -- html source for viewing the applet page
filename.jar -- compiled applet classes
filename.pde -- source code
pde = processing development environment(?)
JAR = Java Archive : a file format used to bundle all components required by
a Java applet. JAR files simplify the downloading of applets since all
the components (.class files, images, sounds, etc) can be packaged into
a single file. In addition, JAR supports data compression, which
further decreased download times. By convention, JAR files end with a
.jar extension.
wiki : a collaborative Web site comprises the perpetual collective work of many authors.
Similar to a blog in structure and logic, a wiki allows
anyone to edit, delete or modify content that has been placed on the
Web site using browser interface, including the work of previous
authors. In contrast, a blog, typically authored by an individual, does
not allow visitors to change the original posted material, only add
comments to the original content. The term wiki refers to either the Web site or the software used to create the site. Wiki wiki means "quick" in Hawaiian. The first wiki was created by Ward Cunnigham in 1995.
ASX Short for ASF
Streaming Redirector file, a Windows Media container file. ASX is an
XML redirector file for ASF. ASX files are metafiles, i.e., they
provide information about ASF media files, including descriptions of
multimedia content. When a browser links to an ASX file, the ASX file
in turn links to an ASF file on a server.
Phython : An interpreted, object-oriented programming language
developed by Guido van Rossum. The name comes from one of van Rossum's
favorite television shows, Monty Python's Flying Circus. Python is very
portable since Python interpreters are available for most operating
system platforms. Although Python is copyrighted, the source code is
open source, and unlike GNU software, it can be commercially re-sold.
runtime실행시간 Occurring
while a program is executing. For example, a runtime error is an error
that occurs during program execution and a runtime library is a library
of routines that are bound to the program during execution. In
contrast, compile-time refers to events that occur while a program is
being compiled.
EJB =Enterprise JavaBeans Enterprise
JavaBeans (EJB) is a Java API developed by Sun Microsystems that
defines a component architecture for multi-tier client/server systems. EJB systems allow developers to focus on the actual
business architecture of the model, rather than worry about endless
amounts of programming and coding needed to connect all the working
parts. This task is left to EJB server vendors. Developers just design
(or purchase) the needed EJB components and arrange them on the server. Because EJB systems are written in Java, they are
platform independent. Being object oriented, they can be implemented
into existed systems with little or no recompiling and configuring.