DISCRETE COMPUTER SIMULATION WITH JAVA

Size: px
Start display at page:

Download "DISCRETE COMPUTER SIMULATION WITH JAVA"

Transcription

1 DISCRETE COMPUTER SIMULATION WITH JAVA Ricardo Augusto Cassel Department of Management Science - The Management School - Lancaster University Lancaster, LA1 4YX, United Kingdom Michael Pidd Department of Management Science - The Management School - Lancaster University Lancaster, LA1 4YX, United Kingdom Abstract: Simulation methods use a model of part of the real world as basis of exploration and experimentation. The three-phase approach provides a simple and robust way to develop discrete computer simulation programs. Object orientation is a save way of developing software, since it allows programs to be easily enhanced and enable important variables of the system to be protected and controlled. Java is one of the most popular object-oriented computer programming languages nowadays, specially because of its use in the World Wide Web and its capacity to create applets. This paper shows the use of the three-phase and the object-oriented approaches in discrete computer simulation, and describes the first stages of the simulation library written in Java. Keywords: JAVA language, discrete simulation, object orientation. 1. INTRODUCTION Since time immemorial, man has attempted to find ways to consider the problems that he might face in the future, and simulation is one way to do this. Simulation is the use of model as a basis for exploration and experimentation [Pidd, 1996]. Like all modelling approaches, simulation is used because it may be cheaper, safer, quicker and more secure than using the real system itself [Pidd, 1996]. Cassel and M ller (1996) created a diagram showing the difference between the flow of control of a real system and of a system which is simulated (Figure 1). As it can be seen, the experimentation, in a feedback approach, is realised on the system itself, while using simulation, the experimentation can be realised on the model and the results passed to the system, usually saving money and time. By the 1960's, a new approach for simulation has been started: the computer simulation. This approach has been enabled by the incredible development of computers, which have become quicker, cheaper, smaller and easier to use. Computer simulation methods have developed along with the computers, and may well be the most commonly used of all the analytical tools of management science[pidd, 1992]. In this paper, the word simulation will be used meaning discrete computer simulation.

2 FEEDBACK Inputs + System Outputs FEEDFORWARD FAST Inputs Model + System Outputs CORRECT FIGURE 1: Flow of Control of Real Systems The next sections of the paper will roughly describe the three-phase approach in discrete simulation, give an overview in object oriented programming, introduce the Java language, explain the difficulties that are being faced in learning the language, and the future steps to be followed in writing a library in Java for computer simulation. 2. THREE-PHASE APPROACH IN DISCRETE SIMULATION The three-phase approach was first described by Tocher (1963), and a further detailed description was given by Pidd (1992). This approach admits that most systems have two different kinds of activity: those whose starting time is known, allowing it to be scheduled; and those which depend on some conditions to be started. The activities that are bound to happen or whose starting time can be booked in advance are known as the B activities. Those activities that lie on some conditions to happen are known as the C activities. While in a process oriented model there is an attempt to form a chronological sequence of the activities, making the entities move as far through its process as possible at each time beat, in the three-phase approach the events and activities are treated as if they are independent of one another. Firstly, all the B activities due at the current time of the simulation are executed, and then all the C activities are tried. As an example, it can be seen that, in the process of the figure 2, there are five B activities and four C activities: B Activities (Bound activities) arrive in the petrol station; end of move to available pump; end fill the tank; end buy snack; end pay and leave.

3 Arrive in Petrol Station Go to a Free Pump Fill the Tank Y Buy a Snack? N Buy a Snack Pay Leave FIGURE 2: Example of a Petrol Station C Activities (Conditional activities) move to pump when available; start to fill the tank when pump activated; start to buy a snack; start to pay when cashier free. Having realised how to define the B's and C's activities, the three-phase approach is quite easy to be understood. The three phases to be followed are: A Phase: finds time of the next event and moves clock to that time; B Phase: executes all B's that are due at this time, keeping it constant; C Phase: holds clock constant and attempts all C's until none succeed. 3. OBJECT ORIENTATION Object orientation is a buzzword these days, used to describe languages, styles of programming, user interfaces, and just about anything else, however appropriately or inappropriately [Anuff, 1996]. One of the main claims made for object orientation is that it is the natural way of thinking about things. The world consists of objects, making it straightforward to understand a problem by considering the objects that are part of the system of interest. One of the clearest introduction to the features that characterise object orientation is given by Wegner (1990). To be consider as object-oriented, it seems to be generally agreed that a computer program should have the following features: Class Mechanism In a pure object-oriented view, all program variables are represented in the form of objects which are instances of classes. These classes contain two parts, the member data and the methods. The member data is the variables contained in the class, while the methods are functions used to deal with the data. New classes can be built from other classes, which are either pre-defined or are defined within the program being developed. This ability to define a new class in terms of one earlier class is known as inheritance and helps to avoid the need of defining new classes from the scratch.

4 Encapsulation As said before, a class in an object-oriented program has two parts: the member data and the methods. The member data can be hidden from code in other objects or classes and be only changed by the member functions of its own class. This process is called encapsulation. Encapsulation, therefore, defines the ways in which the member variables are to be manipulated, making sure the data fields will be only altered in manners strictly defined and controlled. This brings two benefits: - there is no need to have global data which can be changed by accident from elsewhere in the program; - it permits programs to be extended and enhanced at later dates as, once again, the risk of accidental damage to data can be fully controlled [Pidd, 1995a]. Polymorphism In an object-oriented language, any computation demanded of an object must be made by giving the name of the object as well as the name of the member function. This is needed because of the feature called polymorphism, which allows different classes to have functions with the same name. Polymorphism also allows an object to respond to the set of messages defined in superclasses of the object's class with methods implemented in the object class. Therefore, to call any member function, the following form is needed: ObjectName.MemberFunctionName The linking of the function to the object may be done by two ways: static binding or dynamic binding. In the static binding, the link of the object type and the function is known before the program is compiled, meaning that it cannot be re-defined as the program runs. In the other hand, in the dynamic binding, there is no need for the programmer to specify the precise type of object before compilation. The use of dynamic binding helps, specially, the creation of queues in which the programmer does not know what type of object is the next to enter the queue. After the small explanation of the three-phase approach and object orientation, there is one question that emerges: is it worth to use the three-phase simulation to link object orientation and discrete simulation? According to Pidd (1995b), though it may seem that process orientation is the obvious way to link object orientation and discrete simulation, when considering systems with complex interactions, two problems occur with this approach: the first is that true synchronicity is lost because the approach pretends that each entity class can be moved on it turn - whereas, in reality, they all move at the same time; the second problem is linked to the first: if the entities' movements are considered in the wrong order, deadlock is possible. Therefore, the linking of object orientation and three-phase simulation is worth serious consideration, specially in large and complex programs. 4. JAVA Java is an object-oriented language that has many elements in common with C and C++, and that is widely used in the World Wide Web, specially because of the Java applets. An applet is a small program that is automatically downloaded from a Web site and run

5 within a Web browser in response to instructions to do so contained within the Web page being viewed [Anuff, 1996]. Java can be called an almost pure object-oriented language, since it deals with everything as objects, besides simple data types, such as integers, characters, and floating point numbers. The language is both compiled an interpreted. This means that, after writing a Java program in a text editor, the programmer has to compile this source file to produce a type of binary object file called a class file. This file is not executable because it contains instructions that are not understandable by the processor. Nevertheless, they are very similar to native machine codes, allowing them to be executed with performance that approaches that of native compiled languages. To run it, a Java interpreter is needed. This may be seen as a drawback of the language, because a program can never be executed in a computer that does not have the interpreter installed. However, Java programs will run unmodified on any platform to which the Java interpreter has been ported. Java has the following characteristics related to the three features that characterise an object-oriented program: related to the class mechanism and inheritance: the Java language does not allow multiple inheritance, i.e., a subclass cannot be created from more than one superclass. In the other hand, Java allows a subclass be created from more than one "special kind of class" called interface. An interface, like a class, has methods and variables, but all variables in an interface are constants and all the methods are abstract methods. Abstract methods are methods that are only declared, and not defined, on the superclass or in the interface. They have to be defined in the class that extends the superclass or that implements the interface. related to the encapsulation: in Java, there are three modifier keywords used to implement encapsulation. Public: methods and variables marked as public can be seen by any other method in the program. Private: a private method or variable cannot be used by any other class, including subclasses. Protected: a protected variable or method can be used only from inside their class or in subclasses of that class. If none of the modifiers is used, the variable or the method can be used by other classes in the same package, but not by classes in other packages. Packages are similar to class libraries, i.e., collections of classes, usually grouped according to functionality. related to polymorphism: in Java, all classes are subclasses of the Object class. This means that, when a dynamic binding is needed, all classes can be considered an Object. 5. LEARNING JAVA Pidd (1996) describes six principles that can be applied when developing a model that will be useful in management science. These principles can also be applied to learn a programming language:

6 Model simple, think complicated In the beginning, when someone is learning a new language, all the programs that are written are very simple. However, the person that is learning the language has to be aware of the future applications of what is being learned. Even, later on, when the programs start to grow, it is important to leave them as simple as possible, allowing anyone to understand what has been done. This leads to the second principle. Be parsimonious, start small and add This principle is sometimes known as KISS, standing for Keep It Simple, Stupid. It is worthwhile to developed small programs, learn with them, and later add and enhance them. Divide and conquer, avoid mega-models It is usual to try to understand new concepts as quick as possible. Therefore, it is usual to try to develop programs that combine all the new concepts. This can be quite dangerous due to the great probability of the program to fail in running and the time spent to find the mistakes. Keeping the programs small and trying to develop new concepts in separated programs can help avoiding time waste. Use metaphors, analogies and similarities This principle can be interpreted in two different ways, concerning the learning of a new programming language. A language can be more easily learned by finding some similarities and making some analogies to other languages already known. In the other hand, this can bring some confusion due to the differences between the languages. Do not fall in love with data In this case, data can be considered all the books and references about the language. Usually, the best way to learn a language is programming, and getting the data just when it is needed. Therefore, the references should be used to answer the questions that arise during the programming, and not to be read over and over. Model building (Language learning) may feel like muddling through Learning a new language is not an activity in which smooth progress is made. Programmers have to know that, sometimes, they are going to get stuck, and it may take a while until they can make any improvement again. Even following the principles, it can take a while to learn Java, mainly because of the its big library of functions, and the difference between the use of references to objects in Java and the usual pointers in other languages like C and C FURTHER STEPS The main purpose of this study is to develop a simulation library written in Java that can be used over the World Wide Web. This library will be platform independent and will be used by anyone who has access to the internet. Besides, Java permits the use of many different graphical interfaces, making the program easy to be run and understood by the user. This can make simulation even more popular and more accessible to everyone interested in this technique.

7 The first steps towards this objective have already been done. The Java language has been learned and some parts of the library have already been developed and written. However, much more has to be done: the remaining parts of the library have to be written; the whole library has to be re-evaluated, since new features of the language have been learned during the developing process; the library has to be run as one, to find out some bugs or some linkage errors between the different parts; the documentation about the library has to be written; the library has to be put in the WWW. ACKNOWLEDGEMENTS Ricardo Augusto Cassel is a Ph.D. student in the Lancaster University and is sponsored by the Brazilian Government through CAPES - Funda ±o Coordena ±o de Aperfei oamento de Pessoal de N vel Superior. REFERENCES ANUFF, E. The Java sourcebook. United States of America, John Wiley & Sons Inc., CASSEL, R. A. & M LLER, C. J. "A simula ±o e os processos de mudan a." Proceedings of the 2nd International Congress of Industrial Engineering, Piracicaba - SP, oct GARSIDE, R. & MARIANI, J. draft version of Java: first contact. Great Britain, International Thomson Publishers, PIDD, M. Computer simulation in management science. Great Britain, John Wiley & Sons Ltd., PIDD, M. "The construction of an object-oriented traffic simulator." Presented to the European Working Group on Transportation, Universitat Politecnica de Catalunya, Barcelona, Sept. 1995a. PIDD, M. "Object-orientation, discrete simulation and the three-phase approach." Journal of the Operational Research Society, 1995b, vol. 46, No. 3, pp PIDD, M. Tools for thinking. Great Britain, John Wiley & Sons Ltd., SCHILDT, H. C++: the complete reference. United States of America, Osborne McGraw-Hill, TOCHER, K. D. The art of simulation. Great Britain, English University Press, WEGNER, P. "Concepts and paradigms of object-oriented programming." OOPS Messenger 1, 7-87.

What are the characteristics of Object Oriented programming language?

What are the characteristics of Object Oriented programming language? What are the various elements of OOP? Following are the various elements of OOP:- Class:- A class is a collection of data and the various operations that can be performed on that data. Object- This is

More information

CHAPTER 5 GENERAL OOP CONCEPTS

CHAPTER 5 GENERAL OOP CONCEPTS CHAPTER 5 GENERAL OOP CONCEPTS EVOLUTION OF SOFTWARE A PROGRAMMING LANGUAGE SHOULD SERVE 2 RELATED PURPOSES : 1. It should provide a vehicle for programmer to specify actions to be executed. 2. It should

More information

Chapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language

Chapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language Categories of languages that support OOP: 1. OOP support is added to an existing language - C++ (also supports procedural and dataoriented programming) - Ada 95 (also supports procedural and dataoriented

More information

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University Introduction to Computers and Programming Languages CS 180 Sunil Prabhakar Department of Computer Science Purdue University 1 Objectives This week we will study: The notion of hardware and software Programming

More information

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction Lecture 13: Object orientation Object oriented programming Introduction, types of OO languages Key concepts: Encapsulation, Inheritance, Dynamic binding & polymorphism Other design issues Smalltalk OO

More information

C++ & Object Oriented Programming Concepts The procedural programming is the standard approach used in many traditional computer languages such as BASIC, C, FORTRAN and PASCAL. The procedural programming

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

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen Computer Programming Computers can t do anything without being told what to do. To make the computer do something useful, you must give it instructions. You can give a computer instructions in two ways:

More information

Evaluating the suitability of Web 2.0 technologies for online atlas access interfaces

Evaluating the suitability of Web 2.0 technologies for online atlas access interfaces Evaluating the suitability of Web 2.0 technologies for online atlas access interfaces Ender ÖZERDEM, Georg GARTNER, Felix ORTAG Department of Geoinformation and Cartography, Vienna University of Technology

More information

3D Graphics Programming Mira Costa High School - Class Syllabus,

3D Graphics Programming Mira Costa High School - Class Syllabus, 3D Graphics Programming Mira Costa High School - Class Syllabus, 2009-2010 INSTRUCTOR: Mr. M. Williams COURSE GOALS and OBJECTIVES: 1 Learn the fundamentals of the Java language including data types and

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

Educational Fusion. Implementing a Production Quality User Interface With JFC

Educational Fusion. Implementing a Production Quality User Interface With JFC Educational Fusion Implementing a Production Quality User Interface With JFC Kevin Kennedy Prof. Seth Teller 6.199 May 1999 Abstract Educational Fusion is a online algorithmic teaching program implemented

More information

1. Write two major differences between Object-oriented programming and procedural programming?

1. Write two major differences between Object-oriented programming and procedural programming? 1. Write two major differences between Object-oriented programming and procedural programming? A procedural program is written as a list of instructions, telling the computer, step-by-step, what to do:

More information

Compaq Interview Questions And Answers

Compaq Interview Questions And Answers Part A: Q1. What are the difference between java and C++? Java adopts byte code whereas C++ does not C++ supports destructor whereas java does not support. Multiple inheritance possible in C++ but not

More information

An Object Oriented Programming with C

An Object Oriented Programming with C An Object Oriented Programming with C By Tanmay Kasbe Dr. Ravi Singh Pippal IDEA PUBLISHING WWW.ideapublishing.in i Publishing-in-support-of, IDEA PUBLISHING Block- 9b, Transit Flats, Hudco Place Extension

More information

CPS 506 Comparative Programming Languages. Programming Language

CPS 506 Comparative Programming Languages. Programming Language CPS 506 Comparative Programming Languages Object-Oriented Oriented Programming Language Paradigm Introduction Topics Object-Oriented Programming Design Issues for Object-Oriented Oriented Languages Support

More information

Concepts of Programming Languages

Concepts of Programming Languages Concepts of Programming Languages Lecture 10 - Object-Oriented Programming Patrick Donnelly Montana State University Spring 2014 Patrick Donnelly (Montana State University) Concepts of Programming Languages

More information

The 10 Minute Guide to Object Oriented Programming

The 10 Minute Guide to Object Oriented Programming The 10 Minute Guide to Object Oriented Programming Why read this? Because the main concepts of object oriented programming (or OOP), often crop up in interviews, and all programmers should be able to rattle

More information

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters.

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters. BLACK BOX SOFTWARE TESTING SPRING 2005 DOMAIN TESTING LAB PROJECT -- GRADING NOTES For all of the cases below, do the traditional equivalence class and boundary analysis. Draw one table and use a new line

More information

THREE PHASE SIMULATION IN JAVA. M. Pidd and R.A. Cassel. Department of Management Science Lancaster University Lancaster LA1 4YX, U.K.

THREE PHASE SIMULATION IN JAVA. M. Pidd and R.A. Cassel. Department of Management Science Lancaster University Lancaster LA1 4YX, U.K. Proceedings of the 1998 Winter Simulation Conference D.J. Medeiros, E.F. Watson, J.S. Carson and M.S. Manivannan, eds. THREE PHASE SIMULATION IN JAVA M. Pidd and R.A. Cassel Department of Management Science

More information

Module 10 Inheritance, Virtual Functions, and Polymorphism

Module 10 Inheritance, Virtual Functions, and Polymorphism Module 10 Inheritance, Virtual Functions, and Polymorphism Table of Contents CRITICAL SKILL 10.1: Inheritance Fundamentals... 2 CRITICAL SKILL 10.2: Base Class Access Control... 7 CRITICAL SKILL 10.3:

More information

Chapter 13. Digital Cash. Information Security/System Security p. 570/626

Chapter 13. Digital Cash. Information Security/System Security p. 570/626 Chapter 13 Digital Cash Information Security/System Security p. 570/626 Introduction While cash is used in illegal activities such as bribing money laundering tax evasion it also protects privacy: not

More information

CS558 Programming Languages Winter 2013 Lecture 8

CS558 Programming Languages Winter 2013 Lecture 8 OBJECT-ORIENTED PROGRAMMING CS558 Programming Languages Winter 2013 Lecture 8 Object-oriented programs are structured in terms of objects: collections of variables ( fields ) and functions ( methods ).

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

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

BCS THE CHARTERED INSTITUTE FOR IT. BCS Higher Education Qualifications BCS Level 6 Professional Graduate Diploma in IT EXAMINERS' REPORT

BCS THE CHARTERED INSTITUTE FOR IT. BCS Higher Education Qualifications BCS Level 6 Professional Graduate Diploma in IT EXAMINERS' REPORT BCS THE CHARTERED INSTITUTE FOR IT BCS Higher Education Qualifications BCS Level 6 Professional Graduate Diploma in IT March 2016 EXAMINERS' REPORT Programming Paradigms General comments on candidates'

More information

6.001 Notes: Section 17.5

6.001 Notes: Section 17.5 6.001 Notes: Section 17.5 Slide 17.5.1 Now, let's look at one example in which changing the evaluation model allows us to explore a very different kind of computational problem. Our goal is to show how

More information

Week - 01 Lecture - 04 Downloading and installing Python

Week - 01 Lecture - 04 Downloading and installing Python Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 04 Downloading and

More information

D Programming Language

D Programming Language Group 14 Muazam Ali Anil Ozdemir D Programming Language Introduction and Why D? It doesn t come with a religion this is written somewhere along the overview of D programming language. If you actually take

More information

Data Abstraction. Hwansoo Han

Data Abstraction. Hwansoo Han Data Abstraction Hwansoo Han Data Abstraction Data abstraction s roots can be found in Simula67 An abstract data type (ADT) is defined In terms of the operations that it supports (i.e., that can be performed

More information

Object Oriented Programming

Object Oriented Programming Binnur Kurt kurt@ce.itu.edu.tr Istanbul Technical University Computer Engineering Department 1 Version 0.1.2 About the Lecturer BSc İTÜ, Computer Engineering Department, 1995 MSc İTÜ, Computer Engineering

More information

CS Internet programming Unit- I Part - A 1 Define Java. 2. What is a Class? 3. What is an Object? 4. What is an Instance?

CS Internet programming Unit- I Part - A 1 Define Java. 2. What is a Class? 3. What is an Object? 4. What is an Instance? CS6501 - Internet programming Unit- I Part - A 1 Define Java. Java is a programming language expressly designed for use in the distributed environment of the Internet. It was designed to have the "look

More information

Lesson 10B Class Design. By John B. Owen All rights reserved 2011, revised 2014

Lesson 10B Class Design. By John B. Owen All rights reserved 2011, revised 2014 Lesson 10B Class Design By John B. Owen All rights reserved 2011, revised 2014 Table of Contents Objectives Encapsulation Inheritance and Composition is a vs has a Polymorphism Information Hiding Public

More information

1: Introduction to Object (1)

1: Introduction to Object (1) 1: Introduction to Object (1) 김동원 2003.01.20 Overview (1) The progress of abstraction Smalltalk Class & Object Interface The hidden implementation Reusing the implementation Inheritance: Reusing the interface

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

Evolving Software. CMSC 433 Programming Language Technologies and Paradigms Spring Example. Some Motivations for This Refactoring

Evolving Software. CMSC 433 Programming Language Technologies and Paradigms Spring Example. Some Motivations for This Refactoring CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Refactoring April 24, 2007 Lots of material taken from Fowler, Refactoring: Improving the Design of Existing Code 1 Evolving Software

More information

INTRODUCTION TO THE COURSE

INTRODUCTION TO THE COURSE 1 INTRODUCTION TO THE COURSE KOM3191 Object-Oriented Programming 2 Outline Computer Organization Machine Languages, Assembly Languages and High-Level Languages History of C++ C++ Development Environment

More information

CS112 Lecture: Defining Instantiable Classes

CS112 Lecture: Defining Instantiable Classes CS112 Lecture: Defining Instantiable Classes Last revised 2/3/05 Objectives: 1. To describe the process of defining an instantiable class 2. To discuss public and private visibility modifiers. Materials:

More information

VIRTUAL FUNCTIONS Chapter 10

VIRTUAL FUNCTIONS Chapter 10 1 VIRTUAL FUNCTIONS Chapter 10 OBJECTIVES Polymorphism in C++ Pointers to derived classes Important point on inheritance Introduction to virtual functions Virtual destructors More about virtual functions

More information

Administrivia. Programming Language Fall Example. Evolving Software. Project 3 coming out Midterm October 28. Refactoring October 14, 2004

Administrivia. Programming Language Fall Example. Evolving Software. Project 3 coming out Midterm October 28. Refactoring October 14, 2004 CMSC 433 Programming Language Fall 2004 Project 3 coming out Midterm October 28 Administrivia Refactoring October 14, 2004 Lots of material taken from Fowler, Refactoring: Improving the Design of Existing

More information

REVIEW OF THE BASIC CHARACTERISTICS OF OBJECT ORIENTATION

REVIEW OF THE BASIC CHARACTERISTICS OF OBJECT ORIENTATION c08classandmethoddesign.indd Page 282 13/12/14 2:57 PM user 282 Chapter 8 Class and Method Design acceptance of UML as a standard object notation, standardized approaches based on work of many object methodologists

More information

Unit E Step-by-Step: Programming with Python

Unit E Step-by-Step: Programming with Python Unit E Step-by-Step: Programming with Python Computer Concepts 2016 ENHANCED EDITION 1 Unit Contents Section A: Hello World! Python Style Section B: The Wacky Word Game Section C: Build Your Own Calculator

More information

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0. L J Howell UX Software Ver. 1.0

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0. L J Howell UX Software Ver. 1.0 VISUAL GUIDE to RX Scripting for Roulette Xtreme - System Designer 2.0 L J Howell UX Software 2009 Ver. 1.0 TABLE OF CONTENTS INTRODUCTION...ii What is this book about?... iii How to use this book... iii

More information

MODERN PROGRAMMING LANGUAGE TECHNIQUES Dilawar 1 1 Ch. Mani Ram Godara Govt. College For Women, Bhodia Khera, Fatehabad, INDIA dilawarfatehabad@gmail.com Abstract--This paper focus on introduction of computer

More information

What is a class? Responding to messages. Short answer 7/19/2017. Code Listing 11.1 First Class. chapter 11. Introduction to Classes

What is a class? Responding to messages. Short answer 7/19/2017. Code Listing 11.1 First Class. chapter 11. Introduction to Classes chapter 11 Code Listing 11.1 First Class Introduction to Classes What is a class? If you have done anything in computer science before, you likely will have heard the term object oriented programming (OOP)

More information

Sri Vidya College of Engineering & Technology

Sri Vidya College of Engineering & Technology UNIT I INTRODUCTION TO OOP AND FUNDAMENTALS OF JAVA 1. Define OOP. Part A Object-Oriented Programming (OOP) is a methodology or paradigm to design a program using classes and objects. It simplifies the

More information

JAVA MOCK TEST JAVA MOCK TEST II

JAVA MOCK TEST JAVA MOCK TEST II http://www.tutorialspoint.com JAVA MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Java Framework. You can download these sample mock tests at your

More information

CS11 Introduction to C++ Fall Lecture 7

CS11 Introduction to C++ Fall Lecture 7 CS11 Introduction to C++ Fall 2012-2013 Lecture 7 Computer Strategy Game n Want to write a turn-based strategy game for the computer n Need different kinds of units for the game Different capabilities,

More information

What is an algorithm?

What is an algorithm? Reminders CS 142 Lecture 4 ADTs & Objects Program 1 was assigned - Due on 1/27 by 11:55pm Spring 2015 2 Object-Oriented Programming (OOP) OOP Definitions Imagine: You and your programming team have written

More information

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year Object Oriented Programming Assistant Lecture Omar Al Khayat 2 nd Year Syllabus Overview of C++ Program Principles of object oriented programming including classes Introduction to Object-Oriented Paradigm:Structures

More information

AN AGENT BASED INTELLIGENT TUTORING SYSTEM FOR PARAMETER PASSING IN JAVA PROGRAMMING

AN AGENT BASED INTELLIGENT TUTORING SYSTEM FOR PARAMETER PASSING IN JAVA PROGRAMMING AN AGENT BASED INTELLIGENT TUTORING SYSTEM FOR PARAMETER PASSING IN JAVA PROGRAMMING 1 Samy Abu Naser 1 Associate Prof., Faculty of Engineering &Information Technology, Al-Azhar University, Gaza, Palestine

More information

Week 6: Data. Let's focus first on application domain data.

Week 6: Data. Let's focus first on application domain data. review of things we already (should) know criteria for external & internal representation basic elementary data types composite data types container data types derived subtypes abstract data types (ADT)

More information

OO is considered to be supported in three points which are usually symbolized as the three vertexes of a triangle: Encapsulació i ocultació

OO is considered to be supported in three points which are usually symbolized as the three vertexes of a triangle: Encapsulació i ocultació Object Orientation Its origin is placed at the beginning of the 70 s in a friendly environment project that Xerox Company developed in Palo lto with a team made up of lan Kay, dele Goldberg and Dan Ingalls.

More information

Multi-Paradigm Approach for Teaching Programming

Multi-Paradigm Approach for Teaching Programming Multi-Paradigm Approach for Teaching Laxmi P Gewali* and John T Minor School of Computer Science University of Nevada, Las Vegas 4505 Maryland Parkway, Las Vegas Nevada 89154 Abstract: Selecting an appropriate

More information

Chapter 1: Object-Oriented Programming Using C++

Chapter 1: Object-Oriented Programming Using C++ Chapter 1: Object-Oriented Programming Using C++ Objectives Looking ahead in this chapter, we ll consider: Abstract Data Types Encapsulation Inheritance Pointers Polymorphism Data Structures and Algorithms

More information

C++ Inheritance and Encapsulation

C++ Inheritance and Encapsulation C++ Inheritance and Encapsulation Private and Protected members Inheritance Type Public Inheritance Private Inheritance Protected Inheritance Special method inheritance 1 Private Members Private members

More information

Exercises: Instructions and Advice

Exercises: Instructions and Advice Instructions Exercises: Instructions and Advice The exercises in this course are primarily practical programming tasks that are designed to help the student master the intellectual content of the subjects

More information

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci)

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci) Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci) Sung Hee Park Department of Mathematics and Computer Science Virginia State University September 18, 2012 The Object-Oriented Paradigm

More information

CSE341, Fall 2011, Lecture 26 Summary

CSE341, Fall 2011, Lecture 26 Summary CSE341, Fall 2011, Lecture 26 Summary Standard Disclaimer: This lecture summary is not necessarily a complete substitute for attending class, reading the associated code, etc. It is designed to be a useful

More information

The Essence of Object Oriented Programming with Java and UML. Chapter 2. The Essence of Objects. What Is an Object-Oriented System?

The Essence of Object Oriented Programming with Java and UML. Chapter 2. The Essence of Objects. What Is an Object-Oriented System? Page 1 of 21 Page 2 of 21 and identity. Objects are members of a class, and the attributes and behavior of an object are defined by the class definition. The Essence of Object Oriented Programming with

More information

Chapter 12. OOP: Creating Object- Oriented Programs. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.

Chapter 12. OOP: Creating Object- Oriented Programs. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 12 OOP: Creating Object- Oriented Programs McGraw-Hill Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Objectives (1 of 2) Use object-oriented terminology correctly. Create

More information

Lecture 7: Data Abstractions

Lecture 7: Data Abstractions Lecture 7: Data Abstractions Abstract Data Types Data Abstractions How to define them Implementation issues Abstraction functions and invariants Adequacy (and some requirements analysis) Towards Object

More information

Domain Specific Search Engine for Students

Domain Specific Search Engine for Students Domain Specific Search Engine for Students Domain Specific Search Engine for Students Wai Yuen Tang The Department of Computer Science City University of Hong Kong, Hong Kong wytang@cs.cityu.edu.hk Lam

More information

The Legacy Bridge Problem. Douglas Lyon and Chris Huntley

The Legacy Bridge Problem. Douglas Lyon and Chris Huntley The Legacy Bridge Problem by Douglas Lyon and Chris Huntley Abstract We present a way to automate the reuse of legacy systems without multiple-inheritance, copying source code, accessing existing code

More information

Towards Reusable Heterogeneous Data-Centric Disentangled Parts

Towards Reusable Heterogeneous Data-Centric Disentangled Parts Towards Reusable Heterogeneous Data-Centric Disentangled Parts Michael Reinsch and Takuo Watanabe Department of Computer Science, Graduate School of Information Science and Technology, Tokyo Institute

More information

Web-based system for learning of communication protocols

Web-based system for learning of communication protocols 38 Web-based system for learning of communication protocols Dan Komosny Brno University of Technology, Czech Republic Summary The paper introduces a new web-based system that provides on-line access to

More information

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 2: Review of Object Orientation 2.1 What is Object Orientation? Procedural paradigm: Software is organized

More information

Scheduling in Multiprocessor System Using Genetic Algorithms

Scheduling in Multiprocessor System Using Genetic Algorithms Scheduling in Multiprocessor System Using Genetic Algorithms Keshav Dahal 1, Alamgir Hossain 1, Benzy Varghese 1, Ajith Abraham 2, Fatos Xhafa 3, Atanasi Daradoumis 4 1 University of Bradford, UK, {k.p.dahal;

More information

Read & Download (PDF Kindle) Data Structures And Other Objects Using Java (4th Edition)

Read & Download (PDF Kindle) Data Structures And Other Objects Using Java (4th Edition) Read & Download (PDF Kindle) Data Structures And Other Objects Using Java (4th Edition) Data Structures and Other Objects Using Java is a gradual, "just-in-time" introduction to Data Structures for a CS2

More information

Software Paradigms (Lesson 3) Object-Oriented Paradigm (2)

Software Paradigms (Lesson 3) Object-Oriented Paradigm (2) Software Paradigms (Lesson 3) Object-Oriented Paradigm (2) Table of Contents 1 Reusing Classes... 2 1.1 Composition... 2 1.2 Inheritance... 4 1.2.1 Extending Classes... 5 1.2.2 Method Overriding... 7 1.2.3

More information

OBJECT ORIENTED SOFTWARE DEVELOPMENT USING JAVA (2ND EDITION) BY XIAOPING JIA

OBJECT ORIENTED SOFTWARE DEVELOPMENT USING JAVA (2ND EDITION) BY XIAOPING JIA Read Online and Download Ebook OBJECT ORIENTED SOFTWARE DEVELOPMENT USING JAVA (2ND EDITION) BY XIAOPING JIA DOWNLOAD EBOOK : OBJECT ORIENTED SOFTWARE DEVELOPMENT USING Click link bellow and free register

More information

BUSINESS COMMUNICATION: AN INTRODUCTION

BUSINESS COMMUNICATION: AN INTRODUCTION BUSINESS COMMUNICATION: AN INTRODUCTION 1.1 INTRODUCTION 1.2 ROLE OF COMMUNICATION IN BUSINESS 1.3 DEFINITIONS OF COMMUNICATION 1.4 PURPOSE OF COMMUNICATION 1.5 THE COMMUNICATION SITUATION 1.6 THE COMMUNICATION

More information

Class #7 Guidebook Page Expansion. By Ryan Stevenson

Class #7 Guidebook Page Expansion. By Ryan Stevenson Class #7 Guidebook Page Expansion By Ryan Stevenson Table of Contents 1. Class Purpose 2. Expansion Overview 3. Structure Changes 4. Traffic Funnel 5. Page Updates 6. Advertising Updates 7. Prepare for

More information

Out for Shopping-Understanding Linear Data Structures English

Out for Shopping-Understanding Linear Data Structures English Out for Shopping-Understanding Linear Data Structures English [MUSIC PLAYING] [MUSIC PLAYING] TANZEELA ALI: Hi, it's Tanzeela Ali. I'm a software engineer, and also a teacher at Superior University, which

More information

An Overview of Visual Basic.NET: A History and a Demonstration

An Overview of Visual Basic.NET: A History and a Demonstration OVERVIEW o b j e c t i v e s This overview contains basic definitions and background information, including: A brief history of programming languages An introduction to the terminology used in object-oriented

More information

Data Structures And Other Objects Using Java Download Free (EPUB, PDF)

Data Structures And Other Objects Using Java Download Free (EPUB, PDF) Data Structures And Other Objects Using Java Download Free (EPUB, PDF) This is the ebook of the printed book and may not include any media, website access codes, or print supplements that may come packaged

More information

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given MUHAMMAD FAISAL MIT 4 th Semester Al-Barq Campus (VGJW01) Gujranwala faisalgrw123@gmail.com MEGA File Solved MCQ s For Final TERM EXAMS CS508- Modern Programming Languages Question No: 1 ( Marks: 1 ) -

More information

Aptitude Sample Questions

Aptitude Sample Questions Aptitude Sample Questions English Usage Q1. Fill in the blank(s) with the most suitable option. French is difficult language. A. the B. an C. a D. some Q2. Mark the option which is closest to the meaning

More information

Making Inheritance Work: C++ Issues

Making Inheritance Work: C++ Issues Steven Zeil September 19, 2013 Contents 1 Base Class Function Members 2 2 Assignment and Subtyping 3 3 Virtual Destructors 5 4 Virtual Assignment 9 5 Virtual constructors 11 51 Cloning 13 6 Downcasting

More information

Making Inheritance Work: C++ Issues

Making Inheritance Work: C++ Issues Steven Zeil September 19, 2013 Contents 1 Base Class Function Members 2 2 Assignment and Subtyping 3 3 Virtual Destructors 4 4 Virtual Assignment 7 5 Virtual constructors 9 51 Cloning 11 6 Downcasting

More information

B16 Object Oriented Programming

B16 Object Oriented Programming B16 Object Oriented Programming Michael A. Osborne mosb@robots.ox.ac.uk http://www.robots.ox.ac.uk/~mosb/teaching.html#b16 Hilary 2013 This course will introduce object-oriented programming (OOP). It will

More information

MAHALAKSHMI ENGINEERING COLLEGE B TIRUCHIRAPALLI

MAHALAKSHMI ENGINEERING COLLEGE B TIRUCHIRAPALLI MAHALAKSHMI ENGINEERING COLLEGE B TIRUCHIRAPALLI 621213 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Sub code: CS2203 SEM: III Sub Name: Object Oriented Programming Year: II UNIT-I PART-A 1. What is

More information

Late Binding; OOP as a Racket Pattern

Late Binding; OOP as a Racket Pattern Late Binding; OOP as a Racket Pattern Today Dynamic dispatch aka late binding aka virtual method calls Call to self.m2() in method m1 defined in class C can resolve to a method m2 defined in a subclass

More information

What is an algorithm?

What is an algorithm? Reminders CS 142 Lecture 3 Analysis, ADTs & Objects Program 1 was assigned - Due on 1/27 by 11:55pm 2 Abstraction Measuring Algorithm Efficiency When you utilize the mylist.index(item) function you are

More information

8. Object-oriented Programming. June 15, 2010

8. Object-oriented Programming. June 15, 2010 June 15, 2010 Introduction to C/C++, Tobias Weinzierl page 1 of 41 Outline Recapitulation Copy Constructor & Operators Object-oriented Programming Dynamic and Static Polymorphism The Keyword Static The

More information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information

INTRODUCTION TO SAMPLING 1

INTRODUCTION TO SAMPLING 1 INTRODUCTION TO SAMPLING 1 1.1 What is sampling? This book is an introduction to the creation of virtual instruments through sampling. Sampling is the process of recording a sound source one part at a

More information

This chapter is intended to take you through the basic steps of using the Visual Basic

This chapter is intended to take you through the basic steps of using the Visual Basic CHAPTER 1 The Basics This chapter is intended to take you through the basic steps of using the Visual Basic Editor window and writing a simple piece of VBA code. It will show you how to use the Visual

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

Advanced Object-Oriented Programming Introduction to OOP and Java

Advanced Object-Oriented Programming Introduction to OOP and Java Advanced Object-Oriented Programming Introduction to OOP and Java Dr. Kulwadee Somboonviwat International College, KMITL kskulwad@kmitl.ac.th Course Objectives Solidify object-oriented programming skills

More information

Design Principles for a Beginning Programming Language

Design Principles for a Beginning Programming Language Design Principles for a Beginning Programming Language John T Minor and Laxmi P Gewali School of Computer Science University of Nevada, Las Vegas Abstract: We consider the issue of designing an appropriate

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

Towards The Adoption of Modern Software Development Approach: Component Based Software Engineering

Towards The Adoption of Modern Software Development Approach: Component Based Software Engineering Indian Journal of Science and Technology, Vol 9(32), DOI: 10.17485/ijst/2016/v9i32/100187, August 2016 ISSN (Print) : 0974-6846 ISSN (Online) : 0974-5645 Towards The Adoption of Modern Software Development

More information

Type Checking and Type Equality

Type Checking and Type Equality Type Checking and Type Equality Type systems are the biggest point of variation across programming languages. Even languages that look similar are often greatly different when it comes to their type systems.

More information

the NXT-G programming environment

the NXT-G programming environment 2 the NXT-G programming environment This chapter takes a close look at the NXT-G programming environment and presents a few simple programs. The NXT-G programming environment is fairly complex, with lots

More information

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT OBJECT ORIENTED PROGRAMMING

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT OBJECT ORIENTED PROGRAMMING BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT OBJECT ORIENTED PROGRAMMING Wednesady 23 rd March 2016 Afternoon Answer any FOUR questions out of SIX. All

More information

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 43 Dynamic Binding (Polymorphism): Part III Welcome to Module

More information

Principles of Programming Languages. Objective-C. Joris Kluivers

Principles of Programming Languages. Objective-C. Joris Kluivers Principles of Programming Languages Objective-C Joris Kluivers joris.kluivers@gmail.com History... 3 NeXT... 3 Language Syntax... 4 Defining a new class... 4 Object identifiers... 5 Sending messages...

More information

Media Services Online Mohammed Abukhiran. Report 13 on the work of Week 13

Media Services Online Mohammed Abukhiran. Report 13 on the work of Week 13 Media Services Online Mohammed Abukhiran Report 13 on the work of Week 13 Berea College Nov 30, 2010 Application Development Project Concept Proposal Media Services at Berea College uses Voyger (Database

More information

The State Design Pattern

The State Design Pattern B B Chapter 24 The State Design Pattern The state design pattern is an object-oriented technique that uses inheritance and class composition. It is applicable to a variety of software design problems where

More information