Example: marketing

Programming Languages and Techniques

Programming Languages and TechniquesLecture Notes for CIS 120 Steve ZdancewicStephanie WeirichUniversity of PennsylvaniaSeptember 1, 20212 CIS 120 Lecture NotesDraft of September 1, 2021 Contents1 Overview and Program and Prerequisites .. Philosophy .. the different parts of CIS 120 fit together .. History .. Design .. 152 Introductory in CIS 120 .. Types and Expressions .. Programming .. Declarations .. A complete example .. Notes .. 443 Lists and.

CIS 120 is an introductory computer science course taught at the University of Pennsylvania. Entering students should have some previous exposure to programming and the ability to write small programs (10-100 lines) in some imperative or object-oriented language. Because of CIS 110 and AP Computer Science, the majority of

Tags:

  Computer, Sciences, Computer science, Ap computer science

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Programming Languages and Techniques

1 Programming Languages and TechniquesLecture Notes for CIS 120 Steve ZdancewicStephanie WeirichUniversity of PennsylvaniaSeptember 1, 20212 CIS 120 Lecture NotesDraft of September 1, 2021 Contents1 Overview and Program and Prerequisites .. Philosophy .. the different parts of CIS 120 fit together .. History .. Design .. 152 Introductory in CIS 120 .. Types and Expressions .. Programming .. Declarations .. A complete example .. Notes .. 443 Lists and.

2 504 Tuples and Nested .. patterns .. (underscore) patterns .. 66 CIS 120 Lecture NotesDraft of September 1, 20214 CONTENTS5 User-defined datatypes: enumerations .. that carry more information .. abbreviations .. types: lists .. 726 Binary Trees757 Binary Search Binary Search Trees .. 818 Generic Functions and generic datatypes .. use generics? .. 889 First-class Application and Anonymous Functions .. transformation .. fold.

3 9710 Modularity and A motivating example: finite sets .. Abstract types and modularity .. Another example: Finite Maps .. Type checking .. 11211 Partial Functions: option types11912 Unit and Sequencing The use of ; .. 12513 Records of Named Immutable Records .. 12714 Mutable State and Mutable Records .. Aliasing: The Blessing and Curse of Mutable State .. 13315 The Abstract Stack Parts of the ASM .. Values and References to the Heap .. Simplification in the ASM.

4 Reference Equality .. 150 CIS 120 Lecture NotesDraft of September 1, 20215 CONTENTS16 Linked Structures: Representing Queues .. The Queue Invariants .. Implementing the basic Queue operations .. Iteration and Tail Calls .. Loop-the-loop: Examples of Iteration .. Infinite Loops .. 16617 Local Closures .. Objects .. The generic'a reftype .. Reference (==) vs. Structural Equality (=) .. 17418 Wrapping up OCaml: Designing a GUI Taking Stock .. The Paint Application.

5 OCaml s Graphics Library .. Design of the GUI Library .. Localizing Coordinates .. Simple Widgets & Layout .. The widget hierarchy and therunfunction .. The Event Loop .. GUI Events .. Handlers .. Widgets .. and Notifiers .. (at last!) .. a GUI App: Lightswitch .. 19919 Transition to Farewell to OCaml .. Three Programming paradigms .. Functional Programming in OCaml .. Object-oriented Programming in Java .. Imperative Programming .

6 Types and Interfaces .. 21320 Connecting OCaml to Core Java .. Static vs. Dynamic Methods .. 219 CIS 120 Lecture NotesDraft of September 1, 20216 CONTENTS21 Arrays .. 22322 The Java Differences between OCaml and Java Abstract Stack Machines .. 23123 Subtyping, Extension and Interface Recap .. Subtyping .. Multiple Interfaces .. Interface Extension .. Inheritance .. Static Types vs. Dynamic Classes .. 24724 The Java ASM and dynamic Refinements to the Abstract Stack Machine.

7 The revised ASM in action .. 25325 Generics, Collections, and Polymorphism and Generics .. Subtyping and Generics .. The Java Collections Framework .. TheCollectioninterface and its implementations .. TheMapinterface and its implementations .. BSTs and theComparableinterface .. Iterating over Collections .. Modifying the collection during iteration .. 28226 Overriding and Method Overriding and the Java ASM .. Overriding and Equality .. When to override equals.

8 How to override equals .. Equals and subtyping .. Restoring symmetry .. 29727 Ways to handle failure .. Exceptions in Java .. Exceptions and the abstract stack machine .. Catching multiple exceptions .. 303 CIS 120 Lecture NotesDraft of September 1, Finally .. The Exception Class Hierarchy .. Checked exceptions .. Undeclared exceptions .. Good style for exceptions .. 30828 Working with (Binary) Files .. PrintStream .. Reading text.

9 Writing text .. Histogram demo .. 31729 Swing: GUI Programming in Drawing with Swing .. User Interaction .. Action Listeners .. Timer .. 33530 Swing: Layout and Layout .. An extended example .. 34031 Swing: Interaction and Paint Version A: Basic structure .. Version B: Drawing Modes .. Version C: Basic Mouse Interaction .. Version D: Drag and Drop .. Version E: Keyboard Interaction .. Interlude: Datatypes and enums vs. objects .. Version F: OO-based Refactoring.

10 36632 Java Design Exercise: Resizable Resizable Arrays .. 36933 Encapsulation and Queues in ML .. Queues in Java .. Implementing Java Queues .. 384 CIS 120 Lecture NotesDraft of September 1, 20218 CONTENTSCIS 120 Lecture NotesDraft of September 1, 2021 Chapter 1 Overview and Program Introduction and PrerequisitesCIS 120 is an introductory computer science course taught at the University students should have some previous exposure to Programming andthe ability to write small programs (10-100 lines) in some imperative or object-oriented language.


Related search queries