Home > Programming > C Programming Language
Practical C++ Programming Copyright 2003 O'Reilly and Associates Page1
Sort Desciption:Chapter 26. Program Design ... C Language Solutions. 1) Create 47 different structures and an insert/delete. function for each. (Bad solution). ...
Content Inside:Practical C++ Programming Copyright 2003 O'Reilly and Associates Page1Page 1Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage1Chapter 26Program DesignPage 2Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage2Design GoalsReliabilityEconomyEase of UsePage 3Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage3Design FactorsSimplicityInformation HidingExpandabilityTestableReusability / generalityPage 4Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage4Design Principles1. Think Then code!2. Be Lazy (aka. Efficient)Page 5Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage5Procedure DesignProcedures should do one thing well.Interface should be as simple as possible.Global interactions should be as limited aspossible.Details are hidden.Page 6Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage6ModulesOrganize (Disorganization = government)Minimal connections between modulesConsistancy.Page 7Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage7Object DesignDesign a generic base class(I.E. Locomotive)Specialize it in the derived classes(Steam Locomotive Diesel Electric)Page 8Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage8The Linked List ProblemC Language Solutions1) Create 47 different structures and an insert/deletefunction for each. (Bad solution).0 insert_msg / remove_msginsert_run / remove_runinsert_kbd / remove_kdbinsert_idle / remove_idle(If you really want to be rotten use as many differentwords for "insert" and "remove" as you can when youname your functions.)Page 9Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage9"C" Linked List SolutionDefine a generic headerstruct list_head {struct list_head *next *prev;}Use this at the beginning of all your structures.struct run_list {struct list_head head;// Run list stuff};Page 10Practical C++ ProgrammingCopyright 2003 O'Reilly and AssociatesPage10&q ...
Source: www.oualline.com
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Related Files
Programming in C C++ Java
Filed under: Programming and C Programming LanguageProgramming in C C++ Java. Course Overview. Object oriented programming languages are widely used for the development of complex software systems. ...
C Programming
Filed under: Programming and C Programming LanguageThe C Programming Language ANSI C. By Brian W. C. Kernighan & Dennis M. Ritchie. K and R. "Practical C programming". By Steve ...
An Overview of the C++ Programming Language
Filed under: Programming and C Programming LanguageThe C++ programming language provides a model of memory and computation that ... 3 The C Programming Model presents the C subset of C++ and other C++ ...
C Programming Fundamentals
Filed under: Programming and C Programming Language1 C Programming Fundamentals C is a compiled language. The user creates source code (often ... exe extension). Below is typical C program called LED.C that illustrates some fundamental C ...
Essential C
Filed under: Programming and C Programming LanguageC Programming Language (below) as part of their research at AT&T. Unix and C++ ... The C Programming Language 2nd ed. by Kernighan and Ritchie. ...
