CS0007: Introductory Programming - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

CS0007: Introductory Programming

Description:

... languages, programming languages, and fourth-generation languages. ... Kinds of Animations. Two kinds of animations: Movie. Passive user watches the animation ... – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 14
Provided by: csP4
Category:

less

Transcript and Presenter's Notes

Title: CS0007: Introductory Programming


1
CS0007Introductory Programming
  • George Novacky
  • novacky_at_cs.pitt.edu
  • http//courseweb.pitt.edu

2
What is a program?
  • A program is a sequence of instructions that
  • tells the computer what to do
  • tells another human being what you want the
    computer to do
  • More formally, a program implements an algorithm.
  • Algorithm a finite set of well-defined
    instructions for accomplishing some task

  • Wikipedia

3
Program Tasks
  • Programs are written for various kinds of tasks
    (not mutually exclusive)
  • solve a problem
  • create a simulation
  • create a game
  • produce an animation

4
What is a language?
  • A system for communicating.
  • Written languages use symbols (that is,
    characters) to build words.
  • Parts of Language
  • Vocabulary The entire set of words in the
    language.
  • Syntax and grammar The ways in which the words
    can be meaningfully combined
  • Semantics The actual meaning of words and
    combinations of words

  • Java Vocabulary

5
Computer Languages
  • Human languages are natural languages.
  • Computers are not sophisticated enough to
    understand natural languages.
  • In mathematics, logic and computer science, a
    formal language is a set of finite-length words
    (i.e. character strings) drawn from some finite
    alphabet, with carefully defined vocabulary,
    syntax, and semantics
  • There are many different kinds of computer
    languages, including machine languages,
    programming languages, and fourth-generation
    languages.

6
Learning to write a program
  • A program is written using a programming
    language
  • We will learn to write programs using two
    languages
  • Alice
  • Java

7
Object Oriented Programming
  • Different programming languages support different
    styles of programming
  • In object-oriented programming, programmers can
    think of a program as instructions that tell
    interacting objects what to do
  • An object is a model of some artifact (product of
    civilization) that can interact with other objects

8
Kinds of Animations
  • Two kinds of animations
  • Movie
  • Passive user watches the animation
  • What Alice Can Do
  • LightDemo
  • Octopus
  • Interactive
  • Active user clicks on mouse, types a key on
    keyboard
  • Actions of user are called events
  • Flight Simulator
  • Skater

9
Objects
  • An "object" is a model of an artifact
  • and can be identified as unique from other
    things
  • there can be multiple objects that are similar,
    but still unique
  • How is an object unique?
  • has a name
  • has properties
  • width, height, color, location
  • can perform actions (methods)
  • associated actions it can perform
  • tasks it can carry out

10
Object Parts
  • Objects may be composed of parts (which are also
    objects)

11
Class
  • A class defines a particular kind of object
  • Objects are categorized into classes
  • Each object is
  • an instance of the class.
  • All objects in a class have similar properties
    and generally can perform the same tasks.

12
Galleries
  • Classes (3D models) are found in the galleries
  • Local gallery (installed with the software)
  • Minimum or complete options
  • CD Gallery (only if CD is in the machine)
  • Web gallery

13
Before next class
  • Activity
  • Launch Alice on your computer and run some of the
    example worlds.
  • Homework
  • Read Alice Chapter 1.1 and pages 73 - 74 for a
    brief introduction to objects
Write a Comment
User Comments (0)
About PowerShow.com