ELEMENTS OF COMPUTER SYSTEM HARDWARE – PHYSICAL COMPONENT OF THE COMPUTER SYSTEM – TANGIBLE PARTS SOFTWARE – PROGRAMS THAT DIRECT THE OPERATION OF THE COMPUTER PEOPLEWARE – THE USERS OF THE COMPUTER
HARDWAREINPUT HARWARE PROCESS DEVICES HARDWARE KEYBOARD DEVICE SCANNERS CPU POINT & DRAW MOTHERBOARD DEVICES(MOUSE, VIDEO CARD JOYSTICK,TRACK SOUND CARD BALL, ETC) EXPANSION SLOT
HARDWAREOUTPUT STORAGE HARDWARE HARDWARE DEVICE DEVICE MONITOR MAGNETIC TAPE PRINTER HARDDISK PLOTTER FLOPPY DISK ON-SCREEN COMPACT DISK PROJECTOR DVD
HARDWARETELECOMMUNICATI OTHER HARDWARE ON HARDWARE UNINTERRUPTIBL LAN CARDS E POWER SUPPLY(UPS) TRANSMISSION A STANDBY CABLES(COAXIAL BATTERY CABLE,FIBER POWERED OPTIC,SATTELLIT SOURCE USE IN ES) CASE OF POWER INTERRUPTIONS
Computer Software GENERAL-PURPOSE SOFTWARE – PROVIDES THE FRAMEWORK FOR A GREAT NUMBER OF BUSINESS,SCIENTIFIC, AND PERSONAL APPLICATIONS APPLICATIONS SOFTWARE – DESIGNED AND WRITTEN TO PERFORM SPECIFIC BUSINESS,SCIENTIFIC PROCESSING TASKS SUCH AS INVENTORY OR TAX PREPARATION
Computer Software SYSTEM SOFTWARE – INDEPENDENT OF ANY GENERAL- PURPOSE SOFTWARE PACKAGE OR ANY SPECIFIC APPLICATION AREA – CONTROLS OR IN SOME WAY SUPPORTS SOFTWARE IN THE OTHER TWO CATEGORIES
EXAMPLES OF GENERAL- PURPOSE SOFTWARE WORD PROCESSING SOFTWARE – MS WORD,AMI-PRO,WORDSTAR, ETC. ELECTRONIC SPREADSHEETS – MS EXCEL,LOTUS 123,QUATTRO, ETC. DESKTOP PUBLISHING – PAGEMAKER,VENTURA ETC.
EXAMPLES OF GENERAL PURPOSE SOFTWARE GRAPHICS /PRESENTATION SOFTWARE – PHOTOSHOP,PAINT, COREL DRAW,MS POWERPOINT, PRINTSHOP,BANNER MANIA, DATABASE SOFTWARE – DBASE,FOXBASE,FOXPRO,CLIPPER ETC.
EXAMPLES OF APPLICATION SOFTWARE THESE ARE PROGRAMS OR SYSTEMS DEVELOPED THRU DIFFERENT PROGRAMMING LANGUAGES INVENTORY SYSTEM, POINT-OF-SALE SYSTEM, ENROLLMENT SYSTEM, BILLING SYTEM, PAYROLL SYSTEM, SCHEDULING OR APPOINTMENT SYSTEM ETC.
TYPES OF SYSTEM SOFTWARE OPERATING SYSTEM – DISK OPERATING SYSTEM(DOS) , WINDOWS OS & XENIX FOR MICRO COMPUTERS – UNIX FOR MINICOMPUTER & MAINFRAME COMPUTERS – IBM’S MVS & VM – DEC’S VMS – AT&T’S UNIX
TYPES OF SYSTEM SOFTWARE PROGRAMMING LANGUAGES – COMPILERS & INTERPRETERS – 1ST GEN. OF PROGRAMMING LANGUAGES(MACHINE LANGUAGE) – 2ND GEN. OF PROGRAMMING LANGUAGES(ASSEMBLY LANGUAGE) – 3RD GEN. OF PROGRAMMING LANGUAGES(PROCEDURE ORIENTED) COBOL,BASIC,PASCAL,C, ETC
PROGRAMMING LANGUAGES 4TH GEN. OF PROGRAMMING LANGUAGES(OBJECT-ORIENTED) – VISUAL BASIC,VISUAL FOXPRO,VISUAL C++, ETC. 5TH GEN. OF PROGRAMMING LANGUAGES – ARTIFICIAL INTELLIGENCE – NATURAL LANGUAGES
OTHER TYPES OF SYSTEM SOFTWARE DATABASE MANAGEMENT SYSTEM SOFTWARE(DBMS) – SQL,INFORMIX,ORACLE, ETC. UTILITY PROGRAMS – NORTON DISK DOCTOR(NDD),PC TOOLS PERFORMANCE MONITORING SOFTWARE COMMUNICATIONS SOFTWARE
OTHER SOFTWARE GAMES VIRUS – BOOT-SECTOR,TROJAN HORSE,MACRO ANTI-VIRUS PROGRAMS(VACCINES) BROWSERS – NAVIGATOR, INTERNET EXPLORER
PEOPLE WARE ORGANIZATION MANAGEMENT – MIS HEAD,EDP HEAD, MIS PLANNER,CHIEF INFORMATION OFFICER(CIO) – PLAN,ORGANIZE,CONTROL,STAFF,DI RECT,BUDGET ETC.
PEOPLEWARE ANALYSIS & DESIGN – SYSTEM ANALYSTS PROGRAMMING – PROGRAMMER(SYSTEM OR APPLICATION) – TRAINEE/JR./SR. PROGRAMMER NETWORK ADMINISTRATION – NETWORK ADMINISTRATOR – DATA BASE ADMINISTRATOR
PEOPLE WARE OPERATIONS – COMPUTER OPERATOR – COMPUTER LIBRARIAN – COMPUTER ENCODER ETC. TECHNICAL SUPPORT – COMPUTER TECHNICIAN EDUCATION & TRAINING – TRAINORS
Definition of Programming Programming Computer process data under the control of set of instructions. Programmer Computer program guide the computer through orderly sets of actions by people.
Programming Cycle The computer is basically aproblem-solving tool. Once it isproperly provided with a validprogram, the computer becomes self-operational, that is, it requires nohuman intervention during processing. To use this tool effectively, theprogrammer usually have to performthe following set of well define steps.
Programming Cycle Defining the Problem One of making sure what was has to be done or what problem has to be solved. A careful analysis of that need should involved both prospective users of the information and one or more trained systems designers or programmers, who can perceive the full nature of the information need and how the computer can be used to respond to it.
Planning the Solution This is the next step, after the problem has been defined, select the best method for solving the problem. This commonly involves determining the sequence of processing steps within individual programs.
To save on time and effort, theprogrammer refers to a pictorialrepresentation, the program flow chart.The flow chart is an all-purpose tool and aprogram blueprint. The programmerconstructs the flow chart to lay out theprogram logic.
Coding the Solution Once the programmer is satisfied that all processing steps have been identified and all alternatives and exceptions provided for, the program is then made. The program flow chart serves as a guide in coding. Checking out the Program Experience will prove that a program seldom executes successfully the first time. Even the simplest programs contain errors, and even experienced programmers make mistakes.
Documentation After a program has been fully tested and implemented, the programmer must write up the full specifications for all users. The technical documentation package should include: 1. Complete statement of the problem. 2. Description of the program logic and copies of the flow charts. 3.Final source listing
4. List and description or error tests along with the disposition of these error. 5. Operating instructions, including program and data structures, and test data used. 6. Input and output specifications. 7. Schedules to be maintained. If all the pertinent data is contained withinthe documentation package, then the programcan be run and modified without requiring theoriginal programmer’s assistance.
The Programming Cycle Write up the full DOCUMEN specifications for other TATION program usersDefining what DEFININGhas to be done or THEwhat problem PROBLEMhas to be solved Perform CHECKING debugging OUT THE and testing the PLANNING PROGRAM THE program, SOLUTION using representative CODING s input dataSelect the best method for THEsolving the problem SOLUTION Prepare the set of instructions for the computer to execute
Program Design Tools: Flowchart A flowchart is a pictorial representation of a step-by-step solution to a part of a problem.
Flowchart Basics A flowchart consists of arrows to represent direction the program takes and boxes and symbols to represent actions.
Pseudocode Pseudocode is an English-like nonstandard language. It allows programmers to focus on the program logic without being concerned about the particulars of a formal programming language.
Algorithms An algorithm is a logical sequence of steps leading to the solution of ONE TASK in a bigger problem – Define expected OUTPUT – Describe desired INPUT – Determine PROCESSING needed to produce desired output from expected input
Sample ProblemWhat tasks need to be done? Add Number 1 and Number 2 – Inputs/Outputs? – Process? Subtract Number 2 from Number 1 – Inputs/Outputs? – Process?
Use Modularity for Design Break the problem into separate tasks For EACH task – What are the inputs (if any)? – What are the outputs (if any)? – What process must be done? Construct pseudocode or flowchart
Types of Flowcharts 1. Program Flowchart It describes graphically in detail the logicaloperations and steps within a program and thesequence in which these steps are to be executed forthe transformation of data to produce the neededoutput.
2. System Flowchart It is a graphically representation of theprocedures involved in converting data on input mediato data in output form. It illustrates which data is usedor produced at various points in a sequence ofoperation. It portray the interaction among data,hardware, and personnel.
Flowcharting Symbols Input/Output Parallelogram• It represents an instruction to an input or an outputdevice. Process Rectangle• This symbol is used to represent a group of programinstructions that perform a processing function of theprogram such as to perform arithmetic operations, or tocompare, sort, etc.
Flowcharting Symbols Decision Diamond• It denotes a point in the program where more thanone path can be taken. It is used to documentpoints in the program where, based upon variableconditions, a branch to alternative path is possible.The particular path that is chosen depends on theanswer to a question or the result of a test which isinserted in the symbols.
Flowcharting Symbols Preparation Hexagon• This symbols used to represent an instruction orgroup in instructions that will alter, or modify aprogram’s course of execution. It is commonlyused to specify operations such as control, indexregister, initialization, switch setting, and inindicating loops.
Flowcharting Symbols Start/Stop Oval• It is used to designated the beginning and the endof a program, or a point of interruptions. Connector Small Circle• This is a nonprocessing symbols which is used toconnect one part of a flowchart to another withoutdrawing flow lines. It denotes an entry or an exit fromanother part of the flowchart and also used to changethe reading sequence of a flowchart on the same page.
Flowcharting Symbols Arrowheads• Used to show the direction of processing or dataflow. These are added to flow lines of a flowchartappears confusing in its layout.
Flowcharting Symbols Horizontal/ Vertical Lines• It is used to show reading order or sequence inwhich flowchart symbols are to be read.
Advantage and Disadvantage of Flowcharts Advantage of Flowcharts 1. Since flowcharts are language-independent, they can be learned and applied without formal knowledge of a programming language. 2. It enforces users to give attention to significant matters over the less significant ones.
3. Being graphically portrayed, flowchartsprovide an alternative to the usual narrativedescription of a system or a program. 4. Flowcharts are easier to understand than aprogram written in a particular programminglanguage.
Disadvantage of Flowcharts 1. Flowcharts do not represent a programming and are more of a person-to person than a person-to- computer means of communication. A computer cannot accept a program describe in flowcharting. 2. Since thinking in graphic term is not normal, flowchart cannot be viewed as a natural means of
3. Certain details often require long sequence ofinterconnected symbols which could easily bedescribed in just a few lines of explanation. 4. It does not convey why a given set ofoperations is made. Flowcharts only portray how. 5. Flowcharts do not highlight the importantdetails since each step receives as much attention in aflowchart as any other.
Two flowcharts neededTask 1 Task 2 Start Start Get Get Number 1 Number 1 Inputs Get Get Number 2 Number 2 Result = Result = Number 1 + Number 2 Process Number 1 - Number 2 Display Result Outputs Display Result End End
Example 1 - Algorithms Algorithms for changing a flat tire1. Jack up the car2. Unscrew the lugs3. Remove the wheel4. Put on the Spare5. Screw the lugs6. Jack the car down
Example 1 - Flowchart Flowchart for changing a flat tire. Start A Put on the spare Jack up the Car Screw on the lugs Unscrew the lugs Remove the wheel Jack the Car down A End
Example 2 Given the three numbers A, B, C. Draw a flowcharts to compute and print out the sum, the average, and the product of these values.
Example 2 - Algorithms1. Read in the values of A, B, C.2. Determine the sum of the three values read.3. Compute the average by dividing the sum by 3.4. Multiply the first value by the second value then by the third value to determine the product of the three values.5. Print out the computed values (sum, average, and the product).
Example 2 - Flowchart A Start Ave = Sum/3 Read A, B, C Prod = A*B*CSum = A+B+C Print Sum Ave, Prod A End
Example 3 The ABC Manufacturing Company plans to give a year-end bonus to each of its employees. Make an algorithms which will compute the bonus of an employee. Consider the following criteria: If the employee’s monthly salary is less than 1,000.00 pesos, the bonus is 50% of the salary; for the employees with salaries greater than 1,000.00 pesos, the bonus is 1,000.00. Print out the name and corresponding bonus of the employee.
Example 3 - Algorithms1. Read in the employee’s name and salary2. Test if the employee’s salary is less than 1,000.003. If the salary is less than 1,000.00 pesos, the bonus is 50% of the employee’s salary. However, if the salary is more than 1,000.00 pesos, the bonus is 1,000.00 pesos.4. Print out the employee’s name and bonus.
Example 3 - Flowchart A Start Bonus = .5 Y Is Salary N Read Bonus - Salary < 1000 Name, = 1000 Salary B Print Name. B A Bonus End
Example 4 Given two numbers X and Y. Draw a flowchart to determine the difference between X and Y. If X-Y is negative, compute R=X+Y, if X-Y is zero, compute R=2X+XY; and if X-Y is positive, compute R=X*Y. Print out the values of X, Y, and R.
Example 4 - Algorithms1. Read in the values of X and Y2. Subtract Y from X3. If the difference between X-Y is negative, compute R=X+Y, if zero, compute R=2X+XY; and if X-Y is positive, compute R=X*Y.4. Print out the values of X, Y and R.
Example 4 - Flowchart Start A Read <0 >0 X, Y R = X+Y If Diff R = X*Y B =0Diff = X - Y Print X, B R = 2X+2Y Y, R A End B
Example 5 Create a Flowchart and algorithms that would input five values of numbers and compute for the average. If the average is below 75, the remarks is failed, if not remark is passed. Print the average, remarks.
Example 5 - Algorithms1. Read in the values of n1, n2, n3, n4, and n52. Compute the average of the five values read.3. If the the average is below 75, the remark is failed, if not the remark is passed4. Print out the average and the remarks.
Example 5 - Flowchart Start A Read n1, Is n2, n3, Y Rem = N Rem = n4, n5 average Failed Failed <75 ave =(n1+n2+n3+n4+ Print Ave, n5)/5 Rem A End
Steps in Control Loop Initialization - the value of a counter used is initially set equal to zero ( or one ). This process is always done outside the loop. Test for Limit Conditions - before logic flows gets out of a loop, a loop-terminating condition must first be satisfied. The process of testing is usually found either at the beginning or at the end of a loop. Incrementation - after each loop is executed, 1 is added to the counter. Thus the counter reflects the number of times the operation has been performed. Note that process of incrementation is always done within the loop.
Looping - is used when it is desired to make the same calculation on more than one set of data. - it consists of repeating a program, or a section of a program, and substituting new data for each repetition. Counters - is set up in a program loop to keep track of the number of times the program segment is repeated. - the program can then be terminated after the completion of a predetermined number of passes. - Prior to the execution of counting, all counters should be initialized ( usually to zero) before the loop is executed.
- For instance, if a program is supposed to readand print five data values, a counter may be setup in the program which counts the number ofdata values; after a data value is read and printed,the counter is increased by one. Before a newdata value is allowed to be read, a conditionaltransfer may be used to determined whether ornot the desired amount of data has been reached.If it has, the program is terminated; otherwise anunconditional transfer causes the computer torepeat the input/output and other processingoperations.
Example 1 The initial value of the radius of a circle is equal to one unit and each succeeding radius is one unit greater than the value before it. Draw a flowchart to compute the area of the circle starting with R=1.0 up to R=5.0, then print out each radius and the corresponding area of the circle.
Example 1 - Algorithms1. Initialized the value of R to 1 and the value of PI to 3.14162. Compute area by multiplying PI by the square of R.3. Print out the value of R and the square of R.4. Increment the value of R by 1.5. Test if R is less than or equal to 56. If R is less than than or equal to 5, loop back and repeat step 2 through 5. However, if R is greater than 5, stop processing.
Example 1 - Flowchart A Start R = 1.0 Print R, PI = 3.1416 AREAB AREA = PI *R*R R = R + 1.0 A Y Is R < = N B 5.0 ? End
Example 2 Given a set of 5 numbers that include both positive and negative data values. Draw a flowchart to read in these values one at a time and count the number of positive values (including zero values) and the number of negative values found in the set. After the required values are determined, print out these counted values.
Example 2 - Algorithms1. Set up two counters and initialized their values to zero (one counter, NNEG, is used for counting the number of negative values and the other, NPOS, for counting positive values).2. Input the first data value, NO.3. Test and determine if the the value read is positive or negative (The decision symbol is used and in it is written the question, NO<0?)4. If the value of NO is negative ( or less than zero), increment the NNEG counter by one. However, if it is positive ( or equal to or greater than zero), increment the NPOS counter.
Example 2 - Algorithms5. Determine the number of values encountered (NVAL) by adding the two counters (NNEG and NPOS).6. Test if NVAL is equal to 57. If the value of NVAL is not equal to 5, repeat steps 2 through 5. However, if it is equal to 5, print out the current value stored in these counters (NNEG and NPOS)
Example 2- Flowchart A Start NNEG = Y Is NO N NPOS = NNEG = 0 NNEG + 1 <0 NPOS + 1 NPOS = 0B NVAL = NNEG + NPOS Read NO Is NNEG, N Y B NVAL = 5? NPOS A End
Example 3 Draw a flowchart and algorithms which will read and print the names and individual scores of 100 students for a particular examination. Also, determine their average and score, and print it out.
Example 3 - Algorithms1. Initialize the counter (CTR) and accumulator (sum) to zero.2. Read in the student’s name and score.3. Print out the student’s name and score.4. Accumulate the data value (SCORE) into the sum.5. Test if the desired amount of data (100) has been reached.6. If the value of counter (CTR) is less than 100, repeat the steps 2 through 5. However, if the desired amount of data has been reached (100), compute the average score by dividing the sum by the value of counter.
Example 3 - Algorithms7. Print out the average scores.
Example 3 - FlowchartStart ACTR = 0 SUM = SUM + SCORESUM = 0 BRead Ave = Y Is CTR N CTR = CTR + 1Name, SUM/CTR = 100?SCORE Print B Ave A End
Example 4 Given the lengths of 3 sides (a, b, and c) of a triangle. Prepare a flowchart to read these values, compute the perimeter and the value of S, and determine the area of the triangle using Hero’s formula (Hint: Per = a + b + c; S=Per/2; and the AREA=[s(s-a) (s-b) (s-c)]2. Then print out the given and computed values.
Example 4 - Flowchart Start ACTR = 0 Perimeter = a + b + c CRead Is Y Printa, b, c Per < CTR 0? A 1
Example 4 - Flowchart 1 B N Is Print S = Per/2 End Area = 0 ? a, b, c Per, S, AreaArea = s(s-a) (s-b) (s-c) CTR = CTR + 1 B C