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


add to Google Reader add to Google Bookmark add to bloglines add to newsgator add to FURL add to digg add to webnews add to Netscape add to Yahoo MyWeb add to spurl.net add to diigo Bookmark newsvine Bookmark del.icio.us Bookmark @ SIMPIFY Bookmark MISTER WONG Bookmark Linkarena Bookmark icio.de Bookmark oneview Bookmark folkd.com Bookmark yigg.de Bookmark reddit Bookmark StumbleUpon Bookmark Slashdot Bookmark blinklist Bookmark technorati add to blogmarks add to blinkbits add to ma.gnolia add to smarking.com add to netvouz add to co.mments add to Connotea add to de.lirio.us

 

Related Files

Programming in C C++ Java

Filed under: Programming and C Programming Language
Programming 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 Language
The 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 Language
The 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 Language
1 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 Language
C Programming Language (below) as part of their research at AT&T. Unix and C++ ... The C Programming Language 2nd ed. by Kernighan and Ritchie. ...