CSC 171 Lecture Notes - Lecture 4: Functional Programming

29 views2 pages
27 Jan 2017
School
Course

Document Summary

A named collection of data storage and access methods. Can be shorthand for assigning something of that type. Classes can be either public or private. Classes are composed of internal variables and methods (methods in java are what python calls functions: constructor() is a special method. Inheritance (classes can extend each other: public class leaf extends actor (the leaf actor is already a class, but we want to add stuff to it) Constructor() method is a special type of method that is named the same thing as the name of the class. it is executed the rst time you run and not again. Act() method happens every time the code is run. Methods (functions) do two things: producers: just a collection of statements to be executed one at a time, allows for abstraction, functional programming: do something and return the results as a value for reference.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related textbook solutions

Related Documents