TOPIC 1
<ul><li>Paradigms of Programming </li></ul><ul><li>Unstructured (Unofficial Name) </li></ul><ul><li>Structured Programming...
<ul><li>Paradigms are valuable for solving problems </li></ul><ul><li>because:  </li></ul><ul><ul><li>knowing one's paradi...
<ul><li>goto  Statement </li></ul><ul><li>Process Abstraction </li></ul><ul><ul><li>Function Declaration  </li></ul></ul><...
<ul><li>goto  less Programming </li></ul><ul><li>Structured Theory </li></ul><ul><ul><li>Sequential  </li></ul></ul><ul><u...
<ul><li>Modular Programming : </li></ul><ul><ul><li>The main program  coordinates calls to procedures in  </li></ul></ul><...
<ul><li>Definition of ADT : </li></ul><ul><ul><li>ADT , or  data abstraction , is a programming methodology where one defi...
<ul><ul><li>A data representation that </li></ul></ul><ul><ul><ul><li>must be able to represent all possible values of the...
<ul><li>The ability to define an ADT where the type and/or size is specified generically so that a specific version can be...
<ul><li>Encapsulation is a technique that allows the programmer to group data and the functions that operate on that data ...
<ul><li>Controlling access to the data structure through some form of interface so that it cannot be directly manipulated ...
<ul><li>C++ offers two mechanisms for building data structures:  the struct and the class </li></ul><ul><ul><li>C++ class ...
<ul><li>OO Concepts:  objects of the program interact by sending messages to each other </li></ul><ul><li>Main Features of...
<ul><li>-  (True) Polymorphism : a bility for different objects  to interpret functions differently </li></ul><ul><ul><ul>...
<ul><li>Procedural </li></ul><ul><ul><li>Focuses on process </li></ul></ul><ul><ul><li>Top Down approach </li></ul></ul><u...
<ul><li>C++ is based on  Simula 67 and C </li></ul><ul><li>Design by Kristen Nygaard and Ole-Johan Dahl </li></ul><ul><ul>...
<ul><li>Compared to C++:  no header files, macros, pointers and references, unions, operator overloading, templates, etc. ...
<ul><li>C#, pronounced C Sharp, was developed by Microsoft as part of the .NET initiative </li></ul><ul><li>The principal ...
Upcoming SlideShare
Loading in …5
×

Topic 1 PBO

513 views
430 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
513
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Topic 1 PBO

  1. 1. TOPIC 1
  2. 2. <ul><li>Paradigms of Programming </li></ul><ul><li>Unstructured (Unofficial Name) </li></ul><ul><li>Structured Programming </li></ul><ul><li>Procedural Programming </li></ul><ul><li>Abstract Data Type </li></ul><ul><li>OOP </li></ul>
  3. 3. <ul><li>Paradigms are valuable for solving problems </li></ul><ul><li>because: </li></ul><ul><ul><li>knowing one's paradigm reveals assumptions being made in modelling a problem, which can clarify programming objectives; </li></ul></ul><ul><ul><li>being able to state the advantages and drawbacks of various paradigms permits someone to decide between them based on the problem at hand. </li></ul></ul>
  4. 4. <ul><li>goto Statement </li></ul><ul><li>Process Abstraction </li></ul><ul><ul><li>Function Declaration </li></ul></ul><ul><ul><li>Function Prototype (C/C++) </li></ul></ul><ul><li>The function name that is used in function call hides the implementation details from user. </li></ul><ul><li>It shows only the outline of functionality that the function provides. </li></ul><ul><li>Multi Entry and Multi Exit Subprogram </li></ul><ul><li>Spaghetti Code </li></ul>
  5. 5. <ul><li>goto less Programming </li></ul><ul><li>Structured Theory </li></ul><ul><ul><li>Sequential </li></ul></ul><ul><ul><li>Selection </li></ul></ul><ul><ul><li>Iteration </li></ul></ul><ul><li>Single Entry and Single Exit Subprogram </li></ul><ul><li>Disadvantage: over-used term for using complexity-reducing techniques (meaningless these days). </li></ul>
  6. 6. <ul><li>Modular Programming : </li></ul><ul><ul><li>The main program  coordinates calls to procedures in  </li></ul></ul><ul><ul><li>separate  modules and hands over appropriate data  as  </li></ul></ul><ul><ul><li>parameters  </li></ul></ul><ul><ul><li>Functional independence, measured by: </li></ul></ul><ul><ul><ul><li>Internal cohesion (does/deals with one thing) </li></ul></ul></ul><ul><ul><ul><li>External coupling (interface complexity) </li></ul></ul></ul><ul><ul><li>Makes modification easier </li></ul></ul><ul><ul><li>Reduces error propagation </li></ul></ul>
  7. 7. <ul><li>Definition of ADT : </li></ul><ul><ul><li>ADT , or data abstraction , is a programming methodology where one defines not only the data structure to be used, but also the processes to manipulate the structure </li></ul></ul><ul><ul><li>Data structure: represents the properties, the state or characteristics of objects </li></ul></ul><ul><ul><li>Methods: permissible behaviors that are controlled through the member functions </li></ul></ul><ul><ul><li>Showing only the essential features and hiding the unnecessary features </li></ul></ul>
  8. 8. <ul><ul><li>A data representation that </li></ul></ul><ul><ul><ul><li>must be able to represent all possible values of the ADT </li></ul></ul></ul><ul><ul><ul><li>should be private </li></ul></ul></ul><ul><ul><li>A set of methods that support normal use of the ADT </li></ul></ul><ul><ul><ul><li>The user must be able to create, possibly modify, and examine the values of the ADT </li></ul></ul></ul><ul><ul><li>An algorithm for each of the possible operations that </li></ul></ul><ul><ul><ul><li>must be consistent with the chosen representation </li></ul></ul></ul><ul><ul><ul><li>all auxiliary (helper) operations that are not in the contract should be private </li></ul></ul></ul>
  9. 9. <ul><li>The ability to define an ADT where the type and/or size is specified generically so that a specific version can be generated later </li></ul><ul><li>In C++, parameterized ADTs are implemented as template classes </li></ul><ul><li>In C++, and also Ada, the parameterized ADT definition is generated at compile-time </li></ul>
  10. 10. <ul><li>Encapsulation is a technique that allows the programmer to group data and the functions that operate on that data and place them together in a single place. </li></ul><ul><li>Encapsulation Constructs : </li></ul><ul><ul><li>For large programs, to avoid having to recompile all code when one section changes </li></ul></ul><ul><ul><ul><li>Code can be grouped into logically related chunks called encapsulations </li></ul></ul></ul><ul><ul><li>Each language has some technique for then using the named encapsulation, sometimes called a namespace </li></ul></ul>
  11. 11. <ul><li>Controlling access to the data structure through some form of interface so that it cannot be directly manipulated by external code </li></ul><ul><li>This is often done by using two sections of an ADT definition </li></ul><ul><ul><li>the public part ( interface ) constitutes those elements that can be accessed externally </li></ul></ul><ul><ul><li>the private part , which remains secure because it is only accessible by subprograms of the ADT itself </li></ul></ul>
  12. 12. <ul><li>C++ offers two mechanisms for building data structures: the struct and the class </li></ul><ul><ul><li>C++ class  consists of  data members  and  methods (member functions) </li></ul></ul><ul><ul><li>C++ classes contain both visible (public) and hidden (private) components (as well as protected) </li></ul></ul><ul><ul><li>A stack-dynamic object may have heap-dynamic data so that parts of the object may continue even though the instant is deallocated </li></ul></ul>
  13. 13. <ul><li>OO Concepts: objects of the program interact by sending messages to each other </li></ul><ul><li>Main Features of OOP : </li></ul><ul><ul><li>ADT </li></ul></ul><ul><ul><li>Inheritance : </li></ul></ul><ul><ul><li>Create a new class from an existing class </li></ul></ul><ul><ul><li>Reuse, Extend and Overriding Function </li></ul></ul><ul><ul><li>Permits objects of a more specific class to inherit the properties (data) and behaviors (functions) of a more general/base class </li></ul></ul><ul><ul><li>Ability to define a hierarchical relationship between objects </li></ul></ul>
  14. 14. <ul><li>- (True) Polymorphism : a bility for different objects to interpret functions differently </li></ul><ul><ul><ul><li>Dynamic Binding </li></ul></ul></ul><ul><ul><ul><li>Virtual Methods </li></ul></ul></ul><ul><ul><ul><li>Pure Virtual Function </li></ul></ul></ul><ul><li>Additional Feature </li></ul><ul><ul><li>Generic Programming </li></ul></ul>
  15. 15. <ul><li>Procedural </li></ul><ul><ul><li>Focuses on process </li></ul></ul><ul><ul><li>Top Down approach </li></ul></ul><ul><ul><li>A Single module will be split into several smaller modules </li></ul></ul><ul><ul><li>General to Specific </li></ul></ul><ul><ul><li>If the requirements are clear at the first instance we can go for Top down approach </li></ul></ul><ul><li>OOP </li></ul><ul><ul><li>Focuses on object </li></ul></ul><ul><ul><li>Bottom Up approach </li></ul></ul><ul><ul><li>Lot of small modules will be grouped to form a single large module </li></ul></ul><ul><ul><li>Specific to General </li></ul></ul><ul><ul><li>In circumstances where the requirements may keep on adding, we go for Bottom up approach </li></ul></ul>
  16. 16. <ul><li>C++ is based on Simula 67 and C </li></ul><ul><li>Design by Kristen Nygaard and Ole-Johan Dahl </li></ul><ul><ul><li>Norwegian Computing Center, Oslo University </li></ul></ul><ul><ul><li>The start of object-oriented programming and object-oriented design </li></ul></ul><ul><li>Model real-world phenomena in code </li></ul><ul><ul><li>represent ideas as classes and class objects </li></ul></ul><ul><ul><li>represent hierarchical relations as class hierarchies </li></ul></ul><ul><li>Classes, inheritance, virtual functions, object-oriented design </li></ul><ul><li>A program becomes a set of interacting objects rather than a monolith </li></ul><ul><ul><li>Has major (positive) implications for error rates </li></ul></ul>
  17. 17. <ul><li>Compared to C++: no header files, macros, pointers and references, unions, operator overloading, templates, etc. </li></ul><ul><li>Object-orientation: Classes + Inheritance </li></ul><ul><li>Distributed: RMI, Servlet, Distributed object programming. </li></ul><ul><li>Robust: Strong typing + no pointer + garbage collection </li></ul><ul><li>Secure: Type-safety + access control </li></ul><ul><li>Architecture neutral: architecture neutral representation </li></ul><ul><li>Portable </li></ul><ul><li>Interpreted: High performance through Just in time compilation + runtime modification of code </li></ul><ul><li>Multi-threaded </li></ul>
  18. 18. <ul><li>C#, pronounced C Sharp, was developed by Microsoft as part of the .NET initiative </li></ul><ul><li>The principal designer and lead architect is Anders Hejlsberg, who was previously involved with the design of Turbo Pascal, Borland Delphi, and Visual J++ </li></ul><ul><li>It is a multi-paradigm language that include functional, imperative, OO and component-oriented disciplines </li></ul><ul><li>C# is intended to be a simple, modern, general-purpose, object-oriented programming language. </li></ul><ul><li>It was initially named Cool, which stood for &quot;C-like Object Oriented Language.&quot; However, in July 2000, the name of the programming language was given as C# </li></ul>

×