Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java Buzzwords.

Similar presentations


Presentation on theme: "Java Buzzwords."— Presentation transcript:

1 Java Buzzwords

2 Java! Java is a language characterized by buzzwords
buzzword: A trendy word or phrase that is used more to impress than explain From Sun Microsystems, the developers of Java: What do all of those terms mean? “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.”

3 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” A programming language a vocabulary and set of syntactical (grammatical) rules for instructing a computer to perform specific tasks you can do most anything in any programming language a particular language encourages one to do things in a certain way Question: Is this a fair characterization?

4 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” Based on popular languages called C and C++ C: old, pretty bare bones language C++: newer, more complicated language Start from C and add some of C++’s more useful features “Java omits many rarely used, poorly understood, confusing features of C++ that in our experience bring more grief than benefits” (Gosling) Question: Is Java really all that simple?

5 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” The object-oriented paradigm problems and their solutions are packaged in terms of classes the information in a class is the data the functionality in a class is the method a class provides the framework for building objects Object-oriented programming (OOP) allows pieces of programs to be used in other contexts more easily

6 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” A distributed system is one where multiple separate computer systems are involved the Internet is a very large distributed system interconnected collection of computer networks heterogeneous components large number of services: WWW, file services, audio/video channels Java was designed for the web

7 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” Java a high-level language High-level languages must be translated to a computer’s native tongue, machine language Interpreted high-level languages are translated to an intermediate form and then converted to machine language and run Java bytecodes bytecode (class) file is executed by a Java bytecode interpreter

8 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” Programs will have errors, but a good program degrades reasonably A robust program may not do exactly what it is supposed to do, but it should not bring down other unrelated programs down with it Reliability early (compile time) checking dynamic (runtime) checking eliminating situations that are error prone.

9 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” Security techniques that ensure that data stored on a computer cannot be read or compromised Java is intended for use in networked/distributed environments a program is running on your computer … what is to stop it from erasing all of your data, accidentally or otherwise? Java enables the construction of virus-free, tamper-free systems authentication based on public-key encryption

10 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” A language is architecture-neutral if it does not prefer a particular type of computer architectures Example: not too hard to construct a program that will run faster on a Macintosh than on a PC, and vice-versa each have their own respective strengths and weaknesses A particular program is never entirely architecture neutral though Question: When is being architecturally neutral a bad thing?

11 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” Program once, run anywhere A program is portable if it will work the same (more or less) on many different computer systems platform-independent Much effort is currently spent porting non-portable code Java has no "implementation dependent" aspects HTML is also portable or platform-independent

12 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” Performance: speed in completing some task performance is everything to most computer and software manufacturers! Think about this … if the transportation industry kept up with the computer industry, one would be able to now buy a Rolls Royce that could drive across country in 5 minutes for $35 However … it would crash once a week, killing everyone on board

13 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” A thread is a part of the program that can operate independently of its other parts Multi-threaded programs can do multiple things at once example: download a file from the web while still looking at other web pages Question: What is the problem with multiple agents working at the same time? synchronization

14 “Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high performance, multi-threaded, and dynamic language.” Dynamic: actions that take place at the moment they are needed rather than in advance antonym: static A dynamic program can ask for more or less resources as it runs use the most recent version of some code that is available Question: Why is being dynamic a good thing? upgrades

15 Decision Trees

16 Trees Hierarchical data structure Set of elements or nodes
one node as root every other node has a single predecessor (parent) and zero or more successors (children) nodes without successors are called leaf nodes Nodes are connected by edges The level or depth of a node is the number of edges on the path to the root The depth of the tree is the number of edges on the longest path from root to any leaf A complete tree has all leaves at same level, all other nodes have the same number of children

17 Example tree structure
root   leaf depth of tree = 3  edge  leaf  leaf  leaf  leaf  leaf

18 Decision trees A decision tree begins with a decision you need to make
start with an initial decision node ask a question Structure for investigating options and the possible outcomes of choosing those options result of a decision can be another decision outcome is a terminal node Tree should have unique paths from the decision node to each of the terminal nodes. help you to choose between several courses of action

19 Examples Real life decision trees which route to take to class?
which {cell phone, computer, camera} is best for me? what to wear? where to go on vacation?

20 A Decision Tree yes yes no yes no no He received the
Physics Prize in 1921. Try the Medicine Prize in 1962. yes Would you like to read about Einstein? yes no Would you like to read about a scientist? Try A. Solzhenitsyn, Literature 1970. Look up the Peace Prize in 1991. yes no Would you prefer a humanitarian? no

21 A decision tree for sorting
a  b? yes no b  c? a  c? yes no a  b  c a  c? a  c  b c  a  b yes no b  a  c b  c? yes no b  c  a c  b  a

22 Binary trees Nodes have at most two children
In a complete binary tree of depth 3, how many nodes are in the tree? how many leaves are in the tree? In a complete binary tree of depth 4, How many nodes in a depth d tree? How many leaves in a depth d tree?


Download ppt "Java Buzzwords."

Similar presentations


Ads by Google