Changes and Enhancements to the SAS Component Language (SCL)

Size: px
Start display at page:

Download "Changes and Enhancements to the SAS Component Language (SCL)"

Transcription

1 Changes and Enhancements to the SAS Component Language (SCL) Carl LaChapelle

2 Introduction SCL has undergone many changes over the years. None have been more dramatic than the changes made between V6 and V8.

3 Topics to be Covered! Dot Notation! SCOM! Declare Statement! List Syntax! Error Handling! Method Improvements! Array Enhancements! Question & Answers

4 Dot Notation! Clear and consistent syntax for accessing an object s methods and attributes! First-level qualifier is always the name of the object! Second-level qualifier is attribute or method name

5 Dot Notation! Don t have to remember which method to call(send, notify)! Less prone to syntax errors! Object names can now be up to 32 characters

6 Dot Notation returnvalue = object.method(); object.attribute = value; value = object.attribute;

7 Before Dot Notation list = makelist(); call notify( graph, _get_region_,list); title = getnitemc( list, border_title ); style = getnitemc( list, border_style ); color = getnitemc( list, border_color ); rc = dellist(); put title= style= color=;

8 With Dot Notation put graph.bordertitle= graph.borderstyle= graph.bordercolor=;

9 SCOM! SAS Component Object Model! An object with specific properties:! Attributes! Methods! Events! Event handlers! Interfaces

10 SCOM! A legacy(v6) object s name refers to the object s value.! A component s name refers to the component s object ID.

11 SCOM! You can use dot notation with legacy objects! Select Use object name as ID in SCL checkbox in the property sheet! Set value of objectnameusage attribute to ID in the class editor! Programmatically declare object of correct type

12 SCOM! For more details on SCOM, refer to the SUGI24 paper titled: SAS Component Object Model (SCOM) in Version 7 of SAS/AF Software

13 Declare Statement! New DECLARE(or DCL) statement! Use to declare all variables! Valid variable types are:! Character! Numeric! List! Object! Array

14 Declaring Variables! The DCL statement uses a set of keywords to recognize type declarations! NUM! CHAR! LIST! OBJECT! 4-level class name

15 Declaring Variables! Blanks are used to separate variables of the same type, commas separate variables of disparate types dcl char lastname = Smith ; dcl list mylist; dcl num age weight, char(20) lastname;

16 Declaring Objects! There are two ways to declare objects! Declare it as a generic object declare object myobject;! Specify the class name that the object represents declare sashelp.fsp.image.class imgobj;

17 Declaring Variables dcl char(10) name colors, num cost; dcl num age(3) = (21, 40, 65); dcl sashelp.classes.datasetlist_c myobj = instance(loadclass( sashelp )); dcl list mylist = makelist(); dcl list colorlist = { red, green, blue };

18 Declaring Objects! When instantiating objects or creating lists using the DCL statement, it is your responsibility to perform the appropriate cleanup(dellist, _term)

19 List Syntax! Can be used anywhere in your SCL! The rules are:! Use { to begin the definition of a list! Use } to end the definition of a list! Use name= to name an item! Separate items in the list with commas! Embed sublists by using additional { }

20 List Syntax colorlist = { red, green, blue }; infolist = { firstname = Carl, lastname = LaChapelle }; infolist = { employee = { firstname = Carl, lastname = LaChapelle }, company = SAS };

21 List Syntax! Cannot use variable substitution or string concatenation when defining a list item! Remember to call DELLIST!

22 List Functions! comparelist! getitemo! getnitemo! inserto! searcho! setitemo! setnitemo

23 Error Handling! It s now possible to trap program halts, and control program execution! Use program halt class to do this (sashelp.classes.programhalt.class)! You can determine what has happened, and conditionally allow the execution to continue

24 Error Handling! Override methods in programhalt class to trap specific errors _onattributeerror _ongeneric _ongenericmath _onoverflow _onunderflow _onzerodivide

25 Error Handling! The attributes of the programhalt class give you information about the halt these attributes are read-only! dump(list) A list containing the actual program halt! entry(char) The four-level name of the entry where the program halt occurred

26 Error Handling! Keyword(char) The name of the method or function in which the program halt occurred! keywordtype(char) Indicates what the value of the keyword attribute represents! linenumber(num) The line number in the entry where the halt occurred

27 Error Handling! traceback(list) A list which contains the SCL traceback! type(char) Indicates the type of program halt that has occurred(generic, genericmath, overflow, underflow, zerodivide, attributerror)

28 Error Handling! To control execution you can set the stopexecution attribute! The default value is Yes, which causes execution to terminate! If set to No, execution will continue at the instruction following the one that caused the program halt

29 Error Handling! A more limited alternative is to use the nohaltondotattribute option on the CONTROL statement! This only affects program halts that are due to setting attribute values! You don t know that a program halt has occurred

30 What s New With Methods?! New naming conventions! Method signatures! Method overloading

31 Method Naming Conventions! Fewer underscores! V6 _set_text_color_! V8 _settextcolor! For compatibility purposes both names are equivalent! Mixed casing for presentation, but not for comparison! You can create methods with a leading underscore

32 Method Signatures! A method signature is a set of parameters that uniquely identifies a method to the SCL compiler! Can improve the performance of your application! Allows you to have overloaded methods

33 Method Signatures! A method signature is a set of parameters that uniquely identifies a method to the SCL compiler! Can improve the performance of you application! Allows you to have overloaded methods

34 Method Signatures! The signature is usually represented by the sigstring! The format is (parms)returnval! (None) is not the same as ()V

35 Method Signatures! The method signatures are used by the compiler to detect the following errors! The method does not exist in the class! The incorrect number or type of arguments are being passed to the method! By validating at compile time, run time checking is reduced or eliminated

36 Method Signatures! The compile time validation and run time performance gains are subject to the following rules! Only supported through dot notation, or USECLASS, and not call SEND or NOTIFY! Method cannot have a signature of (None)

37 Method Overloading! Method overloading is when a component has more than one method with the same name, but different signatures dcl char(10) color, num r g b; myobj.setcolor( color ); /* (C)V */ myobj.setcolor( r, g, b ); /* (NNN)V */

38 Method Overloading! Rules for overloading methods! A method with a signature of (None) cannot be overloaded! The signatures cannot differ only by return type M1(NC)V M1(NN)N is valid M1(NC)V M1(NC)N is not valid

39 Declaring MethodsMethod Scope! You can specify additional information when declaring a method! Define the methods scope! PUBLIC(default), PRIVATE, PROTECTED! Define the role of each argument! INPUT, OUTPUT, UPDATE(default)! Specify the type of the return value

40 Method Scope! If Scope='Public', then any class and frame SCL can call the method. The method does appear in the component's Properties window at build time. This is the default method scope.

41 Method Scope! If Scope='Protected', then only the class and any subclasses can call the method. The method does not appear in the component's Properties window at build time, nor can you access the method via frame SCL.

42 Method Scope! If Scope='Private', then only the class itself can call the method. The method does not appear in the component's Properties window at build time, nor can you access the method via frame SCL.

43 Declaring Methods! The defaults are the same as V6! As with V6, only an argument s name and type are required

44 USECLASS! Allows the compiler to validate the SCL code against the information in the class entry! Improved run time performance due to validation occurring at compile time instead of at run time! Syntax shortcuts can be used (no more _self_)

45 USECLASS Syntax USECLASS four-level-class-name < one or more method blocks > ENDUSECLASS; Where four-level-name is the name of the class entry that owns the methods you are implementing

46 Class Syntax! You can now create and manage a class in SCL!! Useful when making lengthy and repetitive changes! Allows you to diff two classes

47 Class Syntax <ABSTRACT> CLASS class-name <EXTENDS parent-class-name> <SUPPORTED supported-interface> <REQUIRED required-interface> </ (class-metadata)> <(attribute-statements)> <(method-declaration-statements)> <(method-implementation-blocks)> <(event-declaration-statements)> <(eventhandler-declaration-statements)> ENDCLASS;

48 Class Syntax! To create an SCL entry from a class! Use File->Save As in class editor! Call createscl function

49 Dynamic Arrays! Do not specify the size when you declare them dcl num depts[ 5 ] employees[ * ];! Allocate and resize them as needed in your SCL program! Must allocate the array before elements can be referenced or assigned

50 Array Enhancements! Can now be used in assignment statements! When passed as a parameter they are treated as a reference! Can be used as a return argument for a method! Both static and dynamic arrays can be used as attributes in a class

51 Array Functions! makearray! redim! copyarray! comparearray! delarray! redimopt(8.1)

52 New Host Dialogs! The following functions now display host specific dialog windows! messagebox! openentrydialog! saveentrydialog! opensasfiledialog! savesasfiledialog

53 Conclusion We have made a significant number of enhancements to SCL in V8! A simpler coding style! Improved OO features! Improved validation, and performance However, these enhancements were not made at the expense of your existing applications

54 Questions?

55 Acknowledgements! Tammy did a tremendous amount of work on this presentation! Thank you for attending!

56 About the Speaker Speaker Location of company Carl LaChapelle Director, Display Products SAS Institute Inc. SAS Campus Dr. Cary, NC, Telephone Fax (919) (919)

Changes and Enhancements

Changes and Enhancements ix Introduction This section describes the features of SAS Component Language that have been implemented or enhanced since Release 6.12. Information about changes and enhancements that were implemented

More information

ABSTRACT INTRODUCTION. How Things Worked in Version 6

ABSTRACT INTRODUCTION. How Things Worked in Version 6 Dressing Up Your Version 6 Objects to be Version 7 Components Glen R. Walker, SAS Institute Inc, Cary, NC Tammy L. Gagliano, SAS Institute Inc, Chicago, IL ABSTRACT Version 7 SAS/AF software exploits the

More information

Handling Exceptions. Introduction. Using the Program Halt Handler CHAPTER 10

Handling Exceptions. Introduction. Using the Program Halt Handler CHAPTER 10 157 CHAPTER 10 Handling Exceptions Introduction 157 Using the Program Halt Handler 157 Handling Exceptions with CATCH and THROW 158 Example 160 How SCL Determines Which CATCH Block To Execute 160 Catching

More information

SCL Arrays. Introduction. Declaring Arrays CHAPTER 4

SCL Arrays. Introduction. Declaring Arrays CHAPTER 4 37 CHAPTER 4 SCL Arrays Introduction 37 Declaring Arrays 37 Referencing Array Elements 38 Grouping Variables That Have Sequential Names 39 Initializing The Elements of A Static Array 39 Assigning the Same

More information

r obj1 = 'sasuser.sugi.af.grseg';", can take to make your existing classes work as SCOM components and what advantages this will bring.

r obj1 = 'sasuser.sugi.af.grseg';, can take to make your existing classes work as SCOM components and what advantages this will bring. Dressing Up Your Version 6 Ob!ects to be Version 7 Components Glen R. Walker, SAS Institute Inc, Cary, NC Tammy L. Gagliano, SAS Institute Inc, Chicago, IL ABSTRACT Version 7 SASlAF" software exploits

More information

Error Trapping Techniques for SCL. Andrew Rosenbaum, Trilogy Consulting, Kalamazoo, MI

Error Trapping Techniques for SCL. Andrew Rosenbaum, Trilogy Consulting, Kalamazoo, MI Paper 28-26 Error Trapping Techniques for SCL Andrew Rosenbaum, Trilogy Consulting, Kalamazoo, MI ABSTRACT An often-overlooked aspect of applications programming is error trapping. There are always unexpected

More information

Getting Started with SAS/A~ Software Steven A. Wilson, MAJARO lnfosystems, Inc., San Jose CA

Getting Started with SAS/A~ Software Steven A. Wilson, MAJARO lnfosystems, Inc., San Jose CA Getting Started with SAS/A~ Software Steven A. Wilson, MAJARO lnfosystems, Inc., San Jose CA ABSTRACT This workshop will be an introductory guide to the development of interactive computer systems using

More information

02 Features of C#, Part 1. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211

02 Features of C#, Part 1. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211 02 Features of C#, Part 1 Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211 Module Overview Constructing Complex Types Object Interfaces and Inheritance Generics Constructing

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

Introduction to Programming. Writing Programs Syntax, Logic and Run-time Errors

Introduction to Programming. Writing Programs Syntax, Logic and Run-time Errors Introduction to Programming Writing Programs Syntax, Logic and Run-time Errors Error Types in Visual Basic There are three main types of errors that can occur while programming in Visual Basic. Knowing

More information

Introduction. Getting Started with the Macro Facility CHAPTER 1

Introduction. Getting Started with the Macro Facility CHAPTER 1 1 CHAPTER 1 Introduction Getting Started with the Macro Facility 1 Replacing Text Strings Using Macro Variables 2 Generating SAS Code Using Macros 3 Inserting Comments in Macros 4 Macro Definition Containing

More information

Object-Oriented Programming

Object-Oriented Programming Object-Oriented Programming 1. What is object-oriented programming (OOP)? OOP is a technique to develop logical modules, such as classes that contain properties, methods, fields, and events. An object

More information

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 10 Creating Classes and Objects Objectives After studying this chapter, you should be able to: Define a class Instantiate an object from a class

More information

Inheritance and Polymorphism

Inheritance and Polymorphism Object Oriented Programming Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. Al-Azhar University Website: eaymanelshenawy.wordpress.com Email : eaymanelshenawy@azhar.edu.eg

More information

CHAPTER 7 Using Other SAS Software Products

CHAPTER 7 Using Other SAS Software Products 77 CHAPTER 7 Using Other SAS Software Products Introduction 77 Using SAS DATA Step Features in SCL 78 Statements 78 Functions 79 Variables 79 Numeric Variables 79 Character Variables 79 Expressions 80

More information

In Version 7, the code would look like:

In Version 7, the code would look like: Dressing Up Your Version 6 Oblects to be Version 7 Components Glen R. Walker, SAS Institute Inc, Cary, NC Tammy L. Gagliano, SAS Institute Inc, Chicago, IL ABSTRACT Version 7 SASlAfi8 software exploits

More information

SCL Lists. Introduction CHAPTER 5

SCL Lists. Introduction CHAPTER 5 47 CHAPTER 5 SCL Lists Introduction 47 Creating Data Dynamically 48 Identifying SCL Lists 48 Creating New Lists 48 Example: Creating an SCL List 49 Initializing the Values in a List 51 Manipulating SCL

More information

HOW TO DEVELOP A SAS/AF APPLICATION

HOW TO DEVELOP A SAS/AF APPLICATION PS001 Creating Effective Graphical User Interfaces Using Version 8 SAS/AF Anders Longthorne, National Highway Traffic Safety Administration, Washington, DC ABSTRACT Improving access to an organization

More information

C a; C b; C e; int c;

C a; C b; C e; int c; CS1130 section 3, Spring 2012: About the Test 1 Purpose of test The purpose of this test is to check your knowledge of OO as implemented in Java. There is nothing innovative, no deep problem solving, no

More information

Access Forms Masterclass 5 Create Dynamic Titles for Your Forms

Access Forms Masterclass 5 Create Dynamic Titles for Your Forms Access Forms Masterclass 5 Create Dynamic Titles for Your Forms Published: 13 September 2018 Author: Martin Green Screenshots: Access 2016, Windows 10 For Access Versions: 2007, 2010, 2013, 2016 Add a

More information

Object Orientation Fourth Story. Bok, Jong Soon

Object Orientation Fourth Story. Bok, Jong Soon Object Orientation Fourth Story Bok, Jong Soon javaexpert@nate.com www.javaexpert.co.kr abstract Methods Java allows you to specify that a superclass declares a method that does not supply an implementation.

More information

Python for Analytics. Python Fundamentals RSI Chapters 1 and 2

Python for Analytics. Python Fundamentals RSI Chapters 1 and 2 Python for Analytics Python Fundamentals RSI Chapters 1 and 2 Learning Objectives Theory: You should be able to explain... General programming terms like source code, interpreter, compiler, object code,

More information

Using SAS Files. Introduction CHAPTER 5

Using SAS Files. Introduction CHAPTER 5 123 CHAPTER 5 Using SAS Files Introduction 123 SAS Data Libraries 124 Accessing SAS Files 124 Advantages of Using Librefs Rather than OpenVMS Logical Names 124 Assigning Librefs 124 Using the LIBNAME Statement

More information

Chapter 12. OOP: Creating Object-Oriented Programs The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Chapter 12. OOP: Creating Object-Oriented Programs The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 12 OOP: Creating Object-Oriented Programs McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives - 1 Use object-oriented terminology correctly Create a two-tier

More information

Lecture 02, Fall 2018 Friday September 7

Lecture 02, Fall 2018 Friday September 7 Anatomy of a class Oliver W. Layton CS231: Data Structures and Algorithms Lecture 02, Fall 2018 Friday September 7 Follow-up Python is also cross-platform. What s the advantage of Java? It s true: Python

More information

Microsoft Visual Basic 2005 CHAPTER 5. Mobile Applications Using Decision Structures

Microsoft Visual Basic 2005 CHAPTER 5. Mobile Applications Using Decision Structures Microsoft Visual Basic 2005 CHAPTER 5 Mobile Applications Using Decision Structures Objectives Write programs for devices other than a personal computer Understand the use of handheld technology Write

More information

Arrays Classes & Methods, Inheritance

Arrays Classes & Methods, Inheritance Course Name: Advanced Java Lecture 4 Topics to be covered Arrays Classes & Methods, Inheritance INTRODUCTION TO ARRAYS The following variable declarations each allocate enough storage to hold one value

More information

You must declare all variables before they can be used. Following is the basic form of a variable declaration:

You must declare all variables before they can be used. Following is the basic form of a variable declaration: Variable Types A variable provides us with named storage that our programs can manipulate. Each variable in Java has a specific type, which determines the size and layout of the variable's memory; the

More information

BBM 102 Introduction to Programming II Spring Inheritance

BBM 102 Introduction to Programming II Spring Inheritance BBM 102 Introduction to Programming II Spring 2018 Inheritance 1 Today Inheritance Notion of subclasses and superclasses protected members UML Class Diagrams for inheritance 2 Inheritance A form of software

More information

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this

More information

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity. OOPS Viva Questions 1. What is OOPS? OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class.

More information

SYSTEM 2000 Essentials

SYSTEM 2000 Essentials 7 CHAPTER 2 SYSTEM 2000 Essentials Introduction 7 SYSTEM 2000 Software 8 SYSTEM 2000 Databases 8 Database Name 9 Labeling Data 9 Grouping Data 10 Establishing Relationships between Schema Records 10 Logical

More information

OVERRIDING. 7/11/2015 Budditha Hettige 82

OVERRIDING. 7/11/2015 Budditha Hettige 82 OVERRIDING 7/11/2015 (budditha@yahoo.com) 82 What is Overriding Is a language feature Allows a subclass or child class to provide a specific implementation of a method that is already provided by one of

More information

FSEDIT Procedure Windows

FSEDIT Procedure Windows 25 CHAPTER 4 FSEDIT Procedure Windows Overview 26 Viewing and Editing Observations 26 How the Control Level Affects Editing 27 Scrolling 28 Adding Observations 28 Entering and Editing Variable Values 28

More information

Introduction to Data Entry and Data Types

Introduction to Data Entry and Data Types 212 Chapter 4 Variables and Arithmetic Operations STEP 1 With the Toolbox visible (see Figure 4-21), click the Toolbox Close button. The Toolbox closes and the work area expands in size.to reshow the Toolbox

More information

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming Overview of OOP Object Oriented Programming is a programming method that combines: a) Data b) Instructions for processing that data into a self-sufficient object that can be used within a program or in

More information

CS313D: ADVANCED PROGRAMMING LANGUAGE

CS313D: ADVANCED PROGRAMMING LANGUAGE CS313D: ADVANCED PROGRAMMING LANGUAGE Computer Science department Lecture 4(b): Inheritance & Polymorphism Lecture Contents What is Inheritance? Super-class & sub class The object class Using extends keyword

More information

Chapter 10 Classes Continued. Fundamentals of Java

Chapter 10 Classes Continued. Fundamentals of Java Chapter 10 Classes Continued Objectives Know when it is appropriate to include class (static) variables and methods in a class. Understand the role of Java interfaces in a software system and define an

More information

MODULE III: NAVIGATING AND FORMULAS

MODULE III: NAVIGATING AND FORMULAS MODULE III: NAVIGATING AND FORMULAS Copyright 2012, National Seminars Training Navigating and Formulas Using Grouped Worksheets When multiple worksheets are selected, the worksheets are grouped. If you

More information

Declarations and Access Control SCJP tips

Declarations and Access Control  SCJP tips Declarations and Access Control www.techfaq360.com SCJP tips Write code that declares, constructs, and initializes arrays of any base type using any of the permitted forms both for declaration and for

More information

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide AP Computer Science Chapter 10 Implementing and Using Classes Study Guide 1. A class that uses a given class X is called a client of X. 2. Private features of a class can be directly accessed only within

More information

7/8/10 KEY CONCEPTS. Problem COMP 10 EXPLORING COMPUTER SCIENCE. Algorithm. Lecture 2 Variables, Types, and Programs. Program PROBLEM SOLVING

7/8/10 KEY CONCEPTS. Problem COMP 10 EXPLORING COMPUTER SCIENCE. Algorithm. Lecture 2 Variables, Types, and Programs. Program PROBLEM SOLVING KEY CONCEPTS COMP 10 EXPLORING COMPUTER SCIENCE Lecture 2 Variables, Types, and Programs Problem Definition of task to be performed (by a computer) Algorithm A particular sequence of steps that will solve

More information

COSC 123 Computer Creativity. Introduction to Java. Dr. Ramon Lawrence University of British Columbia Okanagan

COSC 123 Computer Creativity. Introduction to Java. Dr. Ramon Lawrence University of British Columbia Okanagan COSC 123 Computer Creativity Introduction to Java Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Key Points 1) Introduce Java, a general-purpose programming language,

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

20. VB Programming Fundamentals Variables and Procedures

20. VB Programming Fundamentals Variables and Procedures 20. VB Programming Fundamentals Variables and Procedures 20.1 Variables and Constants VB, like other programming languages, uses variables for storing values. Variables have a name and a data type. Array

More information

g 6 User Guide for VBA

g 6 User Guide for VBA ? s W g ;0 6 t 9} = 3 * 7 & A # z m @! 92 % 2 5 + User Guide for VBA Contents Introduction................................................1 About VBA in WordPerfect Office X5................................

More information

Database Programming Style Guidelines

Database Programming Style Guidelines Database Programming Style Guidelines Version 1.1, April 2001 Copyright D-Bross Table of Content Introduction Standardization is Important Interpretation Tables Primary Tables Linking Tables Lookup Tables

More information

CLASSES AND OBJECTS IN JAVA

CLASSES AND OBJECTS IN JAVA Lesson 8 CLASSES AND OBJECTS IN JAVA (1) Which of the following defines attributes and methods? (a) Class (b) Object (c) Function (d) Variable (2) Which of the following keyword is used to declare Class

More information

Lecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166

Lecture 20. Java Exceptional Event Handling. Dr. Martin O Connor CA166 Lecture 20 Java Exceptional Event Handling Dr. Martin O Connor CA166 www.computing.dcu.ie/~moconnor Topics What is an Exception? Exception Handler Catch or Specify Requirement Three Kinds of Exceptions

More information

2. Numbers In, Numbers Out

2. Numbers In, Numbers Out REGZ9280: Global Education Short Course - Engineering 2. Numbers In, Numbers Out Reading: Moffat, Chapter 2. REGZ9280 14s2 2. Numbers In, Numbers Out 1 The Art of Programming Think about the problem Write

More information

CS304 Object Oriented Programming Final Term

CS304 Object Oriented Programming Final Term 1. Which of the following is the way to extract common behaviour and attributes from the given classes and make a separate class of those common behaviours and attributes? Generalization (pg 29) Sub-typing

More information

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.aspx?m=5507&c=618&mo=18917&t=191&sy=2012&bl...

https://asd-pa.perfplusk12.com/admin/admin_curric_maps_display.aspx?m=5507&c=618&mo=18917&t=191&sy=2012&bl... Page 1 of 13 Units: - All - Teacher: ProgIIIJavaI, CORE Course: ProgIIIJavaI Year: 2012-13 Intro to Java How is data stored by a computer system? What does a compiler do? What are the advantages of using

More information

1. Describe History of C++? 2. What is Dev. C++? 3. Why Use Dev. C++ instead of C++ DOS IDE?

1. Describe History of C++? 2. What is Dev. C++? 3. Why Use Dev. C++ instead of C++ DOS IDE? 1. Describe History of C++? The C++ programming language has a history going back to 1979, when Bjarne Stroustrup was doing work for his Ph.D. thesis. One of the languages Stroustrup had the opportunity

More information

CLASS DESIGN. Objectives MODULE 4

CLASS DESIGN. Objectives MODULE 4 MODULE 4 CLASS DESIGN Objectives > After completing this lesson, you should be able to do the following: Use access levels: private, protected, default, and public. Override methods Overload constructors

More information

2. Numbers In, Numbers Out

2. Numbers In, Numbers Out COMP1917: Computing 1 2. Numbers In, Numbers Out Reading: Moffat, Chapter 2. COMP1917 15s2 2. Numbers In, Numbers Out 1 The Art of Programming Think about the problem Write down a proposed solution Break

More information

Tokens, Expressions and Control Structures

Tokens, Expressions and Control Structures 3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type

More information

Exercise: Using Numbers

Exercise: Using Numbers Exercise: Using Numbers Problem: You are a spy going into an evil party to find the super-secret code phrase (made up of letters and spaces), which you will immediately send via text message to your team

More information

Using OLE in SAS/AF Software

Using OLE in SAS/AF Software 187 CHAPTER 9 Using OLE in SAS/AF Software About OLE 188 SAS/AF Catalog Compatibility 188 Inserting an OLE Object in a FRAME Entry 188 Inserting an OLE Object 189 Pasting an OLE Object from the Clipboard

More information

Java Object Oriented Design. CSC207 Fall 2014

Java Object Oriented Design. CSC207 Fall 2014 Java Object Oriented Design CSC207 Fall 2014 Design Problem Design an application where the user can draw different shapes Lines Circles Rectangles Just high level design, don t write any detailed code

More information

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix PGJC4_JSE8_OCA.book Page ix Monday, June 20, 2016 2:31 PM Contents Figures Tables Examples Foreword Preface xix xxi xxiii xxvii xxix 1 Basics of Java Programming 1 1.1 Introduction 2 1.2 Classes 2 Declaring

More information

SAS Macro Language: Reference

SAS Macro Language: Reference SAS Macro Language: Reference INTRODUCTION Getting Started with the Macro Facility This is the macro facility language reference for the SAS System. It is a reference for the SAS macro language processor

More information

SAS Data Libraries. Definition CHAPTER 26

SAS Data Libraries. Definition CHAPTER 26 385 CHAPTER 26 SAS Data Libraries Definition 385 Library Engines 387 Library Names 388 Physical Names and Logical Names (Librefs) 388 Assigning Librefs 388 Associating and Clearing Logical Names (Librefs)

More information

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

Object oriented programming. Instructor: Masoud Asghari Web page:   Ch: 3 Object oriented programming Instructor: Masoud Asghari Web page: http://www.masses.ir/lectures/oops2017sut Ch: 3 1 In this slide We follow: https://docs.oracle.com/javase/tutorial/index.html Trail: Learning

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

Polymorphism 2/12/2018. Which statement is correct about overriding private methods in the super class?

Polymorphism 2/12/2018. Which statement is correct about overriding private methods in the super class? Which statement is correct about overriding private methods in the super class? Peer Instruction Polymorphism Please select the single correct answer. A. Any derived class can override private methods

More information

How to Implement the One-Time Methodology Mark Tabladillo, Ph.D., MarkTab Consulting, Atlanta, GA Associate Faculty, University of Phoenix

How to Implement the One-Time Methodology Mark Tabladillo, Ph.D., MarkTab Consulting, Atlanta, GA Associate Faculty, University of Phoenix Paper PO-09 How to Implement the One-Time Methodology Mark Tabladillo, Ph.D., MarkTab Consulting, Atlanta, GA Associate Faculty, University of Phoenix ABSTRACT This paper demonstrates how to implement

More information

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017 Overview of OOP Dr. Zhang COSC 1436 Summer, 2017 7/18/2017 Review Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in square brackets: l = [1, 2, "a"] (access by index, is mutable

More information

CSCI312 Principles of Programming Languages!

CSCI312 Principles of Programming Languages! CSCI312 Principles of Programming Languages! Chapter 5 Types Xu Liu! ! 5.1!Type Errors! 5.2!Static and Dynamic Typing! 5.3!Basic Types! 5.4!NonBasic Types! 5.5!Recursive Data Types! 5.6!Functions as Types!

More information

Getting Started with Version 8 SAS/ AP~ Software Steven A Wilson, MAJARO InfoSystems, Inc., San Jose CA

Getting Started with Version 8 SAS/ AP~ Software Steven A Wilson, MAJARO InfoSystems, Inc., San Jose CA Getting Started with Version 8 SAS/ AP~ Software Steven A Wilson, MAJARO InfoSystems, Inc., San Jose CA Abstract This paper will be an introductory guide to the development of interactive computer systems

More information

Intro to OOP Visibility/protection levels and constructors Friend, convert constructor, destructor Operator overloading a<=b a.

Intro to OOP Visibility/protection levels and constructors Friend, convert constructor, destructor Operator overloading a<=b a. Intro to OOP - Object and class - The sequence to define and use a class in a program - How/when to use scope resolution operator - How/when to the dot operator - Should be able to write the prototype

More information

Introduction to Java. Handout-1d. cs402 - Spring

Introduction to Java. Handout-1d. cs402 - Spring Introduction to Java Handout-1d cs402 - Spring 2003 1 Methods (i) Method is the OOP name for function Must be declared always within a class optaccessqualifier returntype methodname ( optargumentlist )

More information

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved. www.nicelabel.com, info@nicelabel.com English Edition Rev-0910 2009 Euro Plus d.o.o. & Niceware International LLC All rights reserved. www.nicelabel.com Head Office Euro Plus d.o.o. Ulica Lojzeta Hrovata

More information

Assoc. Prof. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Assoc. Prof. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved. Assoc. Prof. Marenglen Biba (C) 2010 Pearson Education, Inc. All Inheritance A form of software reuse in which a new class is created by absorbing an existing class s members and enriching them with

More information

Data Service Center December

Data Service Center December www.dataservice.org Data Service Center December 2005 504-7222 Property of the Data Service Center, Wilmington, DE For Use Within the Colonial & Red Clay Consolidated Public School Districts Only Table

More information

Lecture Topics. Administrivia

Lecture Topics. Administrivia ECE498SL Lec. Notes L8PA Lecture Topics overloading pitfalls of overloading & conversions matching an overloaded call miscellany new & delete variable declarations extensibility: philosophy vs. reality

More information

And Even More and More C++ Fundamentals of Computer Science

And Even More and More C++ Fundamentals of Computer Science And Even More and More C++ Fundamentals of Computer Science Outline C++ Classes Special Members Friendship Classes are an expanded version of data structures (structs) Like structs, the hold data members

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

SAS 9.2 Table Server. TSPL Language Reference

SAS 9.2 Table Server. TSPL Language Reference SAS 9.2 Table Server TSPL Language Reference The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2009. SAS 9.2 Table Server: TSPL Language Reference. Cary, NC: SAS Institute

More information

ITP 342 Mobile App Dev. Fundamentals

ITP 342 Mobile App Dev. Fundamentals ITP 342 Mobile App Dev Fundamentals Objective-C Classes Encapsulate data with the methods that operate on that data An object is a runtime instance of a class Contains its own in-memory copy of the instance

More information

DBLOAD Procedure Reference

DBLOAD Procedure Reference 131 CHAPTER 10 DBLOAD Procedure Reference Introduction 131 Naming Limits in the DBLOAD Procedure 131 Case Sensitivity in the DBLOAD Procedure 132 DBLOAD Procedure 132 133 PROC DBLOAD Statement Options

More information

CIS 3260 Intro. to Programming with C#

CIS 3260 Intro. to Programming with C# Running Your First Program in Visual C# 2008 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Run Visual Studio Start a New Project Select File/New/Project Visual C# and Windows must

More information

Chapter 5 Object-Oriented Programming

Chapter 5 Object-Oriented Programming Chapter 5 Object-Oriented Programming Develop code that implements tight encapsulation, loose coupling, and high cohesion Develop code that demonstrates the use of polymorphism Develop code that declares

More information

COEN244: Class & function templates

COEN244: Class & function templates COEN244: Class & function templates Aishy Amer Electrical & Computer Engineering Templates Function Templates Class Templates Outline Templates and inheritance Introduction to C++ Standard Template Library

More information

CS1004: Intro to CS in Java, Spring 2005

CS1004: Intro to CS in Java, Spring 2005 CS1004: Intro to CS in Java, Spring 2005 Lecture #23: OO Design, cont d. Janak J Parekh janak@cs.columbia.edu Administrivia HW#5 due Tuesday And if you re cheating on (or letting others see your) HW#5

More information

LSN 3 C Concepts for OS Programming

LSN 3 C Concepts for OS Programming LSN 3 C Concepts for OS Programming ECT362 Operating Systems Department of Engineering Technology LSN 3 C Programming (Review) Numerical operations Punctuators ( (), {}) Precedence and Association Mixed

More information

How to Implement the One-Time Methodology Mark Tabladillo, Ph.D., Atlanta, GA

How to Implement the One-Time Methodology Mark Tabladillo, Ph.D., Atlanta, GA How to Implement the One-Time Methodology Mark Tabladillo, Ph.D., Atlanta, GA ABSTRACT This tutorial will demonstrate how to implement the One-Time Methodology, a way to manage, validate, and process survey

More information

Chapter 14. Exception Handling and Event Handling

Chapter 14. Exception Handling and Event Handling Chapter 14 Exception Handling and Event Handling Chapter 14 Topics Introduction to Exception Handling Exception Handling in Ada Exception Handling in C++ Exception Handling in Java Introduction to Event

More information

Understanding Design Annotation. Contents

Understanding Design Annotation. Contents Understanding Design Annotation Contents Annotation defined Annotation in Altium Designer Which Annotation Tool? Schematic Level Annotation Order of Processing Schematic Sheets to Annotate Annotation Scope

More information

C++ Important Questions with Answers

C++ Important Questions with Answers 1. Name the operators that cannot be overloaded. sizeof,.,.*,.->, ::,? 2. What is inheritance? Inheritance is property such that a parent (or super) class passes the characteristics of itself to children

More information

Journey to the center of the earth Deep understanding of SAS language processing mechanism Di Chen, SAS Beijing R&D, Beijing, China

Journey to the center of the earth Deep understanding of SAS language processing mechanism Di Chen, SAS Beijing R&D, Beijing, China Journey to the center of the earth Deep understanding of SAS language processing Di Chen, SAS Beijing R&D, Beijing, China ABSTRACT SAS is a highly flexible and extensible programming language, and a rich

More information

1B1b Classes in Java Part I

1B1b Classes in Java Part I 1B1b Classes in Java Part I Agenda Defining simple classes. Instance variables and methods. Objects. Object references. 1 2 Reading You should be reading: Part I chapters 6,9,10 And browsing: Part IV chapter

More information

Standard. Number of Correlations

Standard. Number of Correlations Computer Science 2016 This assessment contains 80 items, but only 80 are used at one time. Programming and Software Development Number of Correlations Standard Type Standard 2 Duty 1) CONTENT STANDARD

More information

Chapter 10 Introduction to Classes

Chapter 10 Introduction to Classes C++ for Engineers and Scientists Third Edition Chapter 10 Introduction to Classes CSc 10200! Introduction to Computing Lecture 20-21 Edgardo Molina Fall 2013 City College of New York 2 Objectives In this

More information

Programming Using C# QUEEN S UNIVERSITY BELFAST. Practical Week 7

Programming Using C# QUEEN S UNIVERSITY BELFAST. Practical Week 7 Programming Using C# QUEEN S UNIVERSITY BELFAST Practical Week 7 Table of Contents PRACTICAL 7... 2 EXERCISE 1... 2 TASK 1: Zoo Park (Without Inheritance)... 2 TASK 2: Zoo Park with Inheritance... 5 TASK

More information

String Objects: The string class library

String Objects: The string class library String Objects: The string class library Lecture 23 COP 3014 Spring 2017 March 7, 2017 C-strings vs. string objects In C++ (and C), there is no built-in string type Basic strings (C-strings) are implemented

More information

OBJECT ORIENTED SIMULATION LANGUAGE. OOSimL Reference Manual - Part 1

OBJECT ORIENTED SIMULATION LANGUAGE. OOSimL Reference Manual - Part 1 OBJECT ORIENTED SIMULATION LANGUAGE OOSimL Reference Manual - Part 1 Technical Report TR-CSIS-OOPsimL-1 José M. Garrido Department of Computer Science Updated November 2014 College of Computing and Software

More information

Java Programming. MSc Induction Tutorials Stefan Stafrace PhD Student Department of Computing

Java Programming. MSc Induction Tutorials Stefan Stafrace PhD Student Department of Computing Java Programming MSc Induction Tutorials 2011 Stefan Stafrace PhD Student Department of Computing s.stafrace@surrey.ac.uk 1 Tutorial Objectives This is an example based tutorial for students who want to

More information

Working with Objects. Overview. This chapter covers. ! Overview! Properties and Fields! Initialization! Constructors! Assignment

Working with Objects. Overview. This chapter covers. ! Overview! Properties and Fields! Initialization! Constructors! Assignment 4 Working with Objects 41 This chapter covers! Overview! Properties and Fields! Initialization! Constructors! Assignment Overview When you look around yourself, in your office; your city; or even the world,

More information

CS111: PROGRAMMING LANGUAGE II

CS111: PROGRAMMING LANGUAGE II 1 CS111: PROGRAMMING LANGUAGE II Computer Science Department Lecture 4(b): Subclasses and Superclasses OOP OOP - Inheritance Inheritance represents the is a relationship between data types (e.g. student/person)

More information

Exam Duration: 2hrs and 30min Software Design

Exam Duration: 2hrs and 30min Software Design Exam Duration: 2hrs and 30min. 433-254 Software Design Section A Multiple Choice (This sample paper has less questions than the exam paper The exam paper will have 25 Multiple Choice questions.) 1. Which

More information