
Lecture 1 - part 2 - CIS430
Presentation
•
Computers
•
University
•
Practice Problem
•
Medium
Sherif Abdelhamid
Used 2+ times
FREE Resource
6 Slides • 4 Questions
1
ISBN 0-321-49362-1
Chapter 1
Preliminaries
2
Copyright © 2015 Pearson. All rights reserved.
1-2
Chapter 1 Topics
•
Reasons for Studying Concepts of
Programming Languages
•
Programming Domains
•
Language Evaluation Criteria
•
Influences on Language Design
•
Language Categories
•
Language Design Trade-Offs
•
Implementation Methods
•
Programming Environments
3
Copyright © 2015 Pearson. All rights reserved.
1-3
Language Categories
•Imperative
– Central features are variables, assignment statements, and
iteration
– Include languages that support object-oriented programming
– Include scripting languages
– Include the visual languages
– Examples: Python, C, Java, Perl, JavaScript, Visual BASIC .NET,
C++
•Functional
– Main means of making computations is by applying functions to
given parameters
– Examples: LISP, Scheme, ML, F#
•Logic
– Rule-based (rules are specified in no particular order)
– Example: Prolog
•Markup
– A set of rules that defines how the layout and presentation of
text and images should appear in a digital document.
– Examples: XML, HTML, LaTeX, MathML, JSON
4
Multiple Choice
XML stands for?
Hypertext Markup Language
Extensible Machine Language
Extensible Markup Language
None of these
5
Copyright © 2015 Pearson. All rights reserved.
1-4
Language Design Trade-Offs
• Reliability vs. cost of execution
– Example: Java demands all references to array elements
be checked for proper indexing, which leads to increased
execution costs
• Readability vs. writability
Example: APL provides many powerful operators (and a large
number of new symbols), allowing complex computations
to be written in a compact program but at the cost of poor
readability
n ← 4 5 6 7
n+4
8 9 10 11
• Writability (flexibility) vs. reliability
– Example: C++ pointers are powerful and very flexible but
are unreliable
6
Multiple Choice
LISP belongs to which programming language category?
Imperative
Functional
Markup
Logic
7
APL - Readability vs. writability
1-5
8
APL - Readability vs. writability
VAR
sum,ARRAY data[1..500] OF REAL
i INTEGER;
BEGIN
WRITE('Number of data=..');
READLN(n);
sum:=0;
FOR i:=1 TO n DO
BEGIN
READ(data[i]);
sum:=sum+data[i]
END;
WRITELN(sum);
END.
but in APL you simply program the sum of inputs (no need for loops) as: ,
and the mean is also very tersely formulated as:
1-6
(+/X)÷⍴X
9
Multiple Choice
It is easier to be an expert in APL compared to Pascal?
True
False
10
Multiple Choice
If x is an array in APL, then ⍴X means?
Sum of the elements in array x
Number of the elements in array x
Average of the elements in array x
Product of the elements in array x
ISBN 0-321-49362-1
Chapter 1
Preliminaries
Show answer
Auto Play
Slide 1 / 10
SLIDE
Similar Resources on Wayground
8 questions
Purposive Communication-Week 9
Presentation
•
University
6 questions
Addition
Presentation
•
KG
8 questions
Basic Terminologies and Algorithm Design
Presentation
•
University
8 questions
GO! quizizz zeriuz day 4
Presentation
•
Professional Development
8 questions
FPD Lesson
Presentation
•
12th Grade
4 questions
Conversions
Presentation
•
University
7 questions
Pengantar
Presentation
•
University
9 questions
C4 W4 D2
Presentation
•
Professional Development
Popular Resources on Wayground
20 questions
STAAR Review Quiz #3
Quiz
•
8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
6 questions
Marshmallow Farm Quiz
Quiz
•
2nd - 5th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
12 questions
What makes Nebraska's government unique?
Quiz
•
4th - 5th Grade