Structured Programming Using Turbo BASIC explains programming methods using this language through mathematical or business examples and problems. The book approaches problem-solving using a top-down, structured programming method. This method consists of 1) breaking a problem into smaller, more manageable tasks, and 2) using the action block, the decision block, and the loop block-the three fundamental programming structures-to perform each task. The text describes the Turbo Basic environment on an IBM PC or compatible, the fundamental programming structures and concepts, the two data structures (arrays, files), graphics creation, as well as computer simulations. The book explains in detail variables, screen formatting, the decision block, the loop block, functions. The text also discusses parameter lists, and libraries The student learns to use the OPEN statement to associate a buffer with a file, or the CLOSE statement to end the file/buffer. The text explains the use of the Turbo BASIC random generator that produces unique sequences of random numbers. The book can be used in introductory lecture courses in business, computer science, or mathematics. It can be beneficial for students in an open-entry/open-exit computer laboratory courses or for self-study.



Inhalt

Preface
Acknowledgments

Introduction

The Development of the Discipline of Structured Programming

The Development of Turbo BASIC

Structured Programming in Turbo BASIC

How to Use This Book

Program Diskette for the Book

Chapter 1 Programming Environment

Objectives

Making a Work Disk

Booting up Turbo BASIC

Using Your Computer

1-1 Exploratory Activities

Making a Working Diskette

Booting up Turbo BASIC

Loading a Program

Saving a Program

Editing

Getting Help

Exiting Turbo BASIC

Printing

Erasing a Program on Diskette

1-2 Concepts and Methods

Summary of Commands

Chapter 2 Graphics and the Action Block

Objectives

Points on the Screen

The WINDOW and SCREEN Statements

Using the PSET, LINE, and CIRCLE Statements

The Action Block

Studying Example Programs

2-1 Exploratory Activities

2-2 Concepts and Methods

The Graphics Region

Using the PSET, LINE and CIRCLE Statements

The Action Block

The INPUT and PRINT Statements

Summary of Statements

2-3 Example Programs

Example 1 - Drawing a Wagon

Example 2 - Placing a Box

2-4 Exercises

Review Questions

Problems

Chapter 3 Top-Down Programming

Objectives

Top-Down Programming

Developing the Main Routine from the Program Skeleton

The Action Block

Subroutines

3-1 Exploratory Activities

3-2 Concepts and Methods

Top-Down Programming

Developing the Main Routine from the Program Skeleton

Subroutines and the Action Block

The Importance of Structure and Style

Summary of Statements

3-3 Example Programs

Example 1 - Stick Figure

Example 2 - Sailboat

3-4 Exercises

Review Questions

Problems

Chapter 4 Variables, Screen Formatting, and Arithmetic

Objectives

Using Variables in a Program

Getting Information Into Your Program

Getting Information Out of Your Program

Arithmetic Operations in Turbo BASIC

Using Parentheses in Turbo BASIC

Understanding E Notation

Studying Example Programs

4-1 Exploratory Activities

4-2 Concepts and Methods

Using Variables

Numeric Data Types

The PRINT Statement

Subroutines and Shared Variables

Arithmetic in Turbo BASIC

Parentheses

E Notation

The PRINT USING Statement (Optional)

Summary of Statements

4-3 Example Programs

Example 1 - Pricing

Example 2 - Temperature Conversion

4-4 Exercises

Review Questions

Problems

Chapter 5 The Decision Block

Objectives

Learning the IF/END IF Decision Block

Learning the Extended IF/END IF Decision Block

Learning the SELECT CASE Decision Block

Studying Example Programs

5-1 Exploratory Activities

5-2 Concepts and Methods

The Standard Decision Block

The SELECT CASE Decision Structure

The Comparison Operators

Compound Comparisons with Logical Operators

Summary of Statements

5-3 Example Programs

Example 1 - Vacation Car Rental

Example 2 - The Quadratic Formula

5-4 Exercises

Review Questions

Problems

Chapter 6 The Loop Block

Objectives

Repeating an Action Block

Counting Loops

The FOR NEXT Loop

The Standard Loop Block

Studying Example Programs

6-1 Exploratory Activities

6-2 Concepts and Methods

The Counting Loop

The FOR/NEXT Loop

The Standard Loop Block

Other DO/LOOP Constructs

Summary of Statements

6-3 Example Programs

Example 1 - Finding the Average of a Set of Numbers

Example 2 - Doubling Your Investment

Example 3 - Sales Commission

Example 4 - Graphing

6-4 Exercises

Review Questions

Problems

Chapter 7 Functions

Objectives

Built-In Functions Used with Strings

Built-In Numeric Functions

The RND Function

Defining Your Own Functions

Studying Example Programs

7-1 Exploratory Activities

7-2 Concepts and Methods

Built-In Functions

Numbers as Strings

The ASCII Character Set

Substrings of Strings

The RND Function

Defining Your Own Functions

Summary of Statements

7-3 Example Programs

Example 1 - Word Count

Example 2 - Retail Pricing

Example 3 - Volume Retail Pricing

Example 4 - Graphing Mathematical Functions

Example 5 - Graphing Piecewise-Defined Functions

7-4 Exercises

Review Questions

Problems

Chapter 8 Parameter Lists and Libraries

Objectives

Subroutines and Parameter Lists

Global and Local Variables

Using Subroutine Libraries

The Building Blocks of Structured Programming

8-1 Exploratory Activities

8-2 Concepts and Methods

Subroutines with Parameter Lists

Global and Local Variables

Developing Subroutine Libraries

The Building Blocks of Structured Programming

Summary of Statements

8-3 Example Programs

Example 1 - Lastname, First Initial

Example 2 - Inventory Reports

Example 3 - Regression Line Fit

8-4 Exercises

Review Questions

Problems

Chapter 9 Arrays

Objectives

Array Notation

Saving Space for Arrays

Using FOR/NEXT Loops with Arrays

Array Operations

Arrays in Parameter Lists

Studying Example Programs

9-1 Exploratory Activities

9-2 Concepts and Methods

Array Notation

Saving Space for Arrays

Using FOR/NEXT Loops with Arrays

Arrays in Parameter Lists

Summary of Statements

9-3 Example Programs

Example 1 - Sales Totals with String Arrays

Example 2 - Instructor's Grade Record

Example 3 - Systems of Linear Equations

Example 4 - Market Share

Example 5 - Inventory Database

9-4 Exercises…

Titel
Structured Programming Using Turbo BASIC
EAN
9781483261041
Format
E-Book (pdf)
Veröffentlichung
10.05.2014
Digitaler Kopierschutz
Wasserzeichen
Dateigrösse
14.39 MB
Anzahl Seiten
356