What is the real OOP?

iheshi 2004-03-10 09:18:30
看了一段时间的JAVA了(Think in Java)。语法、一些常识性的东西已经了解了。
自己也写了一些小的练习的小程序,可是到了现在,我还是没有真正了解OOP的思想。

OOP的思想就是:
世间万物都是对象。Reference是控制对象的钥匙。然后是堆和栈。

那么,再进一层呢?
...全文
33 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Programming in the modular manner is always encouraged for bigger systems―it is easier to achieve scalability with modular programming. Even JavaScript developers are now interested in building programs in a modular pattern. Modules help people who aren’t yet familiar with code to find what they are looking for and also makes it easier for programmers to keep things that are related close together. Designing and implementing applications in a modular manner is highly encouraged and desirable in both simple and enterprise level applications. This book covers some real-life examples of modules and how we can translate that into our world of programming and application design. After getting an overview of JavaScript object-oriented programming (OOP) concepts and their practical usage, you should be able to write your own object definitions using the module pattern. You will then learn to design and augment modules and will explore the concepts of cloning, inheritance, sub-modules, and code extensibility. You will also learn about SandBoxing, application design, and architecture based on modular design concepts. Become familiar with AMD and CommonJS utilities. By the end of the book, you will be able to build spectacular modular applications in JavaScript. What You Will Learn Understand the important concepts of OOP in JavaScript, such as scope, objects, inheritance, event delegation, and more Find out how the module design pattern is used in OOP in JavaScript Design and augment modules using both tight augmentation and loose augmentation Extend the capabilities of modules by creating sub-modules using techniques such as cloning and inheritance Move from isolated module pieces to a cohesive, well integrated application modules that can interact and work together without being tightly coupled See how SandBoxing is used to create a medium for all the modules to talk to each other as well as to the core Use the concepts of modular application design to handle dependencies and load modules asynchronously Become familiar with AMD and CommonJS utilities and discover what the future of JavaScript holds for modular programming and architecture
Experiment 1 The QuickSort Algorithm 1.Introduction to the quicksort algorithm In order to sort the input data sequence S, we can do like below: 1)Select one number q and then divide the sequence S into three sub-suquences: S1 in which all of elements are less than q, S2 in which all of elements are equal to q, and S3 in which all of elements are larger than q; 2)Then to sort S1 and S3 with the same algorithm using recursive call itself. 2. Experimental Purposes (1)Learn the sorting algorithms. (2)Understand the difference between the quicksort algorithm and other sorting algorithms, such as: insertion sorting algorithm, straight selection algorithm, etc.. (3)Simulate these algorithms using computer with high-level languages. (4)Solve some sorting problem with different sort algorithms. 3. Abstract of Experiment contents Use QuickSort algorithm to sort the array S that has n elements and constructed by the random() function. To compare the result with ones solved by other sorting algorithms, such as Straight selection sort, insert sort, etc., and understand the difference among them and know how to select some better sorting algorithm while solving some sorting problem. 4. Experimental Requirements 1)The template should be used for all kinds of data type, such as: integer, real, double, etc. in the program; 2)Programs should be made by Object-Oriented Programming (OOP) method; 3)The results should be compared with ones of other algorithms, such as: Straight selection sort, insert sort, Heapsort, etc., and draw the graph to find their differences. Figure 1 The difference between quicksort and insertion sort 4)Write down the report in which there should be the execution results of the program. 5. Example code with C++ ………. void myquicksort(int* A, int l,int r) { if(l>=r) return ; int i=l,j=r; int temp; //Use it to divide A into S1, S2,and S3 ……. //Partition S into S1, S2 and S3 here ……. myquicksort(A,l,i-1); //recursive call for the left part
About This Book, Make the optimum use of PHP coding to improve your programming productivityLeverage the potential of PHP for server-side programming, memory management, and object-oriented programmingPacked with real-life examples to help the readers implement concepts as they learn, Who This Book Is For, This book is for those who have basic experience in PHP programming. If you are developing performance-critical applications, then this book is for you., What You Will Learn, Setup high performance development and production environment for PHP 7Discover new OOP features in PHP 7 to achieve high performanceImprove your PHP applications' performanceAttain improved database performanceBenchmark PHP applications to optimize themWrite quality code by learning to improve code reusability, simplicity, and expressivenessGet rid of the bottlenecks in your PHP 7 applications by writing PHP code optimallyTackle issues related to web applications, such as high user dependency and large datasets, In Detail, PHP is a great language for building web applications. It is essentially a server-side scripting language that is also used for general-purpose programming. PHP 7 is the latest version, providing major backward-compatibility breaks and focusing on high performance and speed., This fast-paced introduction to PHP 7 will improve your productivity and coding skills. The concepts covered will allow you, as a PHP programmer, to improve the performance standards of your applications. We will introduce you to the new features in PHP 7 and then will run through the concepts of object-oriented programming (OOP) in PHP 7. Next, we will shed some light on how to improve your PHP 7 applications' performance and database performance. Through this book, you will be able to improve the performance of your programs using the various benchmarking tools discussed., At the end, the book discusses some best practices in PHP programming to help you improve the quality of your code., Style and approach, The book is a step-by-step guide to improve the quality of your code in PHP through real-time examples. The book takes a practical approach to improving the quality of your code.

62,634

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧