Introduction to software engineering and Computing

AbdurehmanDawud 79 views 77 slides Jun 05, 2024
Slide 1
Slide 1 of 77
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77

About This Presentation

Introduction to software engineering and Computing


Slide Content

An Overview of Computer System Introduction to Software Engineering and Computing .

Outline What is Computing Definition and characteristics of computer Limitations of computers Types of computers Applications of modern computers and future computing trend Components of computing system Software development process Problem solving using computers

What is computing? The activity of using computers or computer software in order to do a task Any activity that uses computers to manage , process , and communicate information that includes development of both hardware and software. Software Engineering is one of the major discipline of computing

Computer The word computer is derived from the word compute . Compute means to calculate . The computer was originally defined as a super fast calculator. An electronic device that perform diverse operation with the help of predefined instruction called a program to process the information in order to archive desired results.

It is an electronic device, operating under the control of instructions stored in its own memory that can accept data (input) from user, process the data according to specified rules, produce information (output), and store the information for future use. Functionalities of Computer- steps Accepts input/data Stores data/instructions in its memory and use them when required Process data and convert it into useful information Produces output

Characteristics of Computer Both computers and humans can do tasks such as: Compute numbers Sort large number of lists Search items from a list etc What makes the computer special are the following basic characteristics a. Speed Speed of computers refers to the amount of time it takes to carryout a basic operation In the order of micro, nano and pico seconds

b. Storage Fast and efficient Efficient because it can store large amount of information within a limited space In a very organized manner Fast because it can access the stored information in a fraction of a second c. Accuracy Unless there is an error in the input data or in the instruction used to process data computers perform tasks with a highest possible accuracy Consistent accuracy GIGO

d. Automatic Once necessary data and instruction is feed to the computer, it can perform the task without human intervention e. Diligence Computers do not get tired, get bored, loss concentration Can work for hours, or days … Makes them suitable for routine type of work f. Versatility Capacity to perform completely different type of work. As an accountant, secretary …

Limitations of Computer 1. No IQ Cannot think, Need to be instructed by users Cannot take its own decision 2. Not self directing Computers are not self-directing & independent machines. Precise instructions are needed even for the simplest action. However, once put in operation they hardly ever fail

3. No Feeling/Sympathy Does not distinguish between what is wrong and what is right 4. No Accountability Do not take responsibility to what they do 5. No working through trial and error Do not learn by experience 6. No Interpretation Do not know the interpretations of actions they take Do what they are fed to do 1 and one are different for computers

In general terms computers can use for the following purposes:- To make the work easy. To do the work efficiently (Efficiency). To improve the quality of the result of work (Quality). To assist the work (Assistance). To finish the task faster (Speed).

Types of Computer There are different types of computers. The classification depends on different characteristics of computers such as: Purpose or Functionality Type of data handled Physical size, price, capacity, performance and processing power of computers.

According to Purpose of Function Specific Purpose Designed to perform a single specific task. They have set of instructions permanently programmed (pre-programmed instructions) into them that are designed to perform only one major function. Often used as training simulator. Examples : The public telephone box, Traffic control system, Ticket machines (used in grocery, super market etc.), ATM, Washing Machine etc...

2. General Purpose Computers Designed to handle variety of tasks. Programmed to do many different kinds of tasks, rather than one that is limited by design to a specific task. More flexible, versatile and store large amount of data Can have software installed for many different uses. Example : Desktop computer, Laptop Computer, Smart phones

According to Type of Data Handled Analog Computers Recognize data as a continuous measurement of physical quantity. Don’t compute directly with numbers, rather they use physical quantity such as electric current, voltage, mechanical motion and distance to represent and Process data. Most of them are special purpose computers Examples : Thermometer, voltmeter, speedometer of a car, and Gasoline pomp.

2. Digital Computers handle information that can be counted. Uses digital circuits and are designed to operate on two states, namely bits ( 0 or1). These bits can be combined to denote information such as numbers, letters, graphics, images and program instructions. are suitable for complex computation and have higher processing speeds. They are programmable. are the most widely used, and have higher accuracy and speed than analog computers Examples : The general purpose computers like Desktop, smart phones etc…

3. Hybrid Computers is a combination of both analog and digital computer. Can handle both analog and digital data. combines the best characteristics of both the analog and digital computer. It can accept data in both analog and digital form Applicable in areas such as manufacturing, transportation, power systems, healthcare and others. Example : Petrol pomp ICU device in hospitals

ACCORDING TO SIZE & PROCESSING POWERS MICROCOMPUTERS ( Personal Computers) They are relatively small or compact in size and are often found on a tabletop or desktop come in a variety of sizes and shapes for a variety of purposes. Basically they can be grouped into three namely: Laptop , Palmtop and Desktop computers . Laptop computers are smaller versions of microcomputers about the size of a briefcase designed for portability. Unlike desktop PCs that have mostly detachable components, laptops include all their components (except their printer) in a single unit.

Cont’d Palmtop computer is the smallest microcomputer that is about the same size as a pocket calculator. Palmtops are typically used for a limited number of functions, such as maintaining personal calendar, name and address files, or electronic worksheets. Desktop computer is the most widely used type of personal computer (microcomputers). Unlike laptop and personal computers, desktop computers have detachable parts. However, since its size is larger than the other types of personal computers, it is not easily portable.

2. Minicomputers Are midrange computers that are larger and more powerful than most microcomputers but are smaller and less powerful than mainframe computer systems. The size prevents it from being easily portable although it can be moved more easily than a mainframe computer. Most minicomputers can function in ordinary operating environments, as they do not need special air conditioning or electrical wiring. Are being used for a large number of business and scientific applications. They are popularly used in scientific laboratories, research centers, universities and colleges, engineering firms, industrial process monitoring and control etc.

3. Mainframe Computers are large, powerful computers that are physically larger than micros and minis and usually have processors with faster instruction processing speeds. able to process from 10 to 200 million instructions per second. generally found in a special computer room where environmental factors such as temperature, humidity, dust and air conditions are closely monitored. Because of the computer’s cost and the value of the information stored there, the rooms in which mainframes are located have security systems allowing only authorized personnel to enter.

Cont’d have the capacities to host multiple operating systems and can handle hundreds of users (can serve up to 50,000 users simultaneously) Designed to handle the information processing need of organization with many employees and customers or with complex computational problems. To give some example, mainframes can handle the processing of thousands of customer inquiries, employee paychecks, student registrations, sale transactions, and inventory changes. They are also used as the center of computer networking. These computers are used by organizations that have enormous and complex data processing assignments.

4. SUPERCOMPUTERS the fastest and most expensive type of computers Operates 4 to 10 times faster than mainframe computers can take inputs from over 10,000 individual computers and users at the same time. highly trained data processing professionals are required to operate supercomputers. largely used by highly calculation-intensive tasks and research organizations, military defense systems, national weather forecasting agencies, large corporations, aircraft manufacturer etc …

Cont’d Some supercomputers require extra floor support to hold the extreme weight of the complete system that includes storage units.

Applications of Modern Computers Now a days every field or discipline either directly or indirectly uses computer in order to process information. Here are some of the application areas of computer: Science and Engineering Education Medicine and health care Entertainment Communication Business application Publishing Banking etc…

Assignment 1 Write and briefly discuss the evolutions of Computers. What are the different computer generations. Briefly discuss the technology and programming language used in each generation. Compare and contrast each computer generation.

Components of computing system

Computing Hardware Trends Trend : a general direction in which something is developing or changing. Computing hardware trends : changes or evolutions in the ways that computer hardware are used which become widespread and integrated into popular thought with regard to systems and computing devices.

Software Vs. Program Components of software Software = Program + Documentation + Operating Procedures Software is more than programs .

Any program is a subset of software and it becomes software only if documentation and operating procedure manuals are prepared. Documentation consists of different types of manuals .

Operation procedures manuals consist of instructions to setup and use the software system and how to react to system failure .

Software Vs Program

Characteristics of good SW Operational : how well it is working Budget - Usability Efficiency - Correctness Functionality - Safety and Security Transitional : movability across platforms Portability - Interoperability Reusability - Adaptability Maintenance: ability to maintain itself in changing environment Maintainability - Flexibility Scalability

Types and Classes of Software System Software It is a type of computer software that is designed for running the computer hardware parts and the application programs . Operating system is an example of System Software For desktop computers, laptops and tablets: Microsoft Windows Mac (for Apple devices) Linux For smartphones: Apple’s iOS Google’s Android Windows Phone OS

Cont’d Application Software It is designed for the users to perform some specific tasks like writing a letter, listening to music or watching any video. Example: An application software program for making spreadsheets.

Cont’d Types of Application Software The different types of application software include the following: Application Software Type Examples Word processing software MS Word, WordPad and Notepad Database software Oracle, MS Access etc. Spreadsheet software Apple Numbers, Microsoft Excel Multimedia software Real Player, Media Player Presentation Software Microsoft PowerPoint, Keynotes Enterprise Software Customer relationship management system Information Worker Software Documentation tools, resource management tools Educational Software Dictionaries: Encarta, BritannicaMathematical: MATLABOthers: Google Earth, NASA World Wind Simulation Software Flight and scientific simulators Content Access Software Accessing content through media players, web browsers Application Suites OpenOffice , Microsoft Office

Programming Software is the type of software that is used by software programmers are programs that are used to write , develop , test , and debug other software, including apps and system software. They are facilitator software used to translate programming languages (i.e., Java, C++, Python, PHP, etc ) into machine language code . Examples: Different programming language editors, debuggers, compilers and IDEs are examples of programming software like Eclipse, Notepad++, Android studio etc…

Driver Software They operate and control devices and peripherals plugged into a computer.

Software Development Life Cycle - SDLC

SDLC Software development process Sequence of stages in software engineering to develop software product . Series of steps to be followed to design and develop a software product efficiently

SDLC

Stages of SDLC Planning Requirement This is the first phase in the systems development process. It identifies whether or not there is the need for a new system to achieve a business's strategic objectives Feasibility study : Detailed study by the analysts whether the desired system and its functionality are feasible to develop . Planning : for the quality assurance requirements and identification of the risks associated with the project .

Stages of SDLC- cont’d 2. Requirement analysis Clearly define and document the product requirements and get them approved from the customer This is where teams consider and define the functional requirements of the project or solution. Software Requirement Specification (SRS) : document which consists of all the product requirements to be designed and developed during the project life cycle .

Stages of SDLC- con’t 3. System Design Includes the design of application, network, databases, user interfaces, and system interfaces. Transform the SRS document into logical structure, which contains detailed and complete set of specifications that can be implemented in a programming language. Design Document Specification(DDS) : document which clearly defines all the architectural modules of the product along with its communication and data flow representation with the external and third party (if any) modules.

Stages of SDLC- con’t 4. Implementation Implement the design into source code through coding. A test report which contains errors is prepared through test plan that includes test related tasks such as test case generation, testing criteria, and resource allocation for testing The programming code is generated as per DDS A programming language is chosen with respect to the type of software being developed .

Stages of SDLC- con’t 5. Testing Software defects are reported, tracked , fixed and retested, until the software product reaches the quality standards defined in the SRS. Checks whether the developed system meets the requirements responds correctly to all kinds of inputs , performs its functions within an acceptable time can be installed & run in its intended  environment achieves stakeholder’s desire.

Stages of SDLC- con’t 6. Deployment all of the activities that make a  software  system available for use. The product may first be released in a limited segment and tested in the real business environment (UAT- User acceptance testing).

Stages of SDLC- con’t 7. Maintenance is the process of modifying a software product after it has been delivered to the customer. Need for Maintenance Correcting faults Improving the design Implementing enhancements /new features etc…

Problem solving using computers

Problem Solving Using Computer A problem is a kind of barrier to achieve something Problem solving is a process to get that barrier removed by performing some sequence of activities There are some problems which have no solution and these problems are called Open Problems If you can solve a given problem then you can also write an algorithm for it So, what is an algorithm ?

Algorithm Defined as: “ A sequence of activities to be processed for getting desired output from a given input .” Webopedia defines an algorithm as: “ A formula or set of steps for solving a particular problem . To be an algorithm, a set of rules must be unambiguous and have a clear stopping point ”. There may be more than one way to solve a problem , so there may be more than one algorithm for a problem . From the above definition of algorithm we can say that: 51

Algorithm (Cont.) Getting specified output is essential after algorithm is executed . One will get output only if algorithm stops after finite time . Activities in an algorithm to be clearly defined in other words for it to be unambiguous . Before writing an algorithm for a problem, one should find out What is/are the inputs to the algorithm What is/are expected output after running the algorithm While writing algorithms we will use following symbol for different operations: ‘+’ for Addition , ‘-’ for Subtraction , ‘*’ for Multiplication , ‘/’ for Division and ‘← ’ for assignment . For example : A ←X*3 means, A will have a value of X*3 . 52

Properties of Algorithm (Cont.) Donald Ervin Knuth has given a list of five properties for an algorithm, these properties are: i . Finiteness : An algorithm must always terminate after a finite number of steps It means after every step one reach closer to solution of the problem and after a finite number of steps algorithm reaches to an end point . ii. Definiteness : Each step of an algorithm must be precisely defined . It is done by well thought actions to be performed at each step of the algorithm. Also the actions are defined unambiguously for each activity in the algorithm. 53

Properties of Algorithm (Cont.) iii. Input : Any operation you perform need some beginning value/quantities associated with different activities in the operation. So the value/quantities are given to the algorithm before it begins. iv. Output : One always expects output/result (expected value/quantities) interms of output from an algorithm The result may be obtained at different stages of the algorithm The output is expected value/quantities always have a specified relation to the inputs 54

Properties of Algorithm (Cont.) V. Effectiveness : Algorithms to be developed/written using basic operations . Actually operations should be basic, so that even they can in principle be done exactly and in a finite amount of time by a person, by using paper and pencil only. 55

Algorithm (Cont.) Examples of Algorithm Problem 1: Find the area of a Circle of radius r. Inputs to the algorithm: Radius r of the Circle Expected output: Area of the Circle Algorithm: Step 1 : Start Step 2: Read\input the Radius r of the Circle Step 3 : Area PI*r*r // calculation of area Step 4 : Print Area Step 5: End 56

Algorithm (Cont.) Problem 2: Write an algorithm to read two numbers and find their sum . Inputs to the algorithm: First num1. Second num2. Expected output: Sum of the two numbers Algorithm: Step 1: Start Step 2: Read\input the first num1. Step 3: Read\input the second num2. Step 4: Sum num1+num2 // calculation of sum Step 5: Print Sum Step 6: End 57

Algorithm (Cont.) Problem 3: Converting Temperature Fahrenheit to Celsius Inputs to the algorithm: Temperature in Fahrenheit Expected output: Temperature in Celsius Algorithm: Step 1: Start Step 2: Read Temperature in Fahrenheit F Step 3: C ←5/9*(F-32). Step 4: Print Temperature in Celsius: C Step 5: End 58

Types of Control Structure The algorithm and flowchart , classified into the three types of control structures. They are: 1. Sequence 2. Branching (Selection) 3. Loop (Repetition) These three control structures are sufficient for all purposes. The sequence : Is exemplified by sequence of statements place one after the other – the one above or before another gets executed first. In flowcharts, sequence of statements is usually contained in the rectangular process box 59

Types of Control Structure (Cont.) The Branching (Selection): Refers to a binary decision based on some condition. If the condition is true , one of the two branches is explored ; if the condition is false, the other alternative is taken . This is usually represented by the ‘ if-then ’ construct in pseudo-codes and programs . In flowcharts, this is represented by the diamond-shaped decision box The branching is also known as the selection structure Example : The branching used to ask a question that can be answered in a binary format ( Yes / No , True / False ) 60

Examples of Branching (Selection) Problem 1: write algorithm to find the greater number between two numbers Algorithm: Step 1: Start Step 2: Read/input A and B Step 3: If A greater than B then C=A Step 4: if B greater than A then C=B Step 5: Print C Step 6: End 61

Examples of Branching (Selection) Problem 2: Write algorithm to find the result of equation: Algorithm: Step 1: Start Step 2: Read/input x Step 3: If X Less than zero then F=-X Step 4: if X greater than or equal zero then F=X Step 5: Print F Step 6: End 62

Examples of Branching (Selection) Problem 3: A algorithm to find the largest value of any three numbers. Algorithm: Step 1: Start Step 2: Read/input A,B and C Step 3: If (A>=B) and (A>=C) then Max=A Step 4: If (B>=A) and (B>=C) then Max=B Step 5: If (C>=A) and (C>=B) then Max=C Step 6: Print Max Step 7: End 63

The Loop (Repetition) The loop allows a statement or a sequence of statements to be repeatedly executed based on some loop condition It is represented by the ‘ while ’ and ‘ for ’ constructs in most programming languages , for unbounded loops and bounded loops respectively. Unbounded loops refer to those whose number of iterations depends on the eventuality that the termination condition is satisfied Bounded loops refer to those whose number of iterations is known before-hand The loop is also known as the repetition structure You must ensure that the condition for the termination of the looping must be satisfied after some finite number of iterations, otherwise it ends up as an infinite loop 64

Examples of Loop Problem 1: An algorithm Printing Numbers From 1 to 5 Algorithm: Step 1. Start Step 2. I ← 1 Step 3. Write I in standard output Step 4. I ← I+1 Step 5. If (I <=5) then go to STEP 3 Step 6. End 65

Examples of Loop Problem 2: An algorithm to display even numbers from 0 and 99 Algorithm: Step 1. Start Step 2. I ← 0 Step 3. Write I in standard output Step 4. I ← I+2 Step 5. If (I <=98) then go to STEP 3 Step 6. End 66

Examples of Loop cont. Problem 3: Design an algorithm with a natural number, n, as its input which calculates the following formula and writes the result in the standard output: S = ½ + ¼ + … +1/n Algorithm: 1. Start 2. Read n 3. I ← 2 and S ← 0 4. S= S + 1/I 5. I ← I + 2 6. If (I <= n) then go to line 4 else write S in standard output 7. End 67

Flowchart The flowchart is a diagram which visually presents the flow of data through processing systems . This means by seeing a flow chart one can know the operations performed and the sequence of these operations in a system. Algorithms are nothing but sequence of steps for solving problems . So a flow chart can be used for representing an algorithm. You can see a flow chart as a blueprint of a design you have made for solving a problem. 68

Flowchart Cont. There are 6 basic symbols commonly used in flowcharting of assembly language Programs: Terminal Process Input/output Decision Connector Predefined Process This is not a complete list of all the possible flowcharting symbols, it is the ones used most often in the structure of Assembly language programming. 69

Flowchart Symbols 70

Flowchart Symbols (Cont.) 71 Example of on page connector

Some Examples of Flowcharts Problem 1: Find the area of a circle of radius r. Problem 2: Convert temperature Fahrenheit to Celsius. 72

Some Examples of Flowcharts Problem 3: Algorithm which gets two numbers and prints sum of their value Problem 4: Algorithm for find the greater number between two numbers T r u e False Start Read A,B Print A If A>B Print B EN D 73

Some Examples of Flowcharts Problem 5: Flowchart for the problem of printing even numbers between 9 and 100: 74

Advantages of Using Flow Chart Flow chart is used for representing algorithm in pictorial form. This pictorial representation of a solution/system is having many advantages. These advantages are as follows: 1) Communication : A Flowchart can be used as a better way of communication of the logic of a system and steps involve in the solution. 2) Effective analysis : A flowchart of a problem can be used for effective analysis of the problem. 75

Advantages of Using Flow Chart (Cont.) 3) Documentation of Program/System : Program document is used for various purposes like knowing the components in the program, complexity of the program etc. 4) Efficient Program Maintenance : Once a program is developed and becomes operational it needs time to time maintenance. With help of flowchart maintenance become easier. 5) Coding of the Program : Any design of solution of a problem is finally converted into computer program. Writing code referring the flowchart of the solution become easy. 76

Exercise What is an algorithm ? Explain the need of an algorithm ? Find factorial of N ? Write an algorithm . Draw a flowchart to find the largest of three numbers x , y and z . Draw a flowchart to find the sum of first 100 natural numbers. 77