
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
Essay Structure Lesson
Presentation
•
University
11 questions
Scratch 3.0
Presentation
•
KG
7 questions
Magnetic Storage
Presentation
•
University
6 questions
Java Basic Unit 2 Workshop
Presentation
•
University
7 questions
Language and Sex
Presentation
•
University
9 questions
first day
Presentation
•
University
9 questions
How important is communication in medical practice?
Presentation
•
University
6 questions
Ανάπτυξη Ιστοτόπων
Presentation
•
12th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
20 questions
Guess The App
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
19 questions
Minecraft
Quiz
•
6th Grade - Professio...
40 questions
8th Grade Math Review
Quiz
•
8th Grade - University
20 questions
Block Buster Movies
Quiz
•
10th Grade - Professi...
10 questions
Would you rather...
Quiz
•
KG - University
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
14 questions
Superhero
Quiz
•
1st Grade - University