Common Lisp! John Paxton Montana State University Summer 2003.

Slides:



Advertisements
Similar presentations
Training Guide. `
Advertisements

9 x9 81 4/12/2015 Know Your Facts!. 9 x2 18 4/12/2015 Know Your Facts!
1 x0 0 4/15/2015 Know Your Facts!. 9 x1 9 4/15/2015 Know Your Facts!
1 x0 0 4/16/2015 Know Your Facts!. 1 x8 8 4/16/2015 Know Your Facts!
3 x0 0 7/18/2015 Know Your Facts!. 4 x3 12 7/18/2015 Know Your Facts!
Manifest Destiny Westward Expansion in Seven stops By: Natalie Sava.
Common Lisp! John Paxton Montana State University Summer 2003.
Germany. Map of Germany Germany’s Flag Country Quick Facts Germany Capital City: Berlin Population: 82 million Main Languages: German (official), English,
Generics "It is easy to study the rules of overloading and of templates without noticing that together they are one of the keys to elegant and efficient.
Object-Oriented Programming In Lisp. Lisp vs. Scheme 1.Lisp has much more built-in functions and special forms, the Scheme language definition takes 45.
Alok Mehta - Programming in Lisp - Lecture Programming in Lisp Lecture 6 - Structure; Case Study: Blocks World.
Common Lisp! John Paxton Montana State University Summer 2003.
Using Classes Lisp also supports the Object-Oriented paradigm. The process of defining classes in Lisp is similar to how you you define structures. The.
Common Lisp! John Paxton Montana State University Summer 2003.
Common Lisp! John Paxton Montana State University Summer 2003.
Common Lisp! John Paxton Montana State University Summer 2003.
Prof. Fateman CS164 Lecture 251 Languages as a Tool for Software Engineering Piercing the Mysteries of Object-Oriented Programming Lecture 25.
Alok Mehta - Programming in Lisp - Data Abstraction and Mapping Programming in Lisp Common Lisp Object System (CLOS)
Westward Expansion Mr. Bennett- 8 th Grade Social Studies.
DS.L.1 Lists, Stacks, and Queues (Review) Chapter 3 Overview Abstract Data Types Linked Lists, Headers, Circular Links Cursor (Array) Implementation Stacks.
PRESENTING STATISTICS OF CITIES. AREAPOPULATIONSAMPLE TALK Talking about AREA The city covers ___ sq. km. It has an area of ____ sq. km. It is one of.
Def D OC An extensible, dynamic document creation system By Rahul Jain
Social Studies Chapter * The boomtowns did not have many women and children. The women who did travel to boomtowns often opened businesses or worked.
Chapter 10 “Expanding West” Ms. Monteiro Trails West Texas Mexican- American War Grab Bag
Common Lisp! John Paxton Montana State University Summer 2003.
1 CLOS: Common Lisp Object System Basic principles of CLOS Classes, Instances and Slots Inheritance Generic functions Methods Multi-methods Comparison.
4 x1 4 10/18/2015 Know Your Facts!. 5 x /18/2015 Know Your Facts!
3 x0 0 10/18/2015 Know Your Facts!. 11 x /18/2015 Know Your Facts!
Presenter: Amit guetta City: Madrid Country: Spain Continent: Europe Population: 6 million people Language: Spanish.
Pioneers move west and make the nation grow.
Immigration in the US People and Places. The Colonial Period  French established colonies in the lower Mississippi Valley (New Orleans 1718) where the.
US History: Spiconardi  What are some reasons that you would leave your home (White Plains) for another place? _______________________ _______________________.
Introduction to LISP. Lisp Extensible: It lets you define new operators yourself Lisp programs are expressed as lisp data structures –You can write programs.
Review of objects  overview overview. Class of objects  Attributes/ methods.
California Gold Rush 1849 Power Point Created by: Billy Geis.
The Denny party By William Min This is Arthur Denny.
Intelligence Musical and Otherwise.  Huh? Huh? Webster’s definition  Intelligence:  The ability to reason.
Montana Bryce L., Chance G., Michael K. Capital city, major cities, region in the US  Capital: Helena  Major cities: Billings, Havre, Bozeman  Region.
Manifest Destiny Chapter 12. I.The Oregon Country A.Rivalry in the Northwest 1.Oregon Country—included all modern day Oregon, Washington, and Idaho plus.
Bell Ringer – 1/6/09 What people first established the Oregon Trail? Why did people want to travel from the Midwest to Oregon along the difficult Oregon.
Westward Travel – Physical Features and Climate By: Mrs. Coates.
H ISTORY Chapter 13 Study Guide. O BJECTIVE 1.1 Mexico gave Moses Austin a grant of land to get settlers from the United States to build ranches and farms.
Title Slide Group Member Names. PowerPoint Format for Project Include a Map of the World with your route Each Slide should have the following – Title:
OUR COUNTRY : TURKEY.
A Timeline of Key Events
Agenda March 8, 2017 Do Now: Answer this question in your notebook: What might would motivate people from 1830’s America to leave their home and family.
Set Collection A Bag is a general collection class that implements the Collection interface. A Set is a collection that resembles a Bag with the provision.
Teaching a machine a simple taxonomy
Ch 11 Goin’ West, Ma! Manifest Destiny, Westward trails, Oregon Country, American Claims, Treaties, and California (Gold Rush and statehood)
California/Oregon.
Edit a Public Holiday – Holiday Calendar
Allegro CL Certification Program
CLOS CSC 358/
Key Monuments & Places of Significance in the USA
Trails to the West Ch. 7-2, P. 249.
Trails West.
Settling Oregon New settlers unknowingly brought measles to the mission and killed many of the Cayuse children. The Whitman’s were blamed for the epidemic,
ريكاوري (بازگشت به حالت اوليه)
Learn Your 2x Facts.
Delete a Public Holiday – Holiday Calendar
Westward Bound Section Two.
Country “Quilt” Project: una introducciÓn
Story of Jamestown Research the colony of Jamestown. (Include what country were the first Jamestown settlers from? What were they searching for? Who was.
The USA.
Parents Gateway A quick start guide to Travel Declaration and Update Contact Details for Parents Updated as at 1 May 19.
A quick start guide to Travel Declaration for Parents
Welcome to Osprey’s Assembly
Presentation transcript:

Common Lisp! John Paxton Montana State University Summer 2003

Bozeman Facts John Bozeman came west in search of gold. For a while, he guided settlers west in covered wagon trains. In 1863, he entered the Gallatin Valley for the first time and established Bozeman.

CLOS Common Lisp Object System Objects Methods Inheritance

Class Declaration (defclass city () ( (name :accessor name) (country :accessor country) (population :accessor population) )

Class Instantiation > (setf bozeman (make-instance 'city)) #

Accessing Data Fields > (setf (name bozeman) 'bozeman) BOZEMAN > (setf (country bozeman) 'usa) USA > (setf (population bozeman) 30000) 30000

Writing Methods (defmethod my-print ((some-city city)) (format t "The city's name is ~a~%" (name some-city)) (format t "The city's country is ~a~%“ (country some-city)) )

Calling Methods > (my-print bozeman) The city's name is BOZEMAN The city's country is USA

Using Inheritance (defclass montana-city (city) ( (culture-level :accessor culture-level) )

Using Inheritance > (setf two-dot (make-instance 'montana-city)) # > (setf (name two-dot) 'two-dot) > (setf (country two-dot) ‘usa) > (setf (population two-dot) 172) > (setf (culture-level two-dot) 'low)

Using Inheritance > (my-print two-dot) The city's name is TWO-DOT The city's country is USA

Using Inheritance (defmethod my-print ((some-city montana-city)) (format t "The city's name is ~a~%" (name some-city)) (format t "The city's culture-level is ~a~%“ (culture-level some-city)) )

Using Inheritance > (my-print two-dot) The city's name is TWO-DOT The city's culture-level is LOW

Questions 1.Use CLOS to define a class named generic-list. This class should have methods called make-empty, is-empty, insert-item and remove-item. Insert-item and remove-item should both operate from the front of the list. Demonstrate that the class works.

Questions 2.Define a class called stack. Inherit as many methods as possible. 3.Define a class called queue. Inherit as many methods as possible.