are sequence of statements The design method used in procedural programming is

Are sequence of statements the design method used in

This preview shows page 27 - 33 out of 33 pages.

are sequence of statements The design method used in procedural programming is called Top Down Design. This is where you start with a problem and then systematically break the problem down into sub problems. Traditional programming languages were procedural. –C, Pascal, COBOL , etc Quick yak: Discuss about some of the PROCEDURAL daily routines, ask students to build examples….
Image of page 27
©LPU CSE101 C Programming Problems with Procedural programming language Software maintenance can be difficult Time consuming When changes are made to the main procedure, those changes can cascade to sub procedures of main, and sub-sub procedures and so on..
Image of page 28
©LPU CSE101 C Programming Object-Oriented Programming Object-oriented programming is centered on creating classes and objects rather than procedures/ functions Class is a combination of state (data) and behavior (methods) Data in an object are known as attributes Class is a data type and object is an instance of that data type Examples- C++, Java,…
Image of page 29
©LPU CSE101 C Programming Principles of OOP 1. Object-oriented programming combines data and behavior (or method). This is called encapsulation . 2. Data hiding is the ability of an object to hide data from other objects in the program. 3. Inheritance is the ability to inherit attributes and behavior from existing classes (base class)
Image of page 30
©LPU CSE101 C Programming Benefits of Object-oriented programming Modularity Information hiding Code re-use Save development time (and cost) by reusing code – once an object class is created it can be used in other applications Easy debugging – classes can be tested independently – reused objects have already been tested
Image of page 31
©LPU CSE101 C Programming Procedure oriented programming Object oriented programming It is known as linear programming It is not linear programming Program is divided into small parts called functions Program is divided into number of entities called objects . In Procedural programming, Data can move freely from function to function in the system. In OOP, objects can move and communicate with each other through member functions. Procedural programming follows Top Down approach. OOP follows Bottom Up approach To add new data and function in Procedural programming is not so easy . OOP provides an easy way to add new data and function. Procedural programming does not have any proper way for hiding data so it is less secure. OOP provides Data Hiding so provides more security. There is no concept of reusability Reusability concept is introduced here Example of Procedural programming are : C, VB, FORTRAN, Pascal. Example of OOP are : C++, JAVA, VB.NET, C#.NET.
Image of page 32
©LPU CSE101 C Programming Next Class: Programming Basics C Program development environment & tools [email protected]
Image of page 33

You've reached the end of your free preview.

Want to read all 33 pages?

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors