1 / 11

Introduction to Programming

Introduction to Programming. Programming and Languages: Telling the Computer What to Do. Describe what programmers do and do not do Explain how programmers define a problem, plan the solution, and then code, test, and document the program

Download Presentation

Introduction to Programming

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Programming Programming and Languages: Telling the Computer What to Do

  2. Describe what programmers do and do not do Explain how programmers define a problem, plan the solution, and then code, test, and document the program List and describe the levels of programming languages: machine, assembly, high level, very high level, and natural Describe the major programming languages that are in use today Explain the concepts of object-oriented programming Objectives

  3. Program – a set of detailed, step-by-step instructions that directs the computer to do what you want it to do Programming language – a set of rules that provides a way of telling the computer what operations to perform Programming

  4. Five main steps Defining the problem Planning the solution Coding the program Testing the program Documenting the program The Programming Process

  5. Lower-level languages – more like the 0s and 1s the computer itself uses Higher-level languages – more like the languages people use Divided into five generations Levels of Languages

  6. Machine language Assembly languages High-level languages Very high-level languages Natural languages Five Generations of Languages

  7. FORTRAN COBOL BASIC PROLOG Visual Basic C, C++ Java Major Programming Languages

  8. Object – a self-contained unit that contains both data and its related functions Key terms in object-oriented programming Encapsulation – an object isolates both its data and its related instructions Attributes – facts that describe the object Also called properties Methods – instructions that tell the object to do something Messages – an outside stimulus that results in the change of the state of an object Object-Oriented Programming

  9. Using Objects • Programmers define classes of objects • The class contains all attributes that are unique to objects of that class • An object is an instance (occurrence) of a class • Objects are arranged hierarchically in classes and subclasses • Subclasses are derived from classes • Inheritance – a subclass possesses all attributes of the class from which it is derived • Additional attributes can be coded in the subclasses

  10. A message is sent to the object, telling it to do something The object’s methods tell it how to do it Polymorphism – each object has its own way to process the message For example, the class may have a Move method, but each subclass implements that method differently Activating the Object

  11. C++ Java C# Visual Basic Object-Oriented Languages

More Related