Cs 0004 lecture 1
1 / 12

CS 0004 –Lecture 1 - PowerPoint PPT Presentation

  • Uploaded on

CS 0004 –Lecture 1. Wednesday, Jan 5 th , 2011 Roxana Gheorghiu. Administrative Stuff. My Office : 6414 Email : [email protected] cs.pitt.edu Web Page: www.cs.pitt.edu/~roxana / cs4 Class : Mon, Wed, Fri : 10 : 0 0am -10:50am Office Hours (tentatively): Mon : 11 :00am -1: 00pm

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'CS 0004 –Lecture 1' - bisa

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Cs 0004 lecture 1

CS 0004 –Lecture 1

Wednesday, Jan 5th, 2011

Roxana Gheorghiu

Administrative stuff
Administrative Stuff

  • My Office: 6414

  • Email: [email protected]

  • Web Page: www.cs.pitt.edu/~roxana/cs4

  • Class: Mon, Wed, Fri: 10:00am -10:50am

  • Office Hours (tentatively):

    • Mon: 11:00am -1:00pm

    • Wed: 11:00pm -1:00pm

    • By appointment

An introduction to computers
An Introduction to Computers

  • What are the main components of a computer

    • Processor (microprocessor, CPU –Central Processing Unit)

    • Memory (RAM –Random Access Memory)

    • Hard Disk Drive (HDD)

    • Several device cards: graphics card, sound card, network card, modem

    • Input/Output (I/O) Devices: keyboard, mouse; monitor, printer

Hardware software and servers
Hardware, Software and Servers

  • Hardware

    • Refers to physical components of the computer

    • Includes all components (even I/O)

  • Software

    • All the programs written for a particular computer or for any computers

  • Servers vs. Personal computer

    • Term “Personal computer” indicates that the machine is operated by one person at a time

    • Term “Server” indicates that the computer provides resources to other computers

Make a computer understand
Make a computer understand

  • Language =any system of arbitrary signals such as voice sounds, gestures or written symbols

  • Computer languages classification

    • Lowest level: Machine Code (binary) (110100100)

    • Assembly language: symbolic representation of Machine Code

    • High-level (Human –readable): Visual Basic, Java, C++

      • It consists of instructions to which people can relate (Click, if, do)

  • Ex: Try to speak with a French guy who doesn’t know English (assuming you don’t know French  )

Communication protocol human readable to machine readable


Source code



Private SubForm_Load()

MsgBox("Hello, World!”)

End Sub



Communication protocolHuman-Readable to Machine-Readable



Computer programs
Computer Programs

  • A computer is a machine that does ONLY what it is instructed to

  • Instructions are used in addition to language

  • The tasks are broken down into a sequence of instructions . This sequence is called a program

  • The process of executing the instructions is called running the program


  • Make the robot leave the class and come back in the same position. Language: Move (#of stapes), Turn Left, Turn Right

What is a program
What is a program?

  • Collection of instructions that:

    • Accepts input

    • Process Data

    • Outputs results




Why visual basic
Why Visual Basic?

  • Core of Microsoft Office Products

    • VBA (Visual Basic for Applications) allows us to “program” Excel

  • Allows you to make programs easily

    • Lets you focus on problem at hand

  • Creates GUI’s not ugly command line

  • Interactive with user as an Event-Driven programming language

Event driven programming paradigm
Event-driven programming paradigm

  • A way of designing a program: the application is driven by events

  • When creating an application, need to consider:

    • How events can be (or should be) generated

      • creating an interface to accept actions from the user (e.g. button click)‏

    • How events are handled

      • coding event handlers to handle the events generated

Event driven programming
Event-driven Programming

  • What is an event?

    • e.g. clicking a button, moving a mouse over a region, pressing a key, creating a form (window), timer going off

    • Something that happens in the program interface at a point in time (typically done by the user)

Event driven programming1
Event-driven Programming

  • What is an event handler?

    • A piece of code in our program that tells the program what to do when an event happens

      • e.g. when a particular button is clicked, update the display

  • How do events drive a program?

    • Each event has a handler

    • When an event occurs, its handler is invoked

    • If an event is not important, the programmer never writes an event handler, so the program ignores the event


  • Ex: click a button, text appear in my presentation.

    • What is the event in this example ? What does the handler of this event do ?