100% found this document useful (1 vote)
7 views

Programming Fundamentals A Modular Structured Approach Using C Kenneth Leroy Busbee pdf download

The document provides information about various programming and research-related ebooks available for download, including titles on C programming, research methods, and competition law. It features a structured approach to programming fundamentals using C and C++, authored by Kenneth Leroy Busbee, and includes a detailed table of contents outlining the topics covered. The document also emphasizes the availability of instant digital products in multiple formats.

Uploaded by

adenleduica
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
7 views

Programming Fundamentals A Modular Structured Approach Using C Kenneth Leroy Busbee pdf download

The document provides information about various programming and research-related ebooks available for download, including titles on C programming, research methods, and competition law. It features a structured approach to programming fundamentals using C and C++, authored by Kenneth Leroy Busbee, and includes a detailed table of contents outlining the topics covered. The document also emphasizes the availability of instant digital products in multiple formats.

Uploaded by

adenleduica
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Programming Fundamentals A Modular Structured

Approach Using C Kenneth Leroy Busbee pdf


download

https://ebookname.com/product/programming-fundamentals-a-modular-
structured-approach-using-c-kenneth-leroy-busbee/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

C Programming A Modern Approach 2nd Edition K. N. King

https://ebookname.com/product/c-programming-a-modern-
approach-2nd-edition-k-n-king/

Research Methods A Modular Approach 2nd Edition Sherri


L. Jackson

https://ebookname.com/product/research-methods-a-modular-
approach-2nd-edition-sherri-l-jackson/

Object Oriented Programming Using C Fourth Edition


Joyce Farrell

https://ebookname.com/product/object-oriented-programming-using-
c-fourth-edition-joyce-farrell/

Interest Rate Modeling Theory and Practice 1st Edition


Lixin Wu

https://ebookname.com/product/interest-rate-modeling-theory-and-
practice-1st-edition-lixin-wu/
Competition Law 7th Edition Richard Whish

https://ebookname.com/product/competition-law-7th-edition-
richard-whish/

Essential Microbiology 1st Edition Stuart Hogg

https://ebookname.com/product/essential-microbiology-1st-edition-
stuart-hogg/

Uncovering the Hidden The Works and Life of Der Nister


Gennady Estraikh

https://ebookname.com/product/uncovering-the-hidden-the-works-
and-life-of-der-nister-gennady-estraikh/

The Horror Readers Advisory Becky Siegel Spratford

https://ebookname.com/product/the-horror-readers-advisory-becky-
siegel-spratford/

Citizenship Vol II Who is a Citizen Feminism


Multiculturalism and immigration 1st Edition Richard
Bellamy And Madeleine Kennedy-Macfoy

https://ebookname.com/product/citizenship-vol-ii-who-is-a-
citizen-feminism-multiculturalism-and-immigration-1st-edition-
richard-bellamy-and-madeleine-kennedy-macfoy/
Approaches to Psychology 5th Edition William Glassman

https://ebookname.com/product/approaches-to-psychology-5th-
edition-william-glassman/
Programming Fundamentals - A Modular
Structured Approach using C++

By:
Kenneth Leroy Busbee
Programming Fundamentals - A Modular
Structured Approach using C++

By:
Kenneth Leroy Busbee

Online:
< http://cnx.org/content/col10621/1.22/ >

CONNEXIONS

Rice University, Houston, Texas


This selection and arrangement of content as a collection is copyrighted by Kenneth Leroy Busbee. It is licensed
under the Creative Commons Attribution 3.0 license (http://creativecommons.org/licenses/by/3.0/).
Collection structure revised: January 10, 2013
PDF generated: January 10, 2013
For copyright and attribution information for the modules contained in this collection, see p. 318.
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Author Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Orientation and Syllabus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Sharing/Rating Connexions Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1 1. Introduction to Programming
1.1 Systems Development Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Bloodshed Dev-C++ 5 Compiler/IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3 Modularization and C++ Program Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.4 Practice 1: Introduction to Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

2 2. Program Planning & Design


2.1 Program Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2 Pseudocode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3 Test Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.4 Practice 2: Program Planning & Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3 3. Data & Operators


3.1 Data Types in C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.2 Identier Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.3 Constants and Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.4 Data Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.5 Assignment Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.6 Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.7 Data Type Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.8 Practice 3: Data & Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4 4. Often Used Data Types


4.1 Integer Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2 Floating-Point Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.3 String Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.4 Arithmetic Assignment Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.5 Lvalue and Rvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.6 Integer Division and Modulus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.7 Practice 4: Often Used Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

5 5. Integrated Development Environment


5.1 Integrated Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.2 Standard Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.3 Compiler Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.4 Practice 5: Integrated Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

6 6. Program Control Functions


6.1 Pseudocode Examples for Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
6.2 Hierarchy or Structure Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.3 Program Control Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
iv

6.4 Void Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83


6.5 Documentation and Making Source Code Readable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
6.6 Practice 6: Program Control Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

7 7. Specic Task Functions


7.1 Specic Task Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.2 Global vs Local Data Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
7.3 Using a Header File for User Dened Specic Task Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.4 Practice 7: Specic Task Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

8 8. Standard Libraries
8.1 Standard Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.2 Practice 8: Standard Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

9 9. Character Data, Sizeof, Typedef, Sequence


9.1 Character Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
9.2 Sizeof Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
9.3 Typedef - An Alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
9.4 Sequence Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
9.5 Practice 9: Character Data, Sizeof, Typedef, Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

10 10. Introduction to Structured Programming


10.1 Structured Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
10.2 Pseudocode Examples for Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
10.3 Flowcharting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
10.4 Practice 10: Introduction to Structured Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

11 11. Two Way Selection


11.1 If Then Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
11.2 Boolean Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
11.3 Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
11.4 Compound Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
11.5 Practice 11: Two Way Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

12 12. Multiway Selection


12.1 Nested If Then Else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
12.2 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
12.3 Case Control Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
12.4 Branching Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
12.5 Practice 12: Multiway Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

13 13. Test After Loops


13.1 Do While Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
13.2 Flag Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
13.3 Assignment vs Equality within C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
13.4 Repeat Until Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
13.5 Practice 13: Test After Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


v

14 14. Test Before Loops


14.1 Increment and Decrement Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
14.2 While Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
14.3 Practice 14: Test Before Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

15 15. Counting Loops


15.1 For Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
15.2 Circular Nature of the Integer Data Type Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
15.3 Formatting Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . 203
15.4 Nested For Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
15.5 Practice 15: Counting Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

16 16. String Class, Unary Positive and Negative


16.1 String Class within C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
16.2 Unary Positive and Negative Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
16.3 Practice 16: String Class, Unary Positive and Negative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

17 17. Conditional Operator and Recursion


17.1 Conditional Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
17.2 Recursion vs Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
17.3 Practice 17: Conditional Operator and Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . 224
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

18 18. Introduction to Arrays


18.1 Array Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
18.2 Array Index Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
18.3 Displaying Array Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
18.4 Practice 18: Introduction to Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

19 19. File I/O and Array Functions


19.1 File Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
19.2 Arrays and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
19.3 Loading an Array from a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
19.4 Math Statistics with Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
19.5 Practice 19: File I/O and Array Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

20 20. More Array Functions


20.1 Finding a Specic Member of an Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
20.2 Sorting an Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
20.3 Practice 20: More Array Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

21 21. More on Typedef


21.1 Versatile Code with Typedef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
21.2 Practice 21: More on Typedef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

22 22. Pointers
22.1 Address Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
22.2 Parameter Passing by Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


vi

22.3 Pointer Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261


22.4 Indirection Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
22.5 Practice 22: Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

23 23. More Arrays & Compiler Directives


23.1 Multidimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
23.2 Conditional Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
23.3 Practice 23: More Arrays & Compiler Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

24 24. OOP & HPC


24.1 Object Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
24.2 Understanding High Performance Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
24.3 Practice 24: OOP & HPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

25 Review Materials
25.1 Review: Foundation Topics Group: 1-5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
25.2 Review: Modular Programming Group: 6-9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
25.3 Review: Structured Programming Group: 10-16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
25.4 Review: Intermediate Topics Group: 17-21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
25.5 Review: Advanced Topics Group: 22-24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
26 Appendix
26.1 Abbreviated Precedence Chart for C++ Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
26.2 C++ Reserved Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
26.3 ASCII Character Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
26.4 Show Hide File Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
26.5 Academic or Scholastic Dishonesty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
26.6 Successful Learning Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
26.7 Study Habits that Build the Brain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Attributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


Preface 1

About this Textbook/Collection


Programming Fundamentals  A Modular Structured Approach using C++
Programming Fundamentals - A Modular Structured Approach using C++ is written by Kenneth Leroy
Busbee, a faculty member at Houston Community College in Houston, Texas. The materials used in this
textbook/collection were developed by the author and others as independent modules for publication within
the Connexions environment. Programming fundamentals are often divided into three college courses: Mod-
ular/Structured, Object Oriented and Data Structures. This textbook/collection covers the rst of those
three courses.
On January 10, 2013 Version 1.22 was created with the modules that make up the collection "xed" to
the their current versions. This will allow Version 1.22 to remain static with the modules as of that date.
The collection is going to be revised with a dierent organization of chapters along with updated modules
to handle C++, Java and C# programming languages. The next version of the collection will have signicant
changes.

Connexions Learning Modules


The learning modules of this textbook/collection were written as standalone modules. Students using a
collection of modules as a textbook will usually view it contents by reading the modules sequentially as
presented by the author of the collection.
However, the majority of readers of these modules will nd them as a result of an Internet search. The
Connexions Project allows the author of a module to create web links to other Connexions modules and
Internet locations. These links are shown when viewing materials on-line and are categorized into three
types: Example, Prerequisite and Supplemental. The importance of each link is numbered from 1 to 3 by
the author. When viewing the module each links shows a three part box with yellow or white rectangles.
strongly related link. As the yellow decreases the importance decreases.
All three yellow means it is a
Prerequisite links within
Students using this collection for a college course should note that all of the
the modules will be modules that student should have already read and most of the Supplemental links
will be modules that the student will read shortly. Thus, students should use Prerequisite links for review
as needed and not be overly concerned about viewing all of the Supplemental links at the rst reading of
this textbook/collection.

Conceptual Approach
The learning modules of this textbook/collection were, for the most part, written without consideration of
a specic programming language. In many cases the C++ language is discussed as part of the explanation
of the concept. Often the examples used for C++ are exactly the same for the Java programming language.
However, some modules were written specically for the C++ programming language. This could not be

1 This content is available online at <http://cnx.org/content/m19049/1.17/>.

Available for free at Connexions <http://cnx.org/content/col10621/1.22>

1
2

avoided as the C++ language is used in conjunction with this textbook/collection by the author in teaching
college courses.

Bloodshed Dev-C++ 5 Compiler/IDE


This open source compiler/IDE (Integrated Development Environment) was used to develop the demon-
stration source code les provided within the modules of this textbook/collection. The compiler/IDE is
presented to the student in the second module of Chapter 1, with instructions for downloading, installing
and using the compiler/IDE. A more complete explanation of the IDE along with demonstration source code
listings with errors is presented in rst module of Chapter 5. All of the source code les provided in this
textbook/collection contain only ANSI standard C++ code and should work on any standard C++ compiler
like Microsoft Visual Studio (which includes C++), Microsoft Visual C++ Express or Borland C++ Builder.

Instructor Materials
Encrypted instructor materials are available in a module that is not part of this collection. It's title: Instruc-
tor Materials for: Programming Fundamentals - A Modular Structured Approach using C++ is available
at: http://cnx.org/content/m34529/latest/
2 and the encryption code is only available to educational insti-
tutional faculty that are considering adoption of this collection as a textbook.

About Connexions
Connexions Modular Content
The Connexions Project http://cnx.org
3 is part of the Open Educational Resources (OER) movement
dedicated to providing high quality learning materials free online, free in printable PDF format, and at
low cost in bound volumes through print-on-demand publishing. This textbook is one of many collections
available to Connexions users. Each collection is composed of a number of re-usable learning modules
written in the Connexions XML markup language. Each module may also be re-used (or 're-purposed') as
part of other collections and may be used outside of Connexions.

Re-use and Customization


The Creative Commons (CC) Attribution license
4 applies to all Connexions modules. Under this license,
any Connexions module may be used or modied for any purpose as long as proper attribution to the
original author(s) is maintained. Connexions' authoring tools make re-use (or re-purposing) easy. There-
fore, instructors anywhere are permitted to create customized versions of this textbook by editing modules,
deleting unneeded modules, and adding their own supplementary modules. Connexions' authoring tools
keep track of these changes and maintain the CC license's required attribution to the original authors. This
process creates a new collection that can be viewed online, downloaded as a single PDF le, or ordered in
any quantity by instructors and students as a low-cost printed textbook.

Read the book online, print the PDF, or buy a copy of the book.
To browse this textbook online, visit the collection home page. You will then have three options.

1. You may view the collection modules on-line by clicking on the "Start " link, which takes you to
the rst module in the collection. You can then navigate to the next module using "NEXT " and

2 "Instructor Materials for: Programming Fundamentals - A Modular Structured Approach using C++"
<http://cnx.org/content/m34529/latest/>
3 http://cnx.org/
4 http://creativecommons.org/licenses/by/2.0/

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


3

through the subsequent modules by using the " PREVIOUS | NEXT " button that is towards
the upper right to move forward and backward in the collection. You can jump to any module in the
collection by clicking on that module's title in the "TABLE OF CONTENTS" box on the left side of
the window. If these contents are hidden, make them visible by clicking on the small triangle to the
right of the "TABLE OF CONTENTS". Chapters also have a small triangle to show or hide contents.
2. You may obtain a PDF of the entire textbook to print or view oine by clicking on the "Download
PDF" link in the "Content Actions" box.
3. You may order a bound copy of the collection (for a reasonable printing and shipping fee) by clicking
on the "Order printed copy" button.

Connexions PDF Conversion Problems


Buying a copy of the textbook/collection is basically sending the PDF le to a printing service that has
a contract with the Connexions project. There are several known printing problems and the Connexions
Project is aware of them and seeking a solution. In the mean time, be aware that quirks exist for printed
PDF materials. A description of the known problems are:

1. When it converts an "Example" the PDF displays the rst line of an example properly but indents
the remaining lines of the example. This problem occurs for the printing of a book (because it prints
a PDF) and downloading either a module or a textbook/collection as a PDF.
2. Chapter numbering has been added to the on-line Table of Contents. This will make it easier for
students to quickly get to the chapter reading materials. However this creates a "double" chapter
numbering within the textbook/collection's PDF and custom printing formats.
3. Within C++ there are three operators that do not convert properly to PDF format.

decrement  which is two minus signs

insertion  which is two less than signs

extraction  which is two greater than signs

Table 1

Rating Connexion Modules


A rating feature was added during 2009 for Connexions modules. It will not be useful until more people
rate modules within the Connexions repository. If a module is rated by several people, it can be used as a
measure of quality. Thus, your participation in rating modules is welcomed and helps others determine
the quality of the educational materials being viewed.
In order to rate modules you must have a Connexions account. Three (3) modules have been added to
the preface series of modules for this collection. They explain why and how to create a Connexions account
and how to rate a Connexions module.

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


4

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


Author Acknowledgements 5

I wish to acknowledge the many people who have helped me and have encouraged me in this project.

1. Mr. Abass Alamnehe, who is a fellow faculty member at Houston Community College. He has encour-
aged the use of Connexions as an "open source" publishing concept. His comments on several modules
have led directly to the improvement of the materials in this textbook/collection.
2. The hundreds (most likely a thousand plus) students that I have taken programming courses that I
have taught since 1984. The languages include: COBOL, main frame IBM assembly, Intel assembly,
Pascal, "C" and "C++". They have often suggested that I write my own book because they thought
that I was explaining the subject matter better than the author of the textbook that we were using.
Little did my students understand that directly or indirectly they aided in the improvement of the
materials from which I taught as well as improving me as a teacher.
3. To my future students and all those that will use this textbook/collection. They will provide suggestions
for improvement as well as being the thousand eyes identifying the hard to nd typos, etc.
4. My wife, Carol, who supports me in all that I do. She has tolerated the many hours that I have spent
in concentration on developing the modules that comprise this work. Without her support, this work
would not have happened.

5 This content is available online at <http://cnx.org/content/m19055/1.5/>.

Available for free at Connexions <http://cnx.org/content/col10621/1.22>

5
6

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


Orientation and Syllabus 6

Orientation
Textbook/Collection Layout
The approach of this course will be to take the student through a progression of materials that will allow
the student to develop the skills of programming. The basic unit of study is a Connexions module. Several
modules are collected into a chapter. The chapters are divided into ve groups.

Group Title Chapters Modules

Pre-Chapter Items N/A 4

Foundation Topics 1-5 27

Modular Programming 6-9 17

Structured Programming 10-16 30

Intermediate Topics 17-21 17

Advanced Topics 22-24 11

Review Materials N/A 5

Appendix N/A 7

Total Modules N/A 118

Table 1

Some professors using this textbook/collection might decide to eliminate certain modules or chapters.
Some may eliminate the entire Advanced Topics group. Other professors may choose to add additional study
materials. The advantage of this textbook/collection is that it may be adapted by professors to suit the
needs of their students.

Chapter Layout
Each chapter will usually ow from:

1. One or more Connexions modules built for independent delivery.


2. A Connexions Practice module built specically for this textbook/collection.

As you proceed with the Connexions modules that comprise a chapter, you should:

• Complete any tasks/demos that require downloading items.

6 This content is available online at <http://cnx.org/content/m19684/1.12/>.

Available for free at Connexions <http://cnx.org/content/col10621/1.22>

7
8

• Do any exercises.
• Create 3x5 study cards for all denitions. When this material is used as a textbook for a course the
denitions are to be memorized. Conrm this with your professor.

As you start the Practice module you will usually encounter:

• Learning Objectives
• Memory Building Activities aka MBAs Link  These could consist of any of the following types of
interactive computer activities: ash card, crossword puzzle, seek a word, drag n drop, labeling,
ordering or sorting. When the materials are used as a textbook for a course, it is imperative that
students do a variety of repetitive activities in order to memorize basic course material. Besides, have
fun learning.
• Exercises  In addition to any exercises within the study modules that you completed before the
practice module, there will be at least one exercise for students to complete.
• Miscellaneous Items  These will exist for some of the chapters.
• Lab Assignment  Usually, completed on one's own eorts. Review the instructions/restrictions from
your professor/teacher if using this for a high school or college credit course.
• Problems  The intent of this activity is for students to formulate their own answers. Thus, solutions
to the problems will not be provided. When the materials are used as a textbook for a course, the
professor/teacher may assign students to a "Study Group" or let students form study groups to discuss
their solutions with each other. If you are using this for a high school or college credit course, verify that
you may work as team at solving the problems. This type of approved activity is called "authorized
collusion" and is not a violation of "Academic or Scholastic Dishonesty" rules.

A professor using this textbook/collection/course will most likely have additional lab assignments, quizzes
and exams that would be used in calculating your grade.

Connexions Module Reading List


no
The modules in this textbook/collection have had content reviewed and are believed to be sucient, thus
additional textbook is required. However, some students desire additional references or reading. The
author has used several textbooks over the years for teaching "COSC1436  Programming Fundamentals I"
course at Houston Community College and at the Community College of Qatar. A reading reference list has
been prepared and includes references for the following textbooks:

1. Starting Out with C++ Early Objects, by: Tony Gaddis et. al., 7
th Edition, International Edition,
ISBN: 978-0-13-137714-1
2. Starting Out with C++ Early Objects, by: Tony Gaddis et. al., 6
th Edition, ISBN: 0-321-51238-3
3. Starting Out with C++ Early Objects, by: Tony Gaddis et. al., 5
th Edition, ISBN: 0-321-38348-6
4. Computer Science  A structured Approach using C++, by: Behrouz A. Forouzan et. al., 2
nd Edition,
ISBN: 0-534-37480-8

These textbooks are typically available in the used textbook market at a reasonable price. You may use
any one of the three books. If you acquire one of the above optional traditional textbooks, you may want
to download and store the following le to your storage device (disk drive or ash drive) in an appropriate
folder.
Download from Connexions: Connexions_Module_Reading_List_col10621.pdf
7

Syllabus
The syllabus for a course that is for credit will be provided by your specic course professor. If you are using
this textbook/collection for non-credit as self-study, we have some suggestions:

7 See the le at <http://cnx.org/content/m19684/latest/Connexions_Module_Reading_List_col10621_V2.pdf>

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


9

1. Plan regular study periods


2. Review the three (3) Pre-Chapter Items modules
3. Review the last four (4) modules in the Appendix
4. Proceed with Chapter 1 going through all 24 chapters
5. Do all of the demo programs as you encounter them
6. Memorize all of the terms and denitions
7. Do all lab assignments
8. Prepare answers to all of the problems in the Practice modules
9. At the end of every section, do the Review module

These is no magic way to learn about computer programming other than to immerse yourself into regular
study and study includes more than casual reading. To help you keep track of your study, we have
included a check o list for the textbook/collection.

Check Description # Modules

Pre-Chapter Items 4

Last four Appendix Items 4

Chapters 1 to 5 27

Review Materials for 1 to 5 1

Chapters 6 to 9 17

Review Materials for 6 to 9 1

Chapters 10 to 16 30

Review Materials for 10 to 16 1

Chapters 17 to 21 17

Review Materials for 17 to 21 1

Chapters 22 to 24 11

Review Materials for 22 to 24 1

First three Appendix Items 3

N/A Total Modules 118

Table 2

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


10

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


Sharing/Rating Connexions Materials 8

Historical Rating System


At one time within Connexions there was a ve (5) star rating system provided within each Connexions
module. This feature was not often used and was discontinued.

Sharing Connexions Materials


The ve (5) star rating feature was replaced with several ways for users of Connexions materials to share
with others. Available at the top and bottom of each module or collection are:

• Google's +1
• Facebook's Like
• twitter's Tweet
8 This content is available online at <http://cnx.org/content/m33960/1.2/>.

Available for free at Connexions <http://cnx.org/content/col10621/1.22>

11
12

Figure 1: Sharing Connexions Materials

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


Chapter 1

1. Introduction to Programming

1.1 Systems Development Life Cycle1


1.1.1 Discussion
The Systems Development Life Cycle is the big picture of creating an information system that handles
The applications usually consist of many programs. An
a major task (referred to as an application).
example would be the Department of Defense supply system, the customer system used at your local bank,
the repair parts inventory system used by car dealerships. There are thousands of applications that use an
information system created just to help solve a business problem.
Another example of an information system would be the "101 Computer Games" software you might buy
at any of several retail stores. This is an entertainment application, that is we are applying the computer
to do a task (entertain you). The software actually consists of many dierent programs (checkers, chess, tic
tac toe, etc.) that were most likely written by several dierent programmers.
Computer professionals that are in charge of creating applications often have the job title of System
Analyst. The major steps in creating an application include the following and start at Planning step.
1 This content is available online at <http://cnx.org/content/m18684/1.6/>.

Available for free at Connexions <http://cnx.org/content/col10621/1.22>

13
14 CHAPTER 1. 1. INTRODUCTION TO PROGRAMMING

Figure 1.1: Systems Development Life Cycle

During the Design phase the System Analyst will document the inputs, processing and outputs of each
program within the application. During the Implementation phase programmers would be assigned to
write the specic programs using a programming language decided by the System Analyst. Once the system
of programs is tested the new application is installed for people to use. As time goes by, things change and a
specic part or program might need repair. During the Maintenance phase, it goes through a mini planning,
analysis, design and implementation. The programs that need modication are identied and programmers
change or repair those programs. After several years of use, the system usually becomes obsolete. At this
point a major revision of the application is done. Thus the cycle repeats itself.

1.1.2 Denitions
Denition 1.1: system analyst
Computer professional in charge of creating applications.

Denition 1.2: applications


An information system or collection of programs that handles a major task.

Denition 1.3: life cycle


Systems Development Life Cycle: Planning - Analysis - Design - Implementation - Maintenance

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


15

Denition 1.4: implementation


The phase of a Systems Development Life Cycle where the programmers would be assigned to write
specic programs.

1.2 Bloodshed Dev-C++ 5 Compiler/IDE2


1.2.1 Introduction
Microsoft and Borland are the two reputable names within the programming world for compilers. They sell
compiler software for many programming languages. For the C++ programming language, the Microsoft
Visual Studio which includes C++ and Borland C++ Builder are excellent compilers. Often with textbooks
or free via the internet; you can get Microsoft's Visual C++ Express or Borland's Personal Edition version
of a compiler. However, installing either of these compliers can be complex. Microsoft's Visual Studio
compiler often creates a variety of installation problems (such as making sure the operating system and .net
components are current) thus making it dicult for students to install at home. These compliers require
you to build a project to encompass every program. Using a commercially sold compiler that professional
programmers would consider using for project development is ne for professionals but often confusing to
beginners. Eventually, if you are going to become a professional programmer, you will need to become
familiar with the commercially sold compilers.
We suggest that beginning students consider one of the easier to install compiler software packages for use
in a programming fundamentals course. The best option we have found is an open source compiler/IDE
(Integrated Development Environment) named: Bloodshed Dev-C++ 5 compiler/IDE.
Denition 1.5: open source
Group development of source code for software that is made available to the public at no cost.

1.2.2 Bloodshed Dev-C++ 5 compiler/IDE


Advantages: Can be installed on Windows 95/98/NT/2000/XP operating systems. I have it installed on
Windows Vista operating system, thus it can work with slower processors and almost any Windows operating
system. It only requires about 80 MB of storage space (usually enough for the compiler with all of its les
and storage room for several of your programs). It is very easy to install and easy to use. Does not require
the use of a "project"; thus individual source code les can be easily compiled.
Disadvantages: Would not normally be used by professional programmers, but is sucient for a beginning
computer programming course and is a full-featured compiler/IDE.
Unique Advantage: Can be installed and run on a ash drive, thus giving the student the ability to
portability,
work on their lab assignments on any computer that has a USB port. This can give the student
being able to do lab assignments at home, work, library, open lab, classroom, friend's house, etc.

Denition 1.6: portability


The ability to transport software on a ash drive and thus use it on various machines.

1.2.3 Preparation before Installation


1.2.3.1 Creating the Needed Folders and Sub-Folders

You need to get the software and a C++ source code program that has been tested and is error free.
two folders on your hard drive or
You will need about 80MB of storage space. We suggest that you create
ash drive depending on which installation you choose. If on a ash drive create them at the root level of
the drive. If on your home machine, you can use the folder area set up by the operating system for you as a
user. Name them:
2 This content is available online at <http://cnx.org/content/m18785/1.15/>.

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


16 CHAPTER 1. 1. INTRODUCTION TO PROGRAMMING
• Cpp_Software_Download
• Cpp_Source_Code_Files

Within the Cpp_Source_Code_Files folder, create a sub-folder named:

• Compiler_Test

To help you keep les organized, you will want to create other sub-folders for storing source code les. We
suggest you create at least two other sub-folder to be used with Connexions' related modules. Within the
Cpp_Source_Code_Files, create sub-folders named:

• Demo_Programs
• Monitor_Header

Denition 1.7: folder


A named area for storage of documents or other les on a disk drive or ash drive.

Denition 1.8: source code


Any collection of statements or declarations written in some human-readable computer program-
ming language.

1.2.3.2 Getting the Software

The full version of the software is named: Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC
3.4.2 You can either download it from Bloodshed or download the version as of 12/8/2008 that is stored
on the Connexions web site. Store it in the Cpp_Software_Download folder you created. The software is
approximately 9.1 MB and will take several minutes to download if you are using a dial-up modem connection.

tip: The software has not signicantly changed since 2007 and the Connexions version will be
sucient for most users. The Bloodshed link requires some additional navigation to get to the
software download. Thus, because it is signicantly easier, we recommend that you download the
software from the Connections web site.

Link to Bloodshed: http://www.bloodshed.net/dev/devcpp.html


3
Download from Connexions: devcpp-4.9.9.2_setup.exe
4

1.2.3.3 Getting a C++ Source Code File

Listed below is a C++ source code le titled: Compiler_Test.cpp It has been prepared for Connexions web
delivery. Download and store it in the Compiler_Test sub-folder you created. You may need to right click
on the link and select "Save Target As" in order to download the le.
Download from Connexions: Compiler_Test.cpp
5

1.2.4 Installation Instructions for Bloodshed Dev-C++ 5 compiler/IDE


The Version 5 which is well tested (don't let the beta release scare you) and should work on a variety of
machines and various Microsoft Operating systems including Windows 98, Windows 2000, Windows XP and
Windows Vista. Below are installation instructions for installing it on a machine or installing it on a ash
drive. We don't suggest trying to switch between the machine drive and ash drive. If it is installed on
the machine drive and you try installing it on a ash drive, it creates problems and will not work perperly.
Either install it on the ash drive to gain your portability or install it on your machine.

3 http://www.bloodshed.net/dev/devcpp.html
4 See the le at <http://cnx.org/content/m18785/latest/devcpp-4.9.9.2_setup.exe>
5 See the le at <http://cnx.org/content/m18785/latest/Compiler_Test.cpp>

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


17

1.2.4.1 Computer Installation Instructions

1. Navigate to the Cpp_Software_Download folder and run the devcpp-4.9.9.2_setup.exe software


by double cliking on the lename.
2. Use common sense and answer the installation prompts. NOTE THE FOLLOWING TWO ITEMS:
3. When it gets to the "Choose Install Location" use the default software location of: C:\Dev-Cpp\ (or
select the location you want to store the installed program but use the default unless you are familiar
with installing software).
4. When it asks: "Do you want to install Dev C++ for all users on this computer?" answer "Yes".
5. After it installs, it will ask some "rst time conguration" questions. Again, use common sense and
answer the questions. NOTE THE FOLLOWING ITEM:
6. Answer "No" to the retrieve information from header les.
7. It will start your compiler/IDE with a "Tip of the day". We suggest you check the box in the lower
left and select "Close".
8. Close your compiler/IDE by using the normal red "X" box. We want to show you how to start your
compiller normally.
9. You start your compiler software similar to starting any software loaded on your machine ("Start" then
"All Programs" then "Bloodshed Dev-C++" then "Dev-C++").
10. On the menus at the top  Select "File" then "Open project or le" then navigate to where your source
code le (Compiler_Test.cpp) is stored on your hard drive. See the suggested folder name above.
Select the source code le and open it.
11. You should see the source code listing. Press F9 key or select the "Execute" then "Compile & Run"
from the menus at the top. A black screen box should appear and you answer questions appropriately
to run the program. When you are done running your program the black screen box goes away.

1.2.4.2 Flash Drive Installation Instructions

1. Navigate to the Cpp_Software_Download folder and run the devcpp-4.9.9.2_setup.exe software


by double cliking on the lename.
2. Use common sense and answer the installation prompts. NOTE THE FOLLOWING TWO ITEMS:
3. When it gets to the "Choose Install Location" you can see that the default software location of:
C:\Dev-Cpp\ however, it needs to be changed. Change the "Destination Directory" by selecting
C:\Dev-Cpp\ to DriveLetter:\Dev-Cpp\ (where the
changing the default software location from:
DriveLetter is the drive that represents your ash drive).
4. When it asks: "Do you want to install Dev C++ for all users on this computer?" answer "No".
5. After it installs, it will ask some "rst time conguration" questions. Again, use common sense and
answer the questions. NOTE THE FOLLOWING ITEM:
6. Answer "No" to the retrieve information from header les.
7. It will start your compiler/IDE with a "Tip of the day". We suggest you check the box in the lower
left and select "Close".
8. Close your compiler/IDE by using the normal red "X" box. We want to show you how to start your
compiller normally.
9. To start your compiler software you navigate to the "Dev-Cpp" folder on your ash drive and select the
"devcpp.exe" application. NOTE: When using the ash drive you should not try starting the compiler
by double clicking on a C++ source code le. This method works on a machine installation but does
not work on a ash drive installation.
10. On the menus at the top  Select "File" then "Open project or le" then navigate to where your source
code le (Compiler_Test.cpp) is stored on your ash drive. See the suggested folder name above.
Select the source code le and open it.
11. You should see the source code listing. Press F9 key or select the "Execute" then "Compile & Run"
from the menus at the top. A black screen box should appear and you answer questions appropriately
to run the program. When you are done running your program the black screen box goes away.

Available for free at Connexions <http://cnx.org/content/col10621/1.22>


Exploring the Variety of Random
Documents with Different Content
The Project Gutenberg eBook of El aceite de
olivas
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: El aceite de olivas


su extracción, clarificación, depuración, conservación y
envases para su exportación, decoloración y medios
propuestos para quitarle la rancidez

Author: Alessandro Bizzarri

Translator: Diego Pequeño

Release date: January 13, 2013 [eBook #41842]


Most recently updated: October 23, 2024

Language: Spanish

Credits: Produced by Chuck Greif, Biblioteca digital hispánica and


the Online Distributed Proofreading Team at
http://www.pgdp.net

*** START OF THE PROJECT GUTENBERG EBOOK EL ACEITE DE


OLIVAS ***
BIBLIOTECA DEL AGRICULTOR
VOLUMEN IV

EL ACEITE
DE OLIVAS
Su extracción, clarificación,
depuración, conservación y envases
para su exportación,
decoloración y medios propuestos
para quitarle la rancidez,

POR EL

Dr. A. Bizzarri.
SEGUNDA EDICIÓN

traducida por

D. DIEGO PEQUEÑO
Catedrático numerario
del Instituto Agrícola de Alfonso
XII
y ex Director del mismo.

MADRID
LIBRERÍA AGRÍCOLA Y CASA EDITORIAL
Calle de Serrano, núm. 14.
1900

EL ACEITE
DE OLIVAS
SU EXTRACCIÓN, CLARIFICACIÓN,
DEPURACIÓN, CONSERVACIÓN Y ENVASES PARA SU
EXPORTACIÓN,
DECOLORACIÓN
Y MEDIOS PROPUESTOS PARA QUITARLE LA RANCIDEZ

POR EL

DR. ALEJANDRO BIZZARRI

SEGUNDA EDICIÓN

traducido por

D. DIEGO PEQUEÑO

Catedrático numerario del Instituto Agrícola de Alfonso XII


y ex Director del mismo.

MADRID
IMPRENTA DE LOS HIJOS DE M. G. HERNÁNDEZ
Libertad, 16 duplicado.
1900
Es propiedad.
Queda hecho el depósito
que marca la
ley.
PRÓLOGO
Grandes é indiscutibles progresos ha realizado y continúa realizando
Italia en la elaboración de los aceites de olivas, habiendo logrado colocarse
á la cabeza de las naciones productoras de tan valiosa mercancía. Ninguna
otra ofrece tantas semejanzas climatológicas con España para que
olvidemos imitarla.
Si en todo momento puede ser útil á nuestros almazareros el
conocimiento de la fecunda labor allí realizada, de cuatro lustros á esta
parte, nunca como en las presentes circunstancias.
Nuestra riqueza olivarera, llamada á ser la primera del mundo en calidad
y cantidad, atraviesa, á la hora presente, profunda crisis por mil causas de
todos conocidas, y especialmente por la pésima elaboración de nuestros
aceites y el ningún cuidado con que se les depura y conserva.
Atentos á estas sumarísimas consideraciones, nos hemos decidido á dar á
luz el presente trabajo, que para su más perfecta inteligencia y metódica
exposición hemos dividido en tres partes.
La primera es una traducción de la interesante obrita del doctor
Alejandro Bizzarri, en la cual el autor ha logrado sintetizar, en pocas
páginas, cuanto importa conocer á los almazareros, refinadores,
almacenistas y negociantes. El nombre del Sr. Bizzarri es harto conocido en
Italia como experto elajiotécnico, para que nos detengamos á hacer su
elogio.
En la segunda parte consignamos una serie ordenada de preceptos y
conclusiones prácticas relativas á la industria oleícola, expuestos en forma
dogmática y con la necesaria claridad y sencillez á fin de que sean
comprendidos hasta del más rústico maestro molinero.
Por último, la tercera es una recopilación interesantísima de los datos
publicados por el Centro de información comercial creado recientemente en
el Ministerio de Estado.
En ella encontrarán nuestros lectores multitud de cifras relativas al
comercio de importación y exportación de los aceites; valores alcanzados
en las principales plazas comerciales; naturaleza, forma y capacidad de los
envases; derechos de aduanas, impuestos é importadores de dicha
mercancía, terminando con las tarifas de transporte por los ferrocarriles.
No hay que hacerse ilusiones: perdido ó casi perdido el mercado de los
aceites de olivas para usos industriales por la terrible competencia que
tienen que soportar de los de semillas, palma, grasas y productos de todo
género; y perdido para siempre y totalmente para el alumbrado público,
sólo queda á los olivareros españoles un camino: elaborarlos con esmero á
fin de obtenerlos finos, aromáticos y comestibles, para cuyo uso jamás
temerán la competencia. Ninguna otra grasa vegetal ó animal posee el
conjunto de propiedades higiénicas que caracteriza los buenos aceites de
olivas. Si esto es una verdad indiscutible, ¿á qué esperamos?
Importa, pues, no cejar un punto en el empeño ya felizmente comenzado
por algunos almazareros. Importa desterrar para siempre los vetustos é
irracionales métodos de elaboración, abandonando añejos prejuicios, para
entrar de lleno en las anchurosas vías abiertas á los progresos elajiotécnicos.
El modesto libro que hoy ofrecemos al público acaso pueda contribuir,
aun cuando sea en pequeña escala, á inculcar en nuestros cosecheros la idea
de la urgente necesidad en que están de romper los antiguos moldes. Con
ello veríamos colmados nuestros deseos y recompensados nuestros afanes.
Diego Pequeño.
PRIMERA PARTE
LOS ACEITES DE OLIVAS EN ITALIA
El cultivo de la vid y la elaboración de los vinos son, á la hora presente,
objeto de asiduos y prolijos estudios, tanto por las Estaciones enológicas
como por las Sociedades agrícolas, existiendo buen número de cosecheros
los cuales, gracias á la aplicación de los procedimientos recomendados por
dichos centros, han conseguido ya grandes y positivas ventajas comerciales.
Sabido es que el aceite de olivas, como producto industrial, constituye
una importantísima parte de la riqueza agraria de nuestro país, y en su
virtud entendemos no será baldío, ni para el almazarero ni para el
negociante, la publicación de algunos estudios nuestros acerca de la
clarificación y purificación de una mercancía cuya producción, sólo en
Toscana, se eleva á la respetable cifra de 160.000 hectolitros, por término
medio, al año.
Grandes son, en verdad, las vías abiertas á la exportación de tan valioso
artículo; pero éstas se extenderán aún mucho más en Italia el día que
elaborando con mayor esmero, ofrezcamos un producto mejor clarificado,
limpio y conservado, al propio tiempo que más artísticamente dispuesto en
buenos envases, con especial el que se destina para el exterior.
RECOLECCIÓN DE LAS ACEITUNAS

Y REGLAS GENERALES PARA LA EXTRACCIÓN DE LOS ACEITES

Salvo raras excepciones, convendrá proceder á esta faena tan pronto


como las aceitunas estén casi maduras, cuando su piel ofrezca un color
vinoso[1]. Según el país y según los prejuicios del olivicultor, varía la época
de la recolección.
Entre nosotros convendrá efectuarla desde el 15 de Noviembre al 15 de
Diciembre, dado que el pequeño aumento de aceite que pudiera lograrse
con el retraso no compensa, en modo alguno, los riesgos que se corren de
diferirla hasta Enero y más tarde aún, cual suele suceder.
Creen algunos que las aceitunas cosechadas tarde rinden mayor cantidad
de aceite en proporción al peso de las mismas; pero de los experimentos
efectuados hasta el día resulta que el producto más considerable obtenido en
tales condiciones es sólo aparente, puesto que perdiendo el agua de
vegetación concluyen por ocupar un menor espacio, de suerte que si un
determinado número de olivas recolectadas en Noviembre rellenan, por
ejemplo, una cierta medida, el mismo número de frutos cosechados dos ó
tres meses después no llenarán la misma medida por la sencilla razón de
haber disminuído de volumen.
Importa además considerar que efectuando en tiempo oportuno la
recolección se evitan daños positivos, pérdidas evidentes, causadas por las
lluvias, las nieves, los vientos, los tordos y todo linaje de merodeo; por
tanto, será siempre preferible y ventajoso practicar dicha labor durante los
meses de Noviembre y Diciembre, sin diferirla hasta los de Febrero y
Marzo, según costumbre.
A lo expuesto podemos añadir que con las recolecciones tardías se causa
daño á la próxima fructificación, así como también al aceite, que resultará
siempre de inferior calidad.
Ya Catón y Columela consignaban que para conseguir buenos aceites es
menester efectuar la recolección no bien las aceitunas comienzan á
ennegrecer, así como aconsejan también elaborar lo más pronto posible
después de recolectadas.
Siempre que se pueda deberá efectuarse á mano esta operación,
empleando para ello escaleras á fin de alcanzar los frutos de las ramas
superiores, prohibiendo en absoluto el uso de las latas, que tanto perjudica
al árbol, ora derribando sus hojas, ora rompiendo los tiernos tallitos
destinados á fructificar al siguiente año, ora lanzando á gran distancia los
frutos.
Además, heridos éstos por los golpes del fornido vareador, se dislaceran,
fermentando con daño evidente de la bondad de los aceites resultantes.
Es de precepto moler inmediatamente después de recolectar, y en caso de
que esto no sea posible, á causa de venir las aceitunas mojadas ó muy
húmedas del campo, se extenderán sobre zarzos de caña ó vasares de
madera agujereados, en capas que no excedan de 0,10 metros de espesor,
removiéndolas con sumo cuidado al objeto de ventilarlas para que se
desequen.
En algunos puntos se valen de termómetros colocados en el interior de
los montones de aceitunas á fin de conocer si hay aumento de temperatura,
que indicaría un principio de descomposición.
La molienda debe ser gradual y lenta, dado que, efectuada con mucha
velocidad, como suele acontecer en los molinos movidos al vapor, el aceite
resulta menos bueno, debido, según nuestra opinión, al aumento de
temperatura que sufren las viandas, habiendo observado, cual diremos
después, que más tarde al filtrarlo, si la temperatura excede de 12°
Reaumur, el sabor del producto así obtenido se resiente, perdiendo mucho
de su natural bondad.
Al propio tiempo es menester también no triturar los huesos en demasía,
si deseamos aceites de primera calidad.
Las presiones se efectuarán en frío, sin escalde, colocando las viandas
dentro de jaulas de hierro y teniendo la precaución de acelerar cuanto sea
posible la faena á fin de impedir la funesta oxidación de la masa.
Para el aceite superfino se usarán de preferencia prensas de palanca y
para el de remolido las hidráulicas.
Todas las máquinas, utensilios y depósitos se lavarán previamente con
solución de lejía de sosa cáustica, al 5 por 100 y después con agua clara.
La mayor pulcritud, la más exquisita limpieza ha de reinar por todas
partes, lo mismo en los pocillos, bombas ó aclaradores, adonde fluye de las
prensas el caldo, que en las vasijas receptoras y de conservación; de lo
contrario, podemos tener la evidencia de que el aceite no tardará en perder
su fragancia y grato sabor, tornándose detestable.
El proceso de elaboración varía según la calidad de los productos que
nos propongamos conseguir, pues es claro que no podrá ser el mismo
tratándose de aceites comestibles que cuando se les destine á usos
industriales.
Comencemos por exponer algunos preceptos relativos á los primeros,
que son, después de todo, los que más nos interesan.
CARACTERES DE LOS ACEITES DE OLIVA
El extraído sólo de la pulpa, con dulce ó ligerísima presión y sin el
concurso del calor, suele denominarse aceite virgen, resultando un líquido
muy fluido, traslúcido, untuoso al tacto, de color variable, desde el amarillo
ambarino al amarillo verdoso; de olor al fruto fresco de la oliva y sabor
dulce y grato, si procede de aceitunas recién cosechadas y sin exceso de
madurez. Acabado de extraer aparece un tanto opalino, pero por el reposo
prolongado se torna brillante (lampante), depositando una sustancia
negruzca, compuesta de aceite, mucílago, restos celulósicos y materia
extractiva con indicios de nitrógeno.
El aceite de olivas es insoluble en el agua; pero el alcohol y el éter[2]
disuelven un 3 por 1.000 de su volumen; sobre el papel deja una mancha
semitrasparente que no desaparece por el calor. Esta propiedad, que
comparte con los demás aceites fijos, le distingue de los llamados volátiles:
se altera con dificultad y se conserva tanto más fácilmente cuanto se guarde
en lugar fresco y esté más depurado y limpio. Sin embargo, por la acción
prolongada del aire se enrancia, tornándose menos fluido y adquiriendo
sabor acre especial y olor desagradable.
El aceite de olivas hierve á 330°[3] bajo 0, cerca de-6° se concreta en una
masa butirosa, ofreciendo cristalización radiada. Según Pelouze, 100 partes
de aceite contienen 28 de estearina y 72 de oleína. Su peso específico á 12°
C. es de 0,9192. Con la elevación de temperatura disminuye notablemente
de densidad. Así Saussure ha hallado que esta disminución es como sigue:
Grados
centígrados. Densidades.
12 0,9192
25 0,9109
50 0,8932
94 0,8625
El alcohómetro centesimal de Gay-Lussac, sumergido en el aceite de
olivas á + 15° centígrados, marca 58°,4. Su composición química, según el
mismo autor y Thenard, es la siguiente:
Carbono 77,21
Hidrógeno 13,36
Oxígeno 9,43
100
Se distingue el de olivas de los demás por su bondad y buen sabor,
reputándose como el primero y el mejor aceite graso conocido,
especialmente para la comida, para el alumbrado, para la fabricación de
jabones, para unto de las lanas en las fábricas de tejidos, así como para otra
multitud de necesidades de la vida, puesto que se conserva más largo
tiempo y está menos sujeto á alteraciones, porque no es secante y por ser
más higiénico y asimilable que todas las grasas conocidas. Nuestros aceites
de Toscana, y en particular los de Lucca, se consideran, y con justa razón,
como los mejores del mundo.
En un interesante informe escrito por D. Rafael de Cesare, acerca de los
aceites comestibles italianos que concurrieron á la última Exposición de
Viena[4], se consigna que Italia es, no sólo el país más rico y abundante en
aceites de oliva, sino el que los produce de mejor calidad.
En Toscana especialmente[5] la producción olivarera alcanza tal grado de
perfeccionamiento, que casi todo el aceite que produce se destina para la
comida, teniendo el de Lucca justa y merecida fama de ser el mejor
conocido.
Consigna el mencionado informe que Italia produce, término medio,
anualmente 1.700.000[6] hectolitros de aceite, representando un valor de
250 millones de liras[7]; pero en muchas provincias del reino siéntese la
necesidad de mejorar y perfeccionar la elaboración; ejemplo la Sicilia, que
produciendo, en un promedio, 190.000 quintales, apenas 10.000 resultan
comestibles[8], y en otros puntos de Italia sólo se elaboran aceites de
industria para el alumbrado y la jabonería.
En Liguria lo preparan de un bellísimo color de paja, que conserva
perfectamente durante dos ó tres años y viaja sin alterarse, soportando todo
linaje de temperaturas. Este aceite se exporta, en su gran mayoría, para
Francia, de donde, después de refinado, nos lo vuelven á vender á precios
nada económicos por cierto.
En cambio, la provincia de Bari realiza portentosos progresos en la
producción olivarera, y sus aceites, todos comestibles, son ya buscados por
el mundo entero, pudiendo presentarse como modelo de provincia
meridional en la fabricación del aceite. Italia ofrece dos tipos bien
caracterizados de aceites buenísimos: primero, tipo de Lucca, y segundo,
tipo de Bari.
Además de estas clases típicas que pueden reputarse como superfinas,
llamados vírgenes ó de primera presión, obtenidos en frío, que ofrecen
siempre el gusto al fruto de que proceden y que se destinan, ora para
condimento, ora para conservar multitud de sustancias alimenticias, tales
como las aceitunas, el bonito, sardinas y pescados de todas clases, etc.,
circulan en el comercio otras especies de inferior calidad. Entre éstas
tenemos el aceite ordinario de segunda extracción, producto del remolido
de las pastas con escalde; el aceite para quemar ó para el alumbrado
público, de tercera calidad; el aceite de infierno, recogido en las
alpechineras; el aceite de remolido[9] y, por último, el que se extrae de los
orujos por medio del sulfuro de carbono (y mejor por la bencina), todos los
que sólo pueden servir para usos industriales, como la fabricación de
jabones y el lubrificado de las máquinas.
CLARIFICACIÓN
La clarificación natural de los aceites de olivas se efectúa dejándolos
reposar durante un cierto período, para dar tiempo á que vayan
depositándose en el fondo de los recipientes las sustancias que tienen en
suspensión y formando los llamados turbio ó borras. Al fluir de las prensas
se recoge en vasijas de barro cocido (terra cotta), vidriadas al interior, que
reciben el nombre de tinajones ó tinetas (conchas), desde donde se trasvasa,
al cabo de cuatro ó seis días, dándole en este tiempo lo menos tres vueltas ó
pasadas, pues se ha observado que cuanto más pronto y mejor se separa el
aceite del depósito que forma, tanto más superior resulta. Entre nosotros
úsanse unas tinajas vidriadas de forma oval, con el vientre algo abultado,
más ó menos profundas ó altas, denominadas orzas (orci) ó copas, de una
capacidad de tres á cuatro hectolitros[10], las cuales estimamos preferibles á
los recipientes de mampostería, revestidos de pizarras, usados en algunos
lagares y en donde el aceite presenta mucha mayor superficie al contacto
del aire, lo que es contrario á su buena conservación.
Para efectuar el trasiego, podemos servirnos de bombas análogas á las
usadas en las bodegas de vinos.
Ciertos aceites resisten la clarificación por reposo á causa de su grasitud
y espesor, reteniendo largo tiempo los cuerpos en suspensión. Entonces es
menester filtrarlos, á fin de acelerar su depuración y clarificación.
El filtro más común empleado en Francia, y del que podían servirse
nuestros cosecheros, consiste en una caja ó tina con doble fondo muy
grueso atravesado de agujeros cónicos[11], los cuales constituyen otros
tantos embudos que se rellenan de algodón cardado, procurando quede un
tanto fofo y uniforme, para lo que se requiere poseer cierta práctica.
El aceite pasa límpido á través de los agujeros durante el primer día,
pero á veces el filtro se entrapa y obstruye pronto, cesando de funcionar.
Obviase tal accidente recubriendo el doble fondo de una capa de paja, á la
que puede añadirse otra de carbón animal, bien lavado, cuerpo que, según
nuestras experiencias personales, conviene emplearlo granulado y libre del
polvo, que se apelmazaría, haciendo difícil la filtración.
Operando así, el carbón quita al aceite una parte de sus impurezas al
propio tiempo que lo decolora algo, y en su virtud, cuando llega á los
algodones, filtra admirablemente á través de ellos, obteniéndose en
definitiva un líquido límpido y brillante.
La filtración es siempre mejor agitando antes el aceite, más ó menos
turbio, con 20 por 100 de agua clara, con lo cual se logra separarle una parte
del mucílago[12].
En Bari, el aparato empleado para la filtración[13] está reducido á una
caja de madera, de un metro de longitud, 0,50 de ancho y 63 centímetros de
profundidad, forrada de hoja de lata, tanto interior como exteriormente, y
sostenida por cuatro pies. Bajo el fondo de esta caja penden de 6 á 8 vasos
de la misma sustancia con agujeros, en los cuales se coloca una capa de
algodón cardado de unos tres dedos de espesor, disponiendo encima, por la
parte interna y en la boca de cada vaso, un disco de hoja de lata con
agujeros y forrado de franela.
Así dispuesto el aparato, se llena la caja de aceite, el cual filtra primero
por el forro del vaso, atravesando luego el algodón y saliendo límpido y
claro ó, como vulgarmente se dice, lampante. Un recipiente de hoja de lata
colocado debajo sirve para recogerlo, desde donde se conduce á las vasijas
definitivas. En el caso de que el aceite tarde mucho en filtrar, se cambia el
filtro poniendo otros algodones, y si atraviesa demasiado pronto, se coloca
un filtro doble.
Los Sres. Gronvelle y Jaunez han sustituído el algodón con una capa de
musgo seco de 5 á 6 centímetros de espesor, sobre el que colocan otra de 2
centímetros de paja de centeno machacada.
Un periódico de química médica de Francia recomienda preparar un
filtro con arena silícea fina, carbón vegetal y yeso, asegurando que la arena
retiene las sustancias borrosas en suspensión, el carbón decolora
ligeramente y el yeso absorbe el agua que contiene el aceite.
El Sr. Denis, de Montfort, ha ideado un aparato que consiste en una caja
de madera carbonizada interiormente, donde se dispone el filtro compuesto
de capas alternas de carbón animal ó vegetal y arena. Si se emplea el carbón
vegetal se escogerá bien cocido, limpio, granulado, lavándolo antes para
quitarle la ceniza y el polvo, y dando á la capa un dedo de espesor; en
cuanto al carbón animal, la experiencia ha demostrado que obra más
eficazmente que el vegetal. Respecto á la arena ha de ser silícea, nunca
caliza, y usarla tanto de la gruesa como de la fina.
Hé aquí la manera de disponer esta especie de filtro: Divídese la caja en
dos compartimentos por medio de un diafragma ó falso fondo agujereado,
sobre el cual se coloca una primera capa de arena gruesa, sobre ésta otra de
carbón, de manera que entre ambas alcancen un espesor de 0,60 milímetros
por lo menos, terminando con otra capa de arena fina de dos dedos de altura
y, por último, otra de arena gruesa. Dispuesto así el aparato, se vierte el
aceite[14] y atravesando las materias filtrantes cae depurado al
compartimento inferior, de donde se extrae mediante llaves de sangría
colocadas á diferentes alturas[15].
Para lavar este filtro, cuando se ensucia ó se niega á funcionar, se le
desmonta y se echa sobre las capas filtrantes agua caliente hasta que pase
clara.
El Sr. Cossus ha ideado un aparato especial para depurar el aceite,
sirviéndose al efecto de una mezcla de tres cuartas partes de esquisto
carbonizado y una de turba.
El Sr. Wright se vale de un filtro en el que emplea tierra arcillosa, seca y
pulverizada, que somete previamente á 200°. Por nuestra parte, usamos el
caolín, de que ya nos veníamos sirviendo para decolorar y depurar el
alcohol del comercio, cuerpo aquél que también se usa para la clarificación
de los vinos. Hé aquí cómo procedemos: comenzamos por calentar el aceite
á una temperatura de 40 grados centígrados próximamente[16]; entonces le
añadimos un 5 á un 7 por 100 de caolín lavado y pulverizado, agitando la
mezcla durante una hora, al cabo de cuyo tiempo se deja todo en reposo,
procediendo después á filtrar el aceite á través de capas de algodón cardado
ó en filtros de papel, siempre con éxito satisfactorio.
Para la filtración de pequeñas cantidades de aceite se recomienda el uso
de recipientes de hoja de lata de forma cilíndrica, terminados inferiormente
en embudo y cerrados por la parte superior con una tapadera. Su capacidad
es de 10 á 12 litros, con dos espesas telas metálicas en el punto donde
comienza el embudo. Sobre estas telas se coloca una capa de algodón
cardado bien extendido.
Dispuestos así los aparatos, se fijan á lo largo de las paredes del local,
vertiendo dentro de ellos el aceite que se desea filtrar. Convendrá mantener
la estancia á una temperatura de 12° Reaumur, pues se ha observado que si
es más elevada se resiente más tarde la bondad del aceite, á causa de las
multiplicadas partes de contacto con una atmósfera caliente en demasía.
No estará demás advertir que el algodón comunica á veces un gusto
impropio, por cuyo motivo aconsejamos sumergirlo previamente y durante
veinticuatro horas en agua que contenga 1 por 100 de carbonato sódico,
lavarlo después y secarlo antes de servirse de él.
Operando en pequeña escala, deben preferirse los filtros de papel sin
cola, dispuestos en grandes embudos de hoja de lata con su correspondiente
tapadera, habiendo observado que, no tan sólo resulta el aceite limpísimo,
sino que no adquiere el más ligero mal gusto.
Al propio tiempo que el reposo y la filtración para la depuración de los
aceites de olivas, existen varios procedimientos químicos, de los que
pensamos ocuparnos; pero antes, bueno será consignar que un lavado con
agua sola es también un medio de depuración.
Sabido es que el agua no ejerce ninguna acción sobre los aceites de
oliva; pero no acontece lo propio con respecto al mucílago, principios
extractivos y colorantes que contiene y que puede separar en cierta
cantidad.
Y con efecto, si agitamos el aceite con agua, la mezcla se torna lechosa á
causa de la interposición de las moléculas de ambos cuerpos. Si se deja
después en reposo, no tarda en separarse el aceite que sobrenada del agua
que queda en la parte inferior, más ó menos turbia, debido á cierta porción
de mucílago, albúmina, etc., que arrastró ó disolvió, resultando en su virtud
el aceite más limpio y depurado. Medio es éste ventajoso por lo fácil y
sencillo[17].
En lugar de servirnos del agua sola, será preferible usar una solución de
tanino del comercio que contenga ½ por 100 de este cuerpo, con cuyo
procedimiento se logra separar mucho mejor y despojar los aceites de la
parte de mucílago y albúmina que los impurifican, perjudicando su bondad
y siendo un óbice para su buena conservación.
DEPURACIÓN DE LOS ACEITES

POR PROCEDIMIENTOS QUÍMICOS

Pueden dividirse en dos grupos:


1.º Depuración por medio de los ácidos; y
2.º Depuración por medio de los álcalis.
El primero ofrece la dificultad de la completa eliminación del ácido
empleado; pero el aceite resulta bastante bueno y si es ordinario arde con
luz hermosa y brillante, sin producir humo ni dejar residuos carbonosos á la
extremidad de la mecha.
En cuanto al segundo, es verdad que á veces exige mayores gastos, y si
se destina para la comida suele adquirir cierto sabor desagradable; pero
tratándose de aceites comunes, el proceso de los álcalis me parece digno de
ser recomendado[18].
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like