chap01 - QBASIC Chapter 1 QBASIC Chapter 1 Computers and...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: QBASIC Chapter 1 QBASIC Chapter 1 Computers and Problem Solving: Computers An Introduction An Created by Richard D. Taylor Illustrated by Saundra J. Taylor What is a computer? What is a computer? ­ A machine that can accept data, process the machine data at high speeds, and give the results of these processes in an acceptable form these Advantage of a Computer Advantage of a Computer ­ Speed ­ Accuracy ­ Store and recall vast amounts of data Disadvantage of a Computer Disadvantage of a Computer ­ Obsolescence - technologically obsolete in Obsolescence a matter of a few years matter ­ Training Training ­ Maintenance costs Computer Hardware Computer Hardware ­ Physical equipment of a computer system ­Input Devices ­Processor ­Output Devices ­Storage Devices Parts of a Computer System Parts of a Computer System ­ Input - device that allows programs (set of instructions for the computer), and data (raw facts) to enter the computer (raw ­Keyboard ­Mouse Parts of a Computer System Parts of a Computer System ­ Output - the computer can communicate the results of a program to an output unit the ­Monitor ­Printer ­Disk unit ­Stereo Speakers Parts of a Computer System Parts of a Computer System ­ Main Storage Unit - store large amounts of data and make any single item rapidly available for processing available ­Address - main storage is divided into locations called addresses locations Parts of a Computer System Parts of a Computer System ­ Auxiliary Storage Unit - function is to store data and programs that are to be used over and over again and ­Magnetic Tape Drives ­Hard Disk Drives ­Diskette Drive ­Compact Laser disk Parts of a Computer System Parts of a Computer System ­ Central Processing Unit - controls and supervises the entire computer system and performs the actual arithmetic and logic operations on data as specified by the written program. program. ­Arithmetic-logic Section - performs operations as addition, subtraction, multiplication, and division division ­Control Section - directs and coordinates the entire computer system according to the program entire The PC Family The PC Family ­ 1981- IBM introduced the first IBM Personal 1981- Computer Computer ­ More than 100 different manufacturers of More IBM PCs and compatibles IBM ­ Open architecture has permitted many Open vendors to manufacture devices that enhance the performance of the PC the The PC Family The PC Family ­ Keyboard - an input device used to enter Keyboard programs and data into the main storage unit unit ­ IBM 101-key Keyboard was enhanced IBM keyboard that included functions keys, indicator lights, typewriter keys, cursor control keys, and numeric keypad control The PC Family The PC Family ­ Monitor ­Business Applications use 15, 17, or 19 inch ­Scientific and Engineering use 19, 21, or 25 Scientific inch inch VGA 640 X 480 pixels ­ Super VGA 800 X 600 pixels ­ XGA 1,024 X 768 pixels ­ The PC Family The PC Family ­ CPU and Main Storage Unit ­Microprocessor - a miniaturize processor on a Microprocessor silicon chip silicon ­Motherboard - contains the CPU and main Motherboard memory units memory The PC Family The PC Family ­ CPU and Main Storage Unit ­RAM - (main memory) random access memory ­KB - kilobyte represent 1,024 bytes or KB characters characters ­MB - megabyte represents 1,048,576 bytes or MB characters characters ­GB - gigabyte represent 1,073,741,824 bytes or GB characters characters The PC Family The PC Family ­ CPU and Main Storage Unit ­ROM - read-only memory - used to store disc ROM loader, patterns for graphics characters, and essential instructions and data essential ­MHz - Megahertz million cycles per second MHz used as the measurement of CPU’s performance used The PC Family The PC Family ­ Auxiliary Storage ­Floppy disk - a thin, circular medium coated Floppy with a magnetic substance and comes in a permanent, protective plastic shell permanent, ­Hard Disk - contains anywhere from 4 GB to Hard 20 GB + (billions of bytes) of storage (NOTE: 4 GB hard drive can store up to 2,200,200 double-spaced typewritten pages) double-spaced The PC Family The PC Family Floppy disk Density (In inches) Capacity in Bytes Number of DoubleSpaced Typed Pages 3.5 Double 720 KB 250 3.5 High 1.44 MB 500 3.5 Very high 2.88 MB 1,000 The PC Family The PC Family ­ Network System ­Network - allows printers, hard drives, other Network peripheral devices, software packages and databases to be used by many interconnected personal computers personal ­Network - allows students to access their Network programs and data files from the instructor’s disk drives and use the printer disk The Stored Program Concept The Stored Program Concept ­ Program - a series of precise instructions ­ Stored Program - when precise instructions Stored are placed into the main memory unit of a computer computer Computer Software Computer Software ­ …a set of programming languages and set programs concerned with the operation of a computer system computer ­Essential computer software comes with the Essential purchase of a computer system purchase ­Additional software is either purchased or Additional written by the user in a programming language the computer understands the Computer Software Computer Software ­ Low-Level Languages - machine language Low-Level and assembly languages and ­ High-Level Languages - QBASIC, Visual High-Level Basic, C, C++, Java, Pascal, COBOL, and FORTRAN FORTRAN The Internet The Internet ­ …a global collection of networks each of global which is a collection of interconnected networks of computers networks ­World Wide Web (WWW) - collection of World computers on the Internet computers ­Collection of text, graphics, sound, music, Collection video clips and animation video The Internet The Internet ­ Uniform Resource Locator (URL) - each Uniform Web page has a unique address Web ­ Access the Internet ­Telephone line with modem in the computer ­Internet Connection Service Provider The Operating System The Operating System ­ …a computer program that helps to act as computer an internal traffic cop in the PC by directing the flow of data into and out of the computer and the peripheral devices computer ­ PC-DOS - first operating system for the PC-DOS IBM PC IBM ­ MS-DOS - for the PC compatibles The Operating System The Operating System ­ MS-DOS and PC-DOS are essentially the MS-DOS same same ­ MS-DOS is a single-user, single task user ­ Multitask - the computer can run multiple Multitask programs concurrently, but not simultaneously simultaneously ­ MS-DOS - Microsoft Disk Operating System The Graphical User Interface The Graphical User Interface ­ (GUI) the program interface between the (GUI) user and the PC user ­increase the productivity of the user ­user does not memorize or type commands in a user PC PC The Graphical User Interface The Graphical User Interface ­GUI uses windows, icons, and a mouse to GUI accept commands accept ­Desktop - where a user can view icons Desktop representing documents, programs, and files representing ­Mouse - a hand-held point device The Compiler and the Interpreter The Compiler and the Interpreter ­Computers cannot directly execute programs Computers written in high-level language written ­Compiler - a program when executed by the PC will cause the entire QuickBasic program to be translated into machine language before the actual execution of the program begins actual ­The compiler examines the entire program for The any errors any The Compiler and the Interpreter The Compiler and the Interpreter ­Interpreter - a program when executed by a computer will analyze each Qbasic statement, translate it into equivalent machine language if the syntax is correct, and execute the machine language instructions to produce results, or answers, without the production of an intermediate machine language program intermediate Problem Solving and Program Problem Solving and Program Development ­ Step 1 - Problem Step Analysis Analysis ­ Precisely defines the Precisely problem to be solved problem ­form of the input ­form of the output ­description of the description transformation of input or output or Problem Solving and Program Problem Solving and Program Development ­ Step 2 - Design the Step Program Program Devise an algorithm, a Devise method of solution, for the computer to use ­ Develop a detailed Develop logic plan or logic diagram (Flowcharts or pseudocode) or ­ Develop good test data ­ Problem Solving and Program Problem Solving and Program Development ­ Step 3 - Test the Step Design Design Step by step, go Step through the logic diagram, using the test data as if you were the PC ­ If the logic diagram If does not work, repeat steps 1 through 3 steps ­ Problem Solving and Program Problem Solving and Program Development ­ Step 4 - Code the Step Program Program ­ Code the program in a Code computer language, according to the logic, specified in the logic diagram - include program documentation documentation Problem Solving and Program Problem Solving and Program Development ­ Step 5 - Review the Step Code Code Carefully review the Carefully code ­ Put yourself in the Put position of the PC and step through the entire program program ­ Problem Solving and Program Problem Solving and Program Development ­ Step 6 - Enter the Step Program Program ­ Input the program into Input the PC via a keyboard or other input device or Problem Solving and Program Problem Solving and Program Development ­ Step 7 - Test the Step Program Program ­ Test the program until Test it is error free and until it contains enough safeguards to ensure the desired result result Problem Solving and Program Problem Solving and Program Development ­ Step 8 - Formalize the Step Solution Solution Run the program using Run the input data to generate the results ­ Review and modify Review the documentation for the program if necessary necessary ­ Problem Solving and Program Problem Solving and Program Development ­ Step 9 - Maintain the Step Program Program Correct errors or add Correct enhancements to the program this step is usually initiated by users that have been running the program ­ After errors or enhancements After are identified, the program development life cycle begins again at step 1 again ­ Problem Solving and Program Problem Solving and Program Development ­ Flowcharts - a popular logic tool used for Flowcharts showing an algorithm in graphic form showing ­Programmer prepares a flowchart before he or Programmer she begins coding in Qbasic - eight basic symbols are used in program flowcharting symbols Problem Solving and Program Problem Solving and Program Development ­Flow directions Start at the top (or upper left-hand corner) of a Start page page ­ Flow should be top to bottom and left to right ­ If the flow takes any other course, arrowheads If must be used must ­ Problem Solving and Program Problem Solving and Program Development ­ Pseudocode - an alternative to program Pseudocode flowcharts that uses natural English and resembles Qbasic code resembles Summary Slide Summary Slide ­ What is a computer? ­ Advantage of a Computer ­ Disadvantage of a Computer ­ Computer Hardware ­ Parts of a Computer System ­ The PC Family ­ The Stored Program Concept Summary Slide (cont.) Summary Slide (cont.) ­ Computer Software ­ The Internet ­ The Operating System ­ The Graphical User Interface ­ The Compiler and the Interpreter ­ Problem Solving and Program Problem Development Development ...
View Full Document

Ask a homework question - tutors are online