Java and C/C++ Language Features in Terms of Network Programming

Size: px
Start display at page:

Download "Java and C/C++ Language Features in Terms of Network Programming"

Transcription

1 Java and C/C++ Language Features in Terms of Network Programming Matthew Cook B.S. Software Engineering, Student Syed (Shawon) M. Rahman, Ph.D., Assistant Professor Dept. of Computer Science & Software Engineering University of Wisconsin - Platteville 1 University Plaza, Platteville, WI 53818, USA Phone: (608) , Fax: (608) {cookma, rahmans}@uwplatt.edu ABSTRACT This research paper is a concise comparison between the Java and the C/C++ programming languages with special consider to the functionality of each in networking applications. A brief overview of the origins of each language is given as foundation for this comparison. The features of each language are then analyzed with respect to three categories: ease of use, security, and efficiency.

2 1. Introduction C++ and Java appear at first to be extremely similar: almost identical programming languages. While there is a lot of common syntax shared between the two languages, there are also some very major differences. C and C++ are very fast and powerful languages. The focus of these languages is building code that will run on a specific machine extremely efficiently. Because of this, in these languages the programmer has a lot of low level controls of what is going on in the computer. The trade off is that the programmer must have considerable knowledge of the system with which they are working with. Java on the other hand puts more emphasis on ease of use for the programmer and transfers this load to the computer. Low level control and overall processing speed are reduced in order to increase the ease of use for the programmer. Java places the focus on increasing the programmer's efficiency, while assuming a good machine to run it on. C/C++ assumes a good programmer, and focuses on the machine's efficiency. 2. Background 2.1. C C is by far the oldest of the languages being compared in this paper. It was developed by Dennis Ritchie of Bell Laboratories in 1972, as an alternative to other very low level programming languages at the time. The language was designed to be a "system implementation language" for the new UNIX operating system that was under production during the same time period. C is based on the type-less language B (developed by Bell Laboratories earlier that decade) and its parent language Basic Combined Programming Language (BCPL) (developed by Martin Richard's at MIT in the mid 60's) [2]. On a broad scope, C, B, and BCPL have many similarities. They are all "low level" languages designed to allow the programmer to interact with standard objects handled by the computer, such as characters, numbers, and addresses [3]. The emphasis in C was the creation of a language that could give programmers most of the power and speed of machine level code while letting the programmer write it at a more understandable level. This close interaction with the machine allows the C language to be converted to machine code by relatively light-weight compilers C++ As we could assume from the name, C++ is based on the earlier language C. Its design was also based on Simula's approach to organize programs, commonly known as "object-oriented" programming. C++ was developed to be a "better C" with support for techniques such as data abstraction and full object-oriented programming. The goal of 2

3 the new language was to make programming more enjoyable. Like C, C++ was also researched and developed at AT&T Bell Laboratories. Specifically, Bjarne Stroustrup was the lead developer in the creation of C++ in the early 1980s. C++ added many of new features to the C language. Most notably, rather then being an entirely procedural based language such as C, C++ now incorporated both object-oriented programming and procedural programming in its design. The original version of C++, called "C with Classes" was first used in It was not until 1983 that support for object-oriented programming was added. Two years later, in 1985, the language was made available for commercial use; and by the end of the decade, the language had begun the process of formal standardization by the American National Standards Institute (ANSI) [1] Java Java is the newest of the languages discussed in this paper. It was originally developed at Sun Microsystems as a programming language called OAK. The purpose of OAK was to create a programming language that would be a cross platform and allow communication between small off-the-shelf systems (such as VCRs, or other home entertainment systems). As the internet became popular a web browser was developed using the OAK language, called WebRunner. As the popularity of the internet grew, so did the demand for development of applications such as WebRunner. Sun then began promoting their language; changing the name from OAK to Java and the name of the browser from WebRunner to HotJava. Since Java was designed to be a portable and cross platform language. It could not be compiled ahead of time into specific machine code such as C or C++. Instead Java code is compiled into machine independent byte code which can then be compiled into machine code at run time [4]. This is not the only difference between Java and C++. However, Java's focus is much more on ease of use for the developer. As such, the language is entirely object-oriented and includes other developer friendly features such as standard libraries for common tasks, as well as other features not found in C or C++, for example, automatic garbage collection. 3. Ease of Use 3.1. Libraries The availability of libraries of code for common tasks is a major factor which is how easy to use a language. If there is a pre-packaged and thoroughly tested solution to a programming problem, a lot of time and money can be saved by using these standard components instead of reinventing the wheel. Both C++ and Java contain at least some sort of standard libraries. In C++ this is limited to the basic (though extremely well tested) Standard Template Library which is a set of containers and other relatively simple classes. Because C and C++ leave a lot of 3

4 functionality up to the specific system we are working on, it is very difficult to provide more complex libraries that would be cross-platform compatible. Java, on the other hand, contains many built in libraries for networking, multi-threading, cryptography, xml parsing, database connectivity, graphical user interfaces and much more. This is made possible by design. Java was built from the ground up to be a system independent language and because of that, it is much easier to create standard libraries across different platforms. A good example of the ease of use provided by language libraries is creating a simple HTTP server application. Since C++ is so system dependent, the easiest solution is to use a specific library for that system (in this case Microsoft C++.NET) or connect to existing system utilities to do the work (as can easily be done on UNIX systems). The same program can be developed quickly in Java and still be cross platform compatible simply by using the included standard networking libraries. Java indisputably wins any debate between it and the standard C++ language as far as networking libraries are concerned 3.2. Garbage Collection If we assume that automated garbage collection is generally a good thing, this is another area Java decidedly comes ahead comparinmg with C/C++. In C++ no garbage collecting is done for us, so all objects that are created must be deleted to avoid memory leaks. Because all objects need to be deleted when they are not being used, all objects must also have constructors written for them. This level of control over an object's memory allows programmers to create highly optimized programs. More often though it seems to make it extremely easy to cause an error by leaving dangling points or unreachable objects and of course memory leaks. Memory leaks are especially important in networking hardware where other systems are depending on as much up-time as possible in the software, and the user cannot afford to restart the system often to clear the memory after leaks. Java reduces the occurrences of such inconveniences by automating garbage collecting. Instead of de-allocating memory by hand when we are finished with the object, the system will do it for us. This is a definite increase in usability as compared with most systems, but does increase the requirements on the system needed to run a Java program Compilation Unlike many newer scripting languages such as Python, Perl, or Ruby; both C/C++ and Java must be compiled before they can be run on a machine. C and C++ source code must be compiled separately for different machines since it compiles straight into machine code. Java on the other hand can be compiled from the source code into byte code once, since the byte code is cross platform compatible. The downside here is that the byte code must still be translated into machine code before it can be run, and this processing work has now been moved to run time. The trade off for this extra portability in Java is the requirement for a Java "virtual machine" to be installed on the system to 4

5 translate the byte code into machine code at run time. Though this does add extra system requirements and has the potential to decrease the performance of a program at run time, it increases the ease of use for programmers and by a large factor. From a pure usability point of view, Java will again win over C/C++ in the area of compilation simply because of its cross platform compatibility File Structure There are no header files in Java. This can be a blessing or a curse, depending how the programmer is accustomed to writing code. In C++, the header files are often used as a reference for the rest of the code. The single.h file can be opened to view all attributes and functions of an object. When this header information is combined with the main body of code as in Java, the programmer must view all the code in the file instead of only the basic header information. Of course, the advantage is that instead of dealing with two separate files for each object as in C++, we now only need to manage one file per object. This issue of documentation in Java has also been addressed by the standard "javadoc" application. This application reads java class files and automatically produces HTML documentation for them; removing any need for the use of header files for documentation. 4. Security 4.1. Object Handling Pointers Use of pointers can be a major security concern. Languages that use pointers, such as C++, are vulnerable to pointer hacks. That is, if a user has access to a pointer to one part of the program, and they know where it is stored in memory in relation to the rest of the program, they only need to slightly change the pointer to gain access to potentially private parts of the program. Understanding the proper use of pointers in C and C++ is a large part of the steep learning curve in developing applications in these languages. This is not an issue in Java since instead of passing pointers, all complex objects in Java are passed by reference and all array values must be accessed by index. An added advantage to this method is that, unlike pointers, a reference can be re-bound at any point without being destroyed Initialization Un-initialized objects in C++ can also cause program halting errors at run time. Java has addressed this issue by not requiring objects to be initialized. All objects have a default value or will default to null instead of not being defined at all. 5

6 Type Checking Type checking is another issue that can potentially be another cause of security issues. Allowing certain types of variables where they should not be (or are not expected to be) can cause a program to behave in unexpected ways that could be exploited. C++ has fairly tight type checking, but Java is even stricter. For example, in C++ integers can be used in evaluating Boolean expressions, in Java this is strictly disallowed. In some situations it may be more convenient to allow evaluations of this type, but in a network application the potential for a security risk outweighs the ease of use factor Inheritance Another way to gain access to private data in a C++ program is inheritance. In C++ a child class need not have the same security settings as its parent. That is, a parent class may be private, but a child class could be made public. This allows the inherited child (and other classes through the child class) to have access to data and methods in the parent class that were intended to be private. This is prevented in Java by requiring that the child class have the same level of restriction as the parent; so a public parent means a public child, and likewise with private. Multiple inheritances can also be an issue in C++. If two classes derive from a top level class, have a single child class that inherits from both of them, it is possible to have a situation in which (if a function or attribute has the same name in both mid level classes) it will not be clear which should be inherited in the child class [5]. Because of this, a technique known as "virtual" inheritance must be used in C++. Java on the other hand, does not allow for multiple inheritances. Instead it uses a system of implementing "interfaces" which allows it to avoid the issues caused by multiple inheritances in C Exception Handling The C++ method of exception handling is to catch any exceptions (other than syntax errors that are caught at compile time) that are thrown at run time. At this point, the appropriate error handling function is called. Writing these error handling functions in C++ can even be a bit troublesome due to the nature of its inheritance trees. In C++ not every object is descended from a root object type as with Java, and likewise not every exception need be descended from a root throwable type, as with Java. This means that in C++ we cannot write a single error handling function that will absolutely catch all errors thrown. This issue is fixed in Java by using a single inheritance tree. In addition, Java also includes other helpful exception handling features, such as checking all arrays for out of bounds exceptions automatically when accessing them, and checking for exceptions at compile time instead of just at run time. 6

7 4.3. Application Versus Applet Another useful feature of Java is the idea of an applet. In C++ and most other programming languages everything is compiled into a single application. This application will essentially have full access to the system, limited only by the code contained in it. Java however gives the option of creating an applet instead of a full application. In an applet, the code is not allowed any permanent access to the system. So the code can be executed but no damage could be done to the system. This has changed with Java 1.1 and above which allows digitally signed Applets. In this case, the system can be accessed by applets which contain security certificates linking them directly to their producer so if any damage is incurred the appropriate people may take responsibility. 5. Speed or Efficiency This is the one area where Java literally has some catching up to do, as compared with C and C++. Traditionally, Java programs have been much slower to execute than their C/C++ counterparts. This should really come as no surprise given the much lower level nature of C++ and especially C. There are a number of reasons C and C++ are quicker than Java programs to execute. The primary reason is that they have already been compiled to machine code. Java intentionally does not compile to machine code until run time to preserve portability. It uses a JIT (Just-In-Time) compiler to translate the universal byte code into machine code, for that specific machine. Large advances have been made in these JIT compilers during recent years however, even to the point that for some applications Java may be up to 2-4 times faster than C++ [8] Floating Point Calculations Floating point calculations are another area in which Java understandably lags behind C and C++. In C and C++ floating point calculations, like many other things, are left up to the specific system the program is running on. The precision of the calculation is decided by the machine and not the programmer. Java on the other hand uses what is called strictfp. That is, it restricts its floating point calculations to guarantee the same performance on every system. So there is a compromise in overall speed in floating point calculations for the sake of consistency. 6. Conclusions Obviously both C/C++ and Java have their strengths and weaknesses. C and C++ work extremely well for systems with limited hardware capabilities where the programmer needs precise control over how the system will work and raw speed is of the utmost performance. This could be very critical for some networking applications, especially in embedded systems or other very specific uses. 7

8 However, hardware is becoming relatively cheap, and in most network applications it can is cheaper in the long run to allow the computer to do the work for us. For example, Google do not have a few super computers doing all the work and then try and maintain these. They instead do what is more convenient and run many cheap systems, using the software instead to compensate when a system goes down. The point is that in networking applications raw performance is not necessarily the best indicator of which is a better language to use. The ease of use of Java leads to a higher reliability, which makes it the superior choice in programming languages for network applications. References [1] Stroustrup, B. An Overview of the C++ Programming Language The Handbook of Object Technology, CRC Press LLC, Boca Raton, 1999 [2] Ritchie, D. M. The Development of the C Language History of Programming Languages-II ed. Thomas J. Bergin, Jr. and Richard G. Gibson, Jr. ACM Press, New York, NY, and Addison-Wesley, Reading, MA,1996. [3] Kernighan, B.W. and Ritchie, D. M. The C programming Language Prentice-Hall,1988 [4] Gosling, J., Joyn B., Steele, G., and Bracha, G. The Java Language Specification Third Edition Addison-Wesley, Reading, Ma, [5] Martin, R. C. Java and C++ A critical comparison. Cambridge Sigs Reference Library Series, [6] Aitken, G. Moving from C++ to Java Dr. Dobb s Journal of Software Tools July 22, [7] Bull, J. M., Smith, L. A., Pottage, L., and Freeman, R. Benchmarking Java against C and Fortran for Scientific Applications EPCC, University of Edinburgh, Edinburgh, Scotland, U.K., 2001 [8] Walker, W., Lamere, P., and Kwok, P., FreeTTS - A Performance Case Study Sun Microsystems Laboratories, Palo Alto, CA, August

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science) Lecture 09 Ada to Software Engineering Mr. Mubashir Ali Lecturer (Dept. of dr.mubashirali1@gmail.com 1 Summary of Previous Lecture 1. ALGOL 68 2. COBOL 60 3. PL/1 4. BASIC 5. Early Dynamic Languages 6.

More information

Structure of this course. C and C++ Past Exam Questions. Text books

Structure of this course. C and C++ Past Exam Questions. Text books Structure of this course C and C++ 1. Types Variables Expressions & Statements Alastair R. Beresford University of Cambridge Lent Term 2008 Programming in C: types, variables, expressions & statements

More information

Introduction to Programming

Introduction to Programming Introduction to Programming session 3 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2010 These slides are created using Deitel s slides Sahrif University of Technology Outlines

More information

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming 30 th September 2018 Objective: To learn meaning and concepts of programming Outcome: By the end of this students should be able to describe the meaning of programming Section 1: What is a programming

More information

Business and Scientific Applications of the Java Programming Language

Business and Scientific Applications of the Java Programming Language Business and Scientific Applications of the Java Programming Language Angelo Bertolli April 24, 2005 Abstract While Java is arguably a good language with that to write both scientific and business applications,

More information

(heavily based on last year s notes (Andrew Moore) with thanks to Alastair R. Beresford. 1. Types Variables Expressions & Statements 2/23

(heavily based on last year s notes (Andrew Moore) with thanks to Alastair R. Beresford. 1. Types Variables Expressions & Statements 2/23 Structure of this course Programming in C: types, variables, expressions & statements functions, compilation, pre-processor pointers, structures extended examples, tick hints n tips Programming in C++:

More information

Programming in C and C++

Programming in C and C++ Programming in C and C++ 1. Types Variables Expressions & Statements Dr. Anil Madhavapeddy University of Cambridge (based on previous years thanks to Alan Mycroft, Alastair Beresford and Andrew Moore)

More information

Chapter 1. Preliminaries

Chapter 1. Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

Assumptions. History

Assumptions. History Assumptions A Brief Introduction to Java for C++ Programmers: Part 1 ENGI 5895: Software Design Faculty of Engineering & Applied Science Memorial University of Newfoundland You already know C++ You understand

More information

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017 Introduction to Java Lecture 1 COP 3252 Summer 2017 May 16, 2017 The Java Language Java is a programming language that evolved from C++ Both are object-oriented They both have much of the same syntax Began

More information

Chapter 1 INTRODUCTION SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

Chapter 1 INTRODUCTION SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC. hapter 1 INTRODUTION SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: Java features. Java and its associated components. Features of a Java application and applet. Java data types. Java

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

C LANGUAGE AND ITS DIFFERENT TYPES OF FUNCTIONS

C LANGUAGE AND ITS DIFFERENT TYPES OF FUNCTIONS C LANGUAGE AND ITS DIFFERENT TYPES OF FUNCTIONS Manish Dronacharya College Of Engineering, Maharishi Dayanand University, Gurgaon, Haryana, India III. Abstract- C Language History: The C programming language

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

Chapter 1. Preliminaries

Chapter 1. Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

OOSD. Introduction to JAVA. Giuseppe Lipari Scuola Superiore Sant Anna Pisa. September 12, 2011

OOSD. Introduction to JAVA. Giuseppe Lipari  Scuola Superiore Sant Anna Pisa. September 12, 2011 OOSD Introduction to JAVA Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 12, 2011 G. Lipari (Scuola Superiore Sant Anna) OOSD September 12, 2011 1 / 55 Outline

More information

Introduction. A. Bellaachia Page: 1

Introduction. A. Bellaachia Page: 1 Introduction 1. Objectives... 2 2. Why are there so many programming languages?... 2 3. What makes a language successful?... 2 4. Programming Domains... 3 5. Language and Computer Architecture... 4 6.

More information

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING 10.2478/cris-2013-0011 PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING NIKOLETTA MINAROVA 77 INTRODUCTION Since the first design concept of computers came into the world,

More information

Introduction to Java

Introduction to Java Introduction to Java Module 1: Getting started, Java Basics 22/01/2010 Prepared by Chris Panayiotou for EPL 233 1 Lab Objectives o Objective: Learn how to write, compile and execute HelloWorld.java Learn

More information

Spring 2018 NENG 202 Introduction to Computer Programming

Spring 2018 NENG 202 Introduction to Computer Programming Spring 2018 NENG 202 Introduction to Computer Programming Introductory programming course based on the C language Course Website: http://www.albany.edu/~yx152122/neng202-18.html Instructor: Prof. Y. Alex

More information

Selected Java Topics

Selected Java Topics Selected Java Topics Introduction Basic Types, Objects and Pointers Modifiers Abstract Classes and Interfaces Exceptions and Runtime Exceptions Static Variables and Static Methods Type Safe Constants Swings

More information

History Introduction to Java Characteristics of Java Data types

History Introduction to Java Characteristics of Java Data types Course Name: Advanced Java Lecture 1 Topics to be covered History Introduction to Java Characteristics of Java Data types What is Java? An Object-Oriented Programming Language developed at Sun Microsystems

More information

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains Chapter 1. Preview Reason for Studying OPL Reason for Studying OPL? Programming Domains Language Evaluation Criteria Language Categories Language Design Trade-Offs Implementation Methods Programming Environments

More information

OOSD. Introduction to JAVA. Giuseppe Lipari Scuola Superiore Sant Anna Pisa. September 29, 2010

OOSD. Introduction to JAVA. Giuseppe Lipari   Scuola Superiore Sant Anna Pisa. September 29, 2010 OOSD Introduction to JAVA Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 29, 2010 G. Lipari (Scuola Superiore Sant Anna) OOSD September 29, 2010 1 / 55 Outline

More information

2 rd class Department of Programming. OOP with Java Programming

2 rd class Department of Programming. OOP with Java Programming 1. Structured Programming and Object-Oriented Programming During the 1970s and into the 80s, the primary software engineering methodology was structured programming. The structured programming approach

More information

PROGRAMMAZIONE I A.A. 2017/2018

PROGRAMMAZIONE I A.A. 2017/2018 PROGRAMMAZIONE I A.A. 2017/2018 PROGRAMMING LANGUAGES A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output. Programming languages

More information

Programming Language Basics

Programming Language Basics Programming Language Basics Lecture Outline & Notes Overview 1. History & Background 2. Basic Program structure a. How an operating system runs a program i. Machine code ii. OS- specific commands to setup

More information

An Introduction to Software Engineering. David Greenstein Monta Vista High School

An Introduction to Software Engineering. David Greenstein Monta Vista High School An Introduction to Software Engineering David Greenstein Monta Vista High School Software Today Software Development Pre-1970 s - Emphasis on efficiency Compact, fast algorithms on machines with limited

More information

Protocol Buffers, grpc

Protocol Buffers, grpc Protocol Buffers, grpc Szolgáltatásorientált rendszerintegráció Service-Oriented System Integration Dr. Balázs Simon BME, IIT Outline Remote communication application level vs. transport level protocols

More information

Introduction to Java Programming

Introduction to Java Programming Introduction to Java Programming Lecture 1 CGS 3416 Spring 2017 1/9/2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer ISA - Instruction Set Architecture: the specific

More information

Introduction to C Language

Introduction to C Language Introduction to C Language Instructor: Professor I. Charles Ume ME 6405 Introduction to Mechatronics Fall 2006 Instructor: Professor Charles Ume Introduction to C Language History of C Language In 1972,

More information

COSC 2P95. Introduction. Week 1. Brock University. Brock University (Week 1) Introduction 1 / 18

COSC 2P95. Introduction. Week 1. Brock University. Brock University (Week 1) Introduction 1 / 18 COSC 2P95 Introduction Week 1 Brock University Brock University (Week 1) Introduction 1 / 18 Lectures and Labs Lectures are Thursdays, from 3pm 5pm (AS/STH 217) There are two lab sections Lab 1 is Mondays,

More information

Objects, Encapsulation, Inheritance (2)

Objects, Encapsulation, Inheritance (2) CS 242 2012 Objects, Encapsulation, Inheritance (2) Reading (two lectures) Chapter 10, except section 10.4 Chapter 11, sections 11.1, 11.2, 11.3.1 and 11.4., 11.5, 11.6 only Chapter 12, sections 12.1,

More information

Chapter 1 Preliminaries

Chapter 1 Preliminaries Chapter 1 Preliminaries Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language

More information

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha Computer Fundamentals Pradeep K. Sinha Priti Sinha Chapter 12 Computer Languages Slide 1/64 Learning Objectives In this chapter you will learn about: Computer languages or programming languages Three broad

More information

Chapter 2. Evolution of the Major Programming Languages

Chapter 2. Evolution of the Major Programming Languages Chapter 2 Evolution of the Major Programming Languages Chapter 2 Topics Zuse s Plankalkül Minimal Hardware Programming: Pseudocodes The IBM 704 and Fortran Functional Programming: Lisp The First Step Toward

More information

Component V Supporting Materials / Learn More Interesting Facts. Interesting Facts

Component V Supporting Materials / Learn More Interesting Facts. Interesting Facts Component V Supporting Materials / Learn More 1.4.1 Interesting Facts No. Interesting Facts 1. All computers operate by following machine language programs. 2. Machine language programs are long sequence

More information

Crash Course into. Prof. Dr. Renato Pajarola

Crash Course into. Prof. Dr. Renato Pajarola Crash Course into Prof. Dr. Renato Pajarola These slides may not be copied or distributed without explicit permission by all original copyright holders C Language Low-level programming language General

More information

Introducing C++ to Java Programmers

Introducing C++ to Java Programmers Introducing C++ to Java Programmers by Kip Irvine updated 2/27/2003 1 Philosophy of C++ Bjarne Stroustrup invented C++ in the early 1980's at Bell Laboratories First called "C with classes" Design Goals:

More information

Principles of Programming Languages. Lecture Outline

Principles of Programming Languages. Lecture Outline Principles of Programming Languages CS 492 Lecture 1 Based on Notes by William Albritton 1 Lecture Outline Reasons for studying concepts of programming languages Programming domains Language evaluation

More information

Preview from Notesale.co.uk Page 6 of 52

Preview from Notesale.co.uk Page 6 of 52 Binary System: The information, which it is stored or manipulated by the computer memory it will be done in binary mode. RAM: This is also called as real memory, physical memory or simply memory. In order

More information

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages Chapter 2 Evolution of the Major Programming Languages ISBN 0-321-33025-0 2.2 Minimal Hardware Programming: Pseudocodes What was wrong with using machine code? Poor readability Poor modifiability Expression

More information

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS Chapter 1 : Chapter-wise Java Multiple Choice Questions and Answers Interview MCQs Java Programming questions and answers with explanation for interview, competitive examination and entrance test. Fully

More information

8/23/18. Programming Language Genealogy The Evolution of Programming Languages. Zuse s Plankalkül. Plankalkül Syntax. Machine Code

8/23/18. Programming Language Genealogy The Evolution of Programming Languages. Zuse s Plankalkül. Plankalkül Syntax. Machine Code Programming Language Genealogy The Evolution of Programming Languages In Text: Chapter 2 2 Zuse s Plankalkül Designed in 1945, but not published until 1972 Never implemented Advanced data structures floating

More information

Special Topics: Programming Languages

Special Topics: Programming Languages Lecture #23 0 V22.0490.001 Special Topics: Programming Languages B. Mishra New York University. Lecture # 23 Lecture #23 1 Slide 1 Java: History Spring 1990 April 1991: Naughton, Gosling and Sheridan (

More information

JAVA An overview for C++ programmers

JAVA An overview for C++ programmers JAVA An overview for C++ programmers Wagner Truppel wagner@cs.ucr.edu edu March 1st, 2004 The early history James Gosling, Sun Microsystems Not the usual start for a prog.. language Consumer electronics,

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Lecture 2 Thomas Wies New York University Review Last week Programming Languages Overview Syntax and Semantics Grammars and Regular Expressions High-level

More information

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Java platform. Applets and applications. Java programming language: facilities and foundation. Memory management

More information

LECTURE/ STUDY NOTES ON C

LECTURE/ STUDY NOTES ON C LECTURE/ STUDY NOTES ON C PART I (Overview of C Programming) Introduction of C language History of C Importance of C Demerits of C Basic Structure of C Working steps of C compiler Source Code Object Code

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Evolution of the Major Programming Languages

Evolution of the Major Programming Languages Evolution of the Major Programming Languages SANGJI University Kwangman Ko (kkman@sangji.ac.kr) Genealogy of Common Languages kkman@sangji.ac.kr 2 1-3 Minimal Hardware Programming: Pseudocodes What was

More information

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter Lecture Topics Today: Operating System Overview (Stallings, chapter 2.1-2.4, 2.8-2.10) Next: Processes (Stallings, chapter 3.1-3.6) 1 Announcements Consulting hours posted Self-Study Exercise #3 posted

More information

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008. Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008. Outline. Language Definition, Translation. History of Programming Languages. Language Definition. There are several different ways one

More information

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction Introduction (Cont.) Introduction to CSE 1325 Object Oriented Programming (Using Java) Sharma Chakravarthy Information Technology Laboratory (IT Lab) Computer Science and Engineering Department The University

More information

An Operating System History of Operating Systems. Operating Systems. Autumn CS4023

An Operating System History of Operating Systems. Operating Systems. Autumn CS4023 Operating Systems Autumn 2017-2018 Outline 1 2 What is an Operating System? From the user s point of view an OS is: A program that acts as an intermediary between a user of a computer and the computer

More information

Chapter 10 :: Data Abstraction and Object Orientation

Chapter 10 :: Data Abstraction and Object Orientation Chapter 10 :: Data Abstraction and Object Orientation Programming Language Pragmatics, Fourth Edition Michael L. Scott Copyright 2016 Elsevier Chapter10_Data_Abstraction_and_Object_Orientation_4e 1 Object-Oriented

More information

Programming. Syntax and Semantics

Programming. Syntax and Semantics Programming For the next ten weeks you will learn basic programming principles There is much more to programming than knowing a programming language When programming you need to use a tool, in this case

More information

CS 113: Introduction to

CS 113: Introduction to CS 113: Introduction to Course information MWF 12:20-1:10pm 1/21-2/15, 306 Hollister Hall Add/drop deadline: 1/28 C Instructor: David Crandall See website for office hours and contact information Prerequisites

More information

STRUCTURING OF PROGRAM

STRUCTURING OF PROGRAM Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the

More information

Concepts of Programming Languages

Concepts of Programming Languages Concepts of Programming Languages Lecture 1 - Introduction Patrick Donnelly Montana State University Spring 2014 Patrick Donnelly (Montana State University) Concepts of Programming Languages Spring 2014

More information

Learning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java

Learning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java Learning objectives The Java Environment Understand the basic features of Java What are portability and robustness? Understand the concepts of bytecode and interpreter What is the JVM? Learn few coding

More information

Lecture Notes on Programming Languages

Lecture Notes on Programming Languages Lecture Notes on Programming Languages 85 Lecture 09: Support for Object-Oriented Programming This lecture discusses how programming languages support object-oriented programming. Topics to be covered

More information

Coverview. C developed in 1972 by Dennis Ritchie and Ken Thompson at AT&T Bell Telephone Laboratories

Coverview. C developed in 1972 by Dennis Ritchie and Ken Thompson at AT&T Bell Telephone Laboratories Coverview C developed in 1972 by Dennis Ritchie and Ken Thompson at AT&T Bell Telephone Laboratories Developed as language to implement UNIX on a DEC PDP- 11. UNIX was a then small operating system to

More information

Written by John Bell for CS 342, Spring 2018

Written by John Bell for CS 342, Spring 2018 Advanced OO Concepts Written by John Bell for CS 342, Spring 2018 Based on chapter 3 of The Object-Oriented Thought Process by Matt Weisfeld, with additional material from other sources. Constructors Constructors

More information

CIS24 Project #3. Student Name: Chun Chung Cheung Course Section: SA Date: 4/28/2003 Professor: Kopec. Subject: Functional Programming Language (ML)

CIS24 Project #3. Student Name: Chun Chung Cheung Course Section: SA Date: 4/28/2003 Professor: Kopec. Subject: Functional Programming Language (ML) CIS24 Project #3 Student Name: Chun Chung Cheung Course Section: SA Date: 4/28/2003 Professor: Kopec Subject: Functional Programming Language (ML) 1 Introduction ML Programming Language Functional programming

More information

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost Chapter One Preliminaries, including Why study PL concepts? Programming domains PL evaluation criteria What influences PL design? Tradeoffs faced by programming languages Implementation methods Programming

More information

Wrapping a complex C++ library for Eiffel. FINAL REPORT July 1 st, 2005

Wrapping a complex C++ library for Eiffel. FINAL REPORT July 1 st, 2005 Wrapping a complex C++ library for Eiffel FINAL REPORT July 1 st, 2005 Semester project Student: Supervising Assistant: Supervising Professor: Simon Reinhard simonrei@student.ethz.ch Bernd Schoeller Bertrand

More information

Java Applets, etc. Instructor: Dmitri A. Gusev. Fall Lecture 25, December 5, CS 502: Computers and Communications Technology

Java Applets, etc. Instructor: Dmitri A. Gusev. Fall Lecture 25, December 5, CS 502: Computers and Communications Technology Java Applets, etc. Instructor: Dmitri A. Gusev Fall 2007 CS 502: Computers and Communications Technology Lecture 25, December 5, 2007 CGI (Common Gateway Interface) CGI is a standard for handling forms'

More information

CPSC 3740 Programming Languages University of Lethbridge. Data Types

CPSC 3740 Programming Languages University of Lethbridge. Data Types Data Types A data type defines a collection of data values and a set of predefined operations on those values Some languages allow user to define additional types Useful for error detection through type

More information

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring Java Outline Java Models for variables Types and type checking, type safety Interpretation vs. compilation Reasoning about code CSCI 2600 Spring 2017 2 Java Java is a successor to a number of languages,

More information

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan EECS 282 Information Systems Design and Programming Atul Prakash Professor, Computer Science and Engineering University of Michigan 1 What is the Course About? A second programming course - but different

More information

CS506 Web Design & Development Final Term Solved MCQs with Reference

CS506 Web Design & Development Final Term Solved MCQs with Reference with Reference I am student in MCS (Virtual University of Pakistan). All the MCQs are solved by me. I followed the Moaaz pattern in Writing and Layout this document. Because many students are familiar

More information

Implementing Object Equivalence in Java Using the Template Method Design Pattern

Implementing Object Equivalence in Java Using the Template Method Design Pattern Implementing Object Equivalence in Java Using the Template Method Design Pattern Daniel E. Stevenson and Andrew T. Phillips Computer Science Department University of Wisconsin-Eau Claire Eau Claire, WI

More information

Atelier Java - J1. Marwan Burelle. EPITA Première Année Cycle Ingénieur.

Atelier Java - J1. Marwan Burelle.  EPITA Première Année Cycle Ingénieur. marwan.burelle@lse.epita.fr http://wiki-prog.kh405.net Plan 1 2 Plan 3 4 Plan 1 2 3 4 A Bit of History JAVA was created in 1991 by James Gosling of SUN. The first public implementation (v1.0) in 1995.

More information

Data Abstraction: The Walls

Data Abstraction: The Walls Chapter 4 Data Abstraction: The Walls 2011 Pearson Addison-Wesley. All rights reserved 4-1 Abstract Data Types Modularity Keeps the complexity of a large program manageable by systematically controlling

More information

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan EECS 282 Information Systems Design and Programming Atul Prakash Professor, Computer Science and Engineering University of Michigan 1 What is the Course About? A second programming course - but different

More information

C++ Programming for Programmers

C++ Programming for Programmers C++ Programming for Programmers Compiled and Presented by Thomas P. Sturm, Ph.D. Graduate Programs in Software Technical Seminar The University of St. Thomas St. Paul, Minnesota Copyright 1992, 1993, 1994,

More information

CS 50 Introduction to Computer Science I

CS 50 Introduction to Computer Science I CS 50 Introduction to Computer Science I Michael D. Smith smith@eecs.harvard.edu Fall 2005 CS50 1 Q1: What s in common? Internet commerce and electronic markets Blockbuster movies and their special effects

More information

The object-oriented programming language Cþþ is

The object-oriented programming language Cþþ is Using Cþþ to Write Automation Controller Software Russell T. Berman*,a Velocity11, Menlo Park, CA Keywords: Cþþ, automation, controller, scheduler, programming The object-oriented programming language

More information

C PROGRAMMING THE C PROGRAMMING THE PDF C PROGRAMMING TUTORIAL IN PDF - CURRENT AFFAIRS 2018 C (PROGRAMMING LANGUAGE) - WIKIPEDIA

C PROGRAMMING THE C PROGRAMMING THE PDF C PROGRAMMING TUTORIAL IN PDF - CURRENT AFFAIRS 2018 C (PROGRAMMING LANGUAGE) - WIKIPEDIA PDF C PROGRAMMING TUTORIAL IN PDF - CURRENT AFFAIRS 2018 C (PROGRAMMING LANGUAGE) - WIKIPEDIA 1 / 6 2 / 6 3 / 6 c programming the pdf C Programming Tutorial in PDF - Learn ANSI, GNU and K/R standard of

More information

Introduction to Java Written by John Bell for CS 342, Spring 2018

Introduction to Java Written by John Bell for CS 342, Spring 2018 Introduction to Java Written by John Bell for CS 342, Spring 2018 Based on chapters 1 to 6 of Learning Java by Patrick Niemeyer and Daniel Leuck, with additional material from other sources. History I

More information

Chapter 9 :: Data Abstraction and Object Orientation

Chapter 9 :: Data Abstraction and Object Orientation Chapter 9 :: Data Abstraction and Object Orientation Programming Language Pragmatics Michael L. Scott Control or PROCESS abstraction is a very old idea (subroutines!), though few languages provide it in

More information

Enterprise Java Unit 1- Chapter 3 Prof. Sujata Rizal Introduction to Servlets

Enterprise Java Unit 1- Chapter 3 Prof. Sujata Rizal Introduction to Servlets 1. Introduction How do the pages you're reading in your favorite Web browser show up there? When you log into your favorite Web site, how does the Web site know that you're you? And how do Web retailers

More information

Fundamentals of Programming (C)

Fundamentals of Programming (C) Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 6 Lecturer: Vahid Khodabakhshi CE 40153 - Fall 97 Lecture 1 Introduction and Brief History Department of Computer

More information

Introduction to Computers and Visual Basic.Net Pearson Education, Inc. All rights reserved.

Introduction to Computers and Visual Basic.Net Pearson Education, Inc. All rights reserved. 1 1 Introduction to Computers and Visual Basic.Net 2 OBJECTIVES In this chapter you will learn: Basic computing concepts. The different types of programming languages. The evolution of the Basic Programming

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

CSE450. Translation of Programming Languages. Lecture 11: Semantic Analysis: Types & Type Checking

CSE450. Translation of Programming Languages. Lecture 11: Semantic Analysis: Types & Type Checking CSE450 Translation of Programming Languages Lecture 11: Semantic Analysis: Types & Type Checking Structure Project 1 - of a Project 2 - Compiler Today! Project 3 - Source Language Lexical Analyzer Syntax

More information

1 The Catholic University of Eastern Africa P.o Box , Nairobi Kenya Edward Kioko 2013

1 The Catholic University of Eastern Africa P.o Box , Nairobi Kenya Edward Kioko 2013 Purpose of the module (A constituent College of Kenyatta University) P.O Box 136-90100, Machakos Kenya Telephone: 044-21604 Email: info@machakosuniversity.ac.ke Website: http://www.machakosuniversity.ac.ke

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Lesson 10A OOP Fundamentals. By John B. Owen All rights reserved 2011, revised 2014

Lesson 10A OOP Fundamentals. By John B. Owen All rights reserved 2011, revised 2014 Lesson 10A OOP Fundamentals By John B. Owen All rights reserved 2011, revised 2014 Table of Contents Objectives Definition Pointers vs containers Object vs primitives Constructors Methods Object class

More information

AN EMPIRICAL STUDY OF EFFICIENCY IN DISTRIBUTED PARALLEL PROCESSING

AN EMPIRICAL STUDY OF EFFICIENCY IN DISTRIBUTED PARALLEL PROCESSING AN EMPIRICAL STUDY OF EFFICIENCY IN DISTRIBUTED PARALLEL PROCESSING DR. ROGER EGGEN Department of Computer and Information Sciences University of North Florida Jacksonville, Florida 32224 USA ree@unf.edu

More information

Comp 333: Concepts of Programming Languages Fall 2016

Comp 333: Concepts of Programming Languages Fall 2016 Comp 333: Concepts of Programming Languages Fall 2016 Instructor: Professor Schwartz History Syntax and Semantics Compilers Language Constructs Names, Binding, Scoping, Data Types Expressions, Control

More information

Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types. Record Types. Pointer and Reference Types

Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types. Record Types. Pointer and Reference Types Chapter 6 Topics WEEK E FOUR Data Types Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types Associative Arrays Record Types Union Types Pointer and Reference

More information

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar www.vuhelp.pk Solved MCQs with reference. inshallah you will found it 100% correct solution. Time: 120 min Marks:

More information

A Comparison of Unified Parallel C, Titanium and Co-Array Fortran. The purpose of this paper is to compare Unified Parallel C, Titanium and Co-

A Comparison of Unified Parallel C, Titanium and Co-Array Fortran. The purpose of this paper is to compare Unified Parallel C, Titanium and Co- Shaun Lindsay CS425 A Comparison of Unified Parallel C, Titanium and Co-Array Fortran The purpose of this paper is to compare Unified Parallel C, Titanium and Co- Array Fortran s methods of parallelism

More information

Towards OpenMP for Java

Towards OpenMP for Java Towards OpenMP for Java Mark Bull and Martin Westhead EPCC, University of Edinburgh, UK Mark Kambites Dept. of Mathematics, University of York, UK Jan Obdrzalek Masaryk University, Brno, Czech Rebublic

More information

Smallworld Core Spatial Technology 4 Smallworld MAGIK : The object oriented language for an object oriented world

Smallworld Core Spatial Technology 4 Smallworld MAGIK : The object oriented language for an object oriented world Smallworld Core Spatial Technology 4 Smallworld MAGIK : The object oriented language for an object oriented world 2004 General Electric Company. All Rights Reserved GER-4235 (09/04) Abstract In the late

More information

6.S096 Lecture 10 Course Recap, Interviews, Advanced Topics

6.S096 Lecture 10 Course Recap, Interviews, Advanced Topics 6.S096 Lecture 10 Course Recap, Interviews, Advanced Topics Grab Bag & Perspective January 31, 2014 6.S096 Lecture 10 Course Recap, Interviews, Advanced Topics January 31, 2014 1 / 19 Outline 1 Perspective

More information

CPS122 Lecture: From Python to Java last revised January 4, Objectives:

CPS122 Lecture: From Python to Java last revised January 4, Objectives: Objectives: CPS122 Lecture: From Python to Java last revised January 4, 2017 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.

More information

Abstract 1. Introduction

Abstract 1. Introduction Jaguar: A Distributed Computing Environment Based on Java Sheng-De Wang and Wei-Shen Wang Department of Electrical Engineering National Taiwan University Taipei, Taiwan Abstract As the development of network

More information