0% found this document useful (0 votes)
61 views

Design Program Logic For DBA (Level III and IV)

Uploaded by

Belay Kassahun
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
61 views

Design Program Logic For DBA (Level III and IV)

Uploaded by

Belay Kassahun
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 28
HARAMBEE UNIVESIITY ADAMA CAMPUS Module Title: Designing Program Logic LG Code: EIS DBA3 M06 1220 Lo (1-3) LG (21-23) TTLM Code: EIS DBA3 TTLM06 1220v1 Learning outcome * Obtain Design documentation + Review and clarifying requirements for the program + Determine Design approach Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS =? q Information Sheet 1.1: Obtaining Design documentation XN Program logic is the implementation of the program's requirements and design. If the design of the application is bad, the program logic can nevertheless be professionally implemented. Generally, * Program logic is a picture of why and how you believe a program or a policy will work. * Program logic demonstrates design & implementation of competence. + Program logic provides a chain of reasoning that links investments with results. * Program logic is a series of “if-then’” relationships that, if implemented as intended, lead to the desired outcomes, Obtaining Design documentation The Design Document will be the starting point and in many cases you should, do the Design Document before doing any of the actual work of program. Remember: © When you write code for a program, you usually will have: © Clarified your requirements and © Planning the design before you write the first line of actual code. © Having the type of documentation that we are expecting helps ensure a number of things like; © You are doing what the customer wants; © That when you are done, © You actually did what you intended to do; © That in case of personnel problems you project continuity remains; ete. Logic model provide a kind of map for a program or initiative, helping clarify a program or policy's destination, the pathways toward the destination, and markers along the way. In this consider: + Where are you going? + How will you get there? + What will tell you that you have arrived? Logic models provide a simplified picture of the relationships between the program activities and the desired outcomes of the program, It is valuable in supporting # Program planning. © Program implementation. * Program monitoring, © Program evaluation. Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS 3 q We also use a logic model to: XN © Brings detail to broad goals. # Helps identify gaps in program logie and clarify assumptions. # Builds understanding and promotes consensus. # Makes explicit underlying beliefs. * Helps clarify what is appropriate to evaluate and when. + Summarizes complex programs for effective communication, Information Sheet 1.2: Reviewing and clarifying requirements for the program A program of Requirements ‘A specification of requirements or Program of Requirements is a document used in a design or procurement proce: ‘The aim of a Program of Requirements is to lay down a clear framework for everyone involved in the project so that everyone understands which criteria must be met. The program of requirements is an important guideline for the designers to ensure that they deliver the desired result, Understanding the Programming Process © Understand the problem Plan the logic Code the program Use software to translate the program to machine language. ‘Test the program and 00000 Deploy the program into production 1. Understanding the problem + May be the most difficult phase + Users may not be able to articulate their needs well + User needs may be changing frequently + Programmers may have to learn the user’s functional job tasks + Failure to understand the problem is the major cause of most project failures I. Planning the logic: + Plan the steps that the program will take * Use tools such as flowcharts and pseudo code to depict or illustrate the structure or steps of program. > Flowchart: a pictorial representation of the logic steps. > Pseudo code: English-l ike representation of the logic. + Walk through the logic before coding by desk-checking the logic. Il. Coding the program: + Select the programming language + Write the instructions Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS 4 q TV. _ Using software (o translate the program into machine language: XN + Programmers write instructions in English-like high-level languages + Compilers or interpreters change the programs into low-level machine language that can be executed + Syntax errors are identified by the compiler or interpreter Testing the program: + Execute it with sample data and check results + Identify logic errors and correct them + Choose test data carefully to exercise all branches of the logic VI. Putting the program into production * Do this after testing is complete and all known errors have been corrected + May require coordination with other related activities or software. Information Sheet 1.3: Determining Design approach 1.1. Determining Design approach The method or approach that software engineers use in solving problems in computer science is called software development method. Another name that is commonly used for the software development method is called software life cycle. The software life cycle has the following components. 1. Preliminary investigation: The purpose of the preliminary investigation is to determine whether the problem or deficiency in the current system really exists. The purpose of the preliminary investigation is to determine whether the problem or deficiency in the current system really exists. The project team may reexamine some of the feasibility aspects of the project. At this point, the purpose is to make 2 “go” or “no-go” decision © Defining the problem: + E.g. Examines documents, work papers, and procedur users of the system. © Suggesting a solution + E.g, Often improving an existing one or building a new information system. Determine whether the solution is feasible. Y Technical Feasibility: Whether implementation is possible with the available or affordable hardware, software and other technical resources. Y Economic Feasibility: Whether the benefits of the proposed solution outweigh the costs. Y Operational Feasibility: Whether the proposed solution is desirable within the existing managerial and organizational framework iis (Requirement gathering): In the analysis phase end user business requirements are analyzed Observe system operations; interview key and project goals converted into the defined system functions that the organization intends to develop. Y Try to understand the business in general (activities done, how it is done, etc) Y Define the specific information requirements, who needs what information, where, when and how. Y Present a detail description of the functions the new system must perform Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS = 5. q In this phase we identify: XN ¥ Inputs to the problem and their form ¥ Outputs expected from the solution and their form ¥ Constraints (What are the limits on the data? E.g. Income cannot be a negative number) ¥ Assumptions (Problem deals) Y Formulas (e.g, for determining the area, It is length x Width) ‘The three primary activities involved in the analysis phase are as follows: 1. Gathering business requirement 2. Creating process diagrams 3. Performing a detailed analysis . Design phase: In the design phase, we describe the desired features and operations of the system. This phase includes business rules, pseudo-code, screen layouts, and other necessary documentation, ‘The two primary activities involved in the design phase are as follows: 1. Designing of IT infrastructure 2. Designing of system model v ‘To avoid any crash, malfunction or lack of performanee, the IT infrastructure should have solid foundations 4, Implementation: in the implementation phase involves putting the project plan into action. In this phase, physical design of the system takes place. 5. Testing: The essence of testing is to: + Catch as many errors as possible + Correct the errors ‘+ Track the errors to understand their causes and any patterns that may exist + Revalidate the stability of the solution, including ensuring that the correction of one error does not lead to the introduction of another error somewhere else 6. Maintenance: it requires continual monitoring and updating to ensure it remains relevant and useful Requirements of this phase may include: * Periodically replacing old hardware Regularly evaluating system performance Providing updates for certain components to ensure they meet standards Delivering improved systems when necessary Analyzing whether or not certain elements remain feasible for the system’s continued use, such as its ‘economic value, technical aspects, legal requirements, scheduling and operation needs, Security considerations and ete... Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS 6 q Program algorithm N Algorithm is a set of instructions designed to perform a specific task. An algorithm is a step-by-step sequence of instructions to solve a specific problem in a finite amount of time. Designing an algorithm/a solution to a problem A program is written in order to solve a problem. A solution to a problem actually consists of two things. ‘A way to organize the data. Sequence of steps to solve the problem. The way data are organized in a computer memory is said to be data structure and the sequence of ‘computational steps to solve a problem is said to be an algorithm. Therefore a program is nothing but data structure plus algorithms. An algorithm is a well-defined computational procedure that takes some values or a set of values as input and produces some values or a set of values as output. An algorithm is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed. Algorithm development ‘An algorithm is procedure for solving a problem in terms of the action to execute (What to do) and the order in which these actions are executed (done). An algorithm needs to be: = Precise and unambiguous (No ambiguity in any instruction and in the order of execution), = Simple, = General (1 inch is equal to 2.54em is not an algorithm, it has to convert a supplied number of inches) = Comect, + Finite (has to have an end), = Handles all exceptions, + Efficient in time, memory and other resources, > Many different methods exist for constructing algorithms, (An algorithm can be expressed in many ways). ‘Some of those methods are Narrative, Flowchart and Pseudo-code. Narrative ten used to narrate the algorithm, can be understood by any user who may not have any knowledge ‘of computer programming. Too wordy, Too ambiguous and can be interpreted in different ways. 1.3.1 Flowcharts diagrams Flowehart: A flowchart is a graphical representation for an algorithm. It is a diagram consisting of labeled symbols, together with arrows connecting one symbol to another. A flowchart is a type of diagram that represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting those with arrows. This diagrammatic representation can give a step-by-step solution to a given problem. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields. Complied by Akfete.A savers purvestiny an coms 7 A flow chart can be used to: XN + Define and analyze processes. + Build a step-by-step picture of the process for analysis, discussion, or communication. + Define, standardize or find areas for improvement in a process, ‘A picture can say a thousand words! That is why programmers use flowcharts to display their ideas. Flowcharts easily display the way a program naturally flows from one statement to the next, The following are the symbols used when drawing flowcharts. (__) Terminal point: Makes the beginning or end ofa program Lf / Input or output data: It is used to show input or output data Process: Indicates any arithmetic computations or data movement. ——— > Flow line: It is used to show the direction of logical flow. > Connector: comets stint te tower ohare agra can main soa ina ow <> Decision: Indicates a yes/no decision to be made by the program. Inter-page connector: Used as exit or entry from a flowchart on one page to a Flowchart in another page. Predefined process: Indi ies a process defined elsewhere. Annotation flag: Used to add clarifying comments or descriptions. ‘You can use different Flowchart Software’s to draw a flowchart Here is a shortlist of the best software for flowcharts: 1. Creately, Miro, Microsoft Visio, Gliffy, Edraw Max, ConceptDraw Diagram, Cacoo, Terrastruct, VisualParadigm Online, Draw.io and ete. For example to create a Flowchart use a Microsoft Visio 2007 Example 1: A certain company plan to give 10% bonus to each of its employees at the end of every year. If an employee has been working for 10 years or more at the company, she/he is to get an additional birr 100, Draw a flowchart of an algorithm to caleulate and print the bones for a given employee. Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS q Solution: Analysis problem is to compute bonus for employee. To do so, the salary and number of service years of the employee must be known. Let the salary be denoted by SAL, service denoted by YEAR and bonus by BONUS. To compute the bonus, we multiply the salary by 10% and assign the result to BONUS. Thus, BONUS = SAL*0.10. If the employee has served at least 10 years, birr 100 is added to the computed bonus of the employee and the result is displayed. Otherwise the originally ‘computed bonus is displayed. Algorithm: Uses English to write operations in a group. 1. Read employee's salary and year of service. 2. Calculate the employee’s bonus. rease the bonus. Otherwise only print the bonus. 3. Ifyears of service is greater than or equal to 10 ther Example 1: A flowchart for calculating bonus ‘Bonus + 0.1* SAL VEAR==10 Bonus sToP Complied by Akfete.A N HARAMBEE UNIVESIITY Figure 2: A flow chart for calculating interest amount Disses Mame. Textarea se Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS 10 q Example 4. Calculate grade for ten students based on the scale: >80-A, >60-B, > 50-C, >40-D, <40-F. 1.3.2 Pseudo codes Pseudo-code is an informal high-level description of the operating principle of a computer program or other algorithm, Pseudo-code is used in planning an algorithm with sketching out the structure of the program before the actual coding takes place. It is not an actual programming language. So it can’t be compiled into ‘an executable program. Pseudo-code is writing an algorithm as close as possible to computing languages. Pseudo-code is useful for describing algorithms ina structured way. The purpose of using pseudo-code is an efficient key principle of an algorithm. An algorithm is merely the sequence of steps taken to solve a problem. The steps are normally "sequence," "selection,” “iteration,” and a case-type statement, ‘The "selection" is the "if then else” statement, and the iteration is satisfied by a number of statements, such as the "while," " do,” and the "for," while the case-type statement is satisfied by the "switch" statement. Complied by Akfete.A HARAMBEE UNIVESIITY Pseudo Code with SELECTION ADAMA CAMPUS a N IF-THEN-ELSE is a decision (selection) in which a choice is made between two alternative courses of action, Example, Or, in gener: If () Plug in kettle: Then ; Put teabag in cup; Else ; While (Kettle is not full) Endif; Do keep filling Kettle; So, we could state this as: EndWhile; If (Sugar is required) Wait for bottle to boil; ‘Then add Sugar; Add water to cup: Endif Add milk; Endlf, Organize everything together; Ise don’t add sugar; Remove teabag with spoon/fork/; If (Sugar is required) Then add Sugar; Else do nothing; In computer science and numerical computation, pseudo-code is an informal level description of the operating principle of a computer program or other algorithm, An outline of a program written in a form of pseudo-code can be converted easily into real programming statements. It cannot be compiled nor executed, and there is no real formatting or syntax rules. Examplet. A pseudo-code to calculate bonus ACCEPT Name, Salary Bonus=Salary x 0.1 ACCEPT Service year IF Service year> 10 Then Bonus + 160 ENDIF DISPLAY Bonus Example 2. A pseudo-code to calculate interest rate ACCEPT Name, Princi Rate Interest = Principal x Rate DISPLAY Name, Interest Complied by Akfete.A HARAMBEE UNIVERSITY Example3. A pseudo-code that calculates grade hint Grade >=80, "A", ‘ACCEPT Mark, Name IF Mark>80 Then, Grade + A ELSE IF Mark >60 Then Grade + B ELSE IF Mark >50 Then Grade + C ELSE IF Mark >40 Then Grade + D ELSE Grade + F ENDIF Display Grade, Name >=60,"B"; 50, “C", >=40," D", <40, “F" Complied by Akfete.A Algorithm ys. Pseudo-cod HARAMBEE UNIVESIITY ADAMA CAMPUS Both Algorithm and Pseudo code more or less describe the logical sequence of steps that follow in solving a problem. Pseudo-code consists of short readable and formally-styled natural language that used to explain specific tasks within a program's algorithm while an Algorithm is a group of instructions or a set of steps applied to solve a particular problem. Pseudo code is a method used to define an algorithm. An algorithm is written in a natural language while pseudo code can be written in high level programming languages. Pseudo-code cannot be executed on a real computer, but it models and resembles real programming code, and is written at roughly the same level of detai 1.3.3 Entity-relationship diagrams (ERDs) ERD is a data modeling technique that creates a graphical representation of the entities, and the relations! between entities, within an information system. Entity-Relationship model is a type of database model based. on the notion of real world entities and relationship among them. We can map real world scenario onto ER database model. ER Model creates a set of entities with their attributes, a set of constraints and relation among them, ER Model is best used for the conceptual design of database. The three main components of an ERD are: Entity: the entity can be a person, object, place or event for which data is collected. Example: if you consider the information system for a business, entities would include not only customers, but also the customer's address and orders as well. The entity is represented by a reetangle and labeled with a singular noun, Relationship: the Relationship is the interaction between the entities. A relationship may be represented by a diamond shape that can be connected by the line to the entities. Verbs are used to label the relationships. Cardinality: the cardinality defines the relationship between the entities in terms of numbers. The three main cardinal relationships are: 1 2. 3. ‘One-to-one, expressed as 1:1; :M3 and Many-to-many, expressed as M: N. ‘One-to-many, expressed as ‘The steps involved in creating an ERD are: L Idemtify Entities Find Relationships Draw Rough ERD Fill in Cardinality Complied by Akfete.A N HARAMBEE UNIVESIITY ADAMA CAMPUS a 5. Define Primary Keys ‘ 6. Draw Key-Based ERD 7. Identify Attributes 8. Map Attributes Draw fully attributed ERD 10. Check Results Step 1. Identify Entities A data entity is anything real or abstract about which we want to store data. Entity types fall into five classe: roles, events, locations, tangible things, or concepts. The best way to identify entities is to ask the system owners and users to identify things about which they would like to capture, store and produce information. Another source for identifying entities is to study the forms, files, and reports generated by the current system, E.g. a student registration form would refer to Student (a role), but also Course (an event), Instructor (a role), Advisor (a role), Room (a location), etc. Step 2. Find Relationships There are natural associations between pairs of entities. Each row and column should have at least one relationship listed or else the entity associated with that row or column does not interact with the rest of the system. In this case, you should question whether it makes sense to include that entity in the system. A student is enrolled in one or more courses. Step 3. Draw Rough ERD Using rectangles for entities and lines for relationships, we can draw an Entity Relationship Diagram. in Cardinality At each end of each connector joining rectangles, we need to place a symbol indicating the minimum and maximum number of instances of the adjacent rectangle there are for one instance of the rectangle at the other end of the relationship line. The placement of these numbers is often confusing. The first symbol is either 0 to indicate that it is possible for no instances of the entity joining the connector to be related to a given instance of the entity on the other side of the relationship, 1 if at least one instanc necessary or omitted if more than one instance is required. For example, more than one student must be enrolled in a course for it to run, but it is possible for no students to have a particular instructor (if they are on leave). The second symbol gives the maximum number of instances of the entity joining the connector for each instance of the entity on the other side of the relationship. If there is only one such instance, this symbol is 1. If more than 1, the symbol is a crows foot opening towards the rectangle. Le. A student is enrolled in one or more courses Step 5. Define Primary Keys For each entity we must find a unique primary key so that instances of that entity can be distinguished from one another. Often a single field or property is a primary key (e.g. a Student ID). Other times the identifier is, Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS > a set of fields or attributes (e.g. a course needs a department identifier, a course number, and often a section number; a Room needs a Bi 1 Name and a Room Number). When the entity is written with all its attributes, the primary key is underlined. Step 6. Draw Key-Based ERD Looking at the Rough Draft ERD, we may sce some relationships which are non-specific or man; to-many. Le., there are crows feet on both ends of the relationship line. Such relationships spell trouble later when we try to implement the related entities as data stores or data files, since each record will need an indefinite number of fields to maintain the many-to-many relationship. ‘The key-based ERD has no many-to-many relationships and each entity has its p Step 7. Identify Attributes A data attribute is a characteristic common to all or most instances of a particular entity. In this step we try to ary and foreign keys listed below the entity name in its rectangle. identify and name all the attributes essential to the system we are studying without trying to match them to particular entities. The best way to do this is to study the forms, files and reports currently kept by the users of the system and circle each dat Step 8. Map Attributes For cach attribute we need to match it -m on the paper copy. exactly one entity. Often it seems like an attribute should go with more than one entity (e.g. Name). In this case you need to add a modifier to the attribute name to make it unique (e.g. Customer Name, Employee Name, etc.) or determine which entity an attribute "best’ describes. If you have attributes left over without corresponding entities, you may have missed an entity and. its corresponding, relationships. Step 9. Draw Fully-Attributed ERD If you introduced new entities and attributes in step 8, you need to redraw the entity relationship diagram. ‘When you do so, try to rearrange it so no lines cross by putting the entities with the most relationships in the middle. If you use a tool like Systems Architect, redrawing the diagram is relatively easy. Step 10. Check Results Look at your diagram from the point of view of a system owner or user. Is everything clear? Check through these missed entities and add them to the relationship matrix now. the Cardinality pairs. Also, look over the list of attributes associated with each entity to see if anything has been omitted. The basic building blocks of ER-diagram are: Entity Attribute Relationship Fi :: ER-Diagram basie Symbol Complied by Akfete.A HARAMBEE UNIVESHITY ADAMA CAMPUS, Example: A company has several departments, Each department has a supervisor and at least one | At least one Y employee is assigned to a project, but an employee may be on vacation and not assigned to any projects. The employee. Employees must be assigned to at least one, but possibly more department important data fields are the names of the departments, projects, supervisors and employees, as well as the supervisor and employee number and a unique project number 1, [Identify Entities: The entities in this system are Department, Employee, Supervisor and Project. One is tempted to make Company an entity, but it is a false entity because it has only one instance in this problem. True entities must have more than one instance. 2. Find Relationships: We construct the following Entity Relationship Matrix: Department Employee ‘Supervisor Project Department is assigned run by Employee | belongs to works on Supervisor | Runs Project uses 3. Draw Rough ERD: We connect the entities whenever a relationship is shown in the entity Relationship Matrix. Department Superiscr Assigned Employee Project Werkson, Figure: ERD shows relationship Complied by Akfete.A HARAMB! JN ADAMA CAMPUS 4. Fillin Cardinality: From the description of the problem we see that: ‘© Each department has exaetly one supervisor. A supervisor is in charge of one and only one department. ‘* Each department is assigned at least one employee. ‘© Each employee works for at least one department ‘Each project has at least one employee working on it. © An-employee is assigned to 0 or more projects. Degartinent Supeisor Assigned Employee. Project Figure: ERD shows cardinality ratio 5. Define Primary Keys: The primary keys are Department Name, Supervisor Number, Employee Number, and Project Number. 6. Draw Key-Based ERD: There are two, many-to-many relationships in the rough ERD above, between Department and Employee and between Employee and Project. Thus we need the associative entities Department-Employee and Employee-Project. The primary key for Department-Employee is the concatenated key Department Name and Employee Number. The primary key for Employee-Project is, the concatenated key Employee Number and Project Number. Complied by Akfete.. Depertinent lKeyData Department Name (PK) Assigned Employee Department lkeybae +5} depetinent Name[Pi<1] FI Employee Number [PKIJFK Project KeyDaa Project Nunber[P 4] Figure: ERD shows that Key based ADAMA CAMPUS Supenisor KeyDete ‘Superiisor Number [PK] Employee heey Det Employee Number (PK1] Works On. Employes Proiedt KeyDeto Employee Nanber [PK 1 JFK) Proect Number(PE AIF] 18 aa 7. Identify Attributes: The only attributes indicated are the names of the departments, projects, supervisors and employees, as well as the supervisor and employee NUMBER and a unique project number. 8. Map Attributes: For cach attribute, match it with exactly one entity that it describes. Attribute Entity ‘Attribute Entity Department Name Department Supervisor Number Supervisor Employee umber Employee ‘Supervisor Name ‘Supervisor Employee Name Employee Project Name Project Project Number Project Complied by Akfete.. HARAMBEE UNIVESHITY ADAMA CAMPUS, 19 9. Draw Fully Attributed ERD: aad Depatment Eee key Dam ' y | Sutperace Number Pict SecatmeneNanetPi) <> hentia aa PM Sree Name Empoes Deparment Fm Kev Oa Keroas Beart Nenne IPICIKFKI Invohves Emetoyee Number PKI] Emmroyae Number PANE) Sa entay oes Emnavee Name a KR Preiod a Emsoree-Praea praec Numioete¥) orks On kevoats ervey eta Emetovee Number PF] reg Neen ~ Project ember TH) Figure: ERD with fll Attributes 10. Cheek Results: The final ERD appears to model the data in this system well 1.3.4 HIPO Charts (HIPO Diagram) HIPO stands for Hierarchical Input Process Output. HIPO diagram is a combination of two organized method to analyze the system and provide the means of documentation The HIPO chart is a tool used to analyze a problem and visualize a solution using the top down design approach, Starting at the global (macro) level, the chart is decomposed repeatedly at ever-greater levels of detail until the logical building blocks (functions) are identified. AHIPO model consists of a hierarchy chart that graphically represents the program's control structure and a set of IPO (Input-Process-Output) charts that describe the inputs to, the outputs from, and the functions performed by each module on the hierarchy chart. HIPO diagram represents the hierarchy of modules in the software system. Analyst uses HIPO diagram in order to obtain high-level view of system functions. Input Process Output take authentication credentials from user-screen eer one Check validity of credentials eons Call Appropriate Module Figure: HIPO shows general model Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS a 1.3.5 Data flow diagrams (DFDs) Software Analysis & Design Tools Software analysis and design is the intermediate stage, which helps human-readable requirements to be transformed into actual code. Analysis and design tools used by software designers includes = Data Flow Diagram (DFD): It is graphical representation of flow of data in an information system. It is capable of depicting incoming data flow, outgoing data flow and stored data, The DFD does not mention anything about how data flows through the system. There is a prominent difference between DFD and Flowchart. The flowchart depicts flow of control in program modules. DFDs depict flow of data in the system at various levels. DFD does not contain any control or branch elements. ‘Types of DFD 1. Logical DFD - TI type of DFD concentrates on the system process and flow of data in the system. For example in a Banking software system, how data is moved between different entities. 2. Physical DED - This type of DFD shows how the data flow is actually implemented in the system. It is more specific and close to the implementation DFD Components DED can represent Source, destination, storage and flow of data using the following set of components Data Flow PY once Figure: DFD components + Entities -Entities are source and destination of information data. Entities are represented by rectangles. * Process -Activities and action taken on the data are represented by Circle or Round-edged rectangles. + Data Storage- There are two variants of data storage, it can either be represented as a rectangle with absence of both smaller sides or as an open-sided rectangle with only one side n ssing. ‘© Data Flow- Movement of data shown by pointed arrows. Data movement is shown from the base of arrow as its source towards head of the arrow as destination. Levels of DED ‘* Level 0; Highest abstraction level DED is known as Level 0 DED, which depiets the entire information system as one diagram concealing all the underlying details. Level 0 DFDs are also known as context level DFDs Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS aN © Level 1: The Level 0 DED is broken down into more specific, Level | DFD. Level 1 DFD depicts basic modules in the system and flow of data among various modules. Level | DFD also mentions basic processes and sources of information, Figure: Level 1 DFD. * Level 2 - At this level, DFD shows how data flows inside the modules mentioned in Level 1 Higher level DFDs can be transformed into more specific lower level DFDs with deeper level of understanding unless the desired level of specification is achieved. 1.3.6 Structure Charts Structure chart is a chart derived from Data Flow Diagram. It represents the system in more detail than DED. It breaks down the entire system into lowest functional modules, describes functions and sub-functions of each module of the system to a greater detail than DFD. Structure chart represents hierarchical structure of modules. At each layer a specific task is performed. 1.3.6 Data structure Data are just a collection of facts and figures (unprocessed information) or you can say data are values or a set of values that are in a particular format. Data Structure A data structure is a Specific way to store and organize data in a computer's memory so that these data can be used efficiently later. The way data are organized in a computer memory is said to be data structure. In computer science, a data structure is a particular way of storing and organizing data ina ‘computer so that it can be used efficiently. Abstract Data Types (ADT): An ADT consists of an abstract data structure and operations. Put in other terms, an ADT is an abstraction of a data structure. ‘The ADT specifies: 1. What can be stored in the Abstract Data Type 2. What operations can be done by the Abstract Data Type. For example, if we are going 10 model employees of an organization: = This ADT stores employees with their relevant attributes and discarding irrelevant attributes. This ADT supports hiring, firing, retiring, etc, operations. A data structure is a language construct that the programmer has defined in order to implement an abstract data type. Complied by Akfete.A HARAMBEE UNIVESHTY ADAMA CAMPUS all Abstraction Abstraction is a process of clas fying characteristics as relevant and irrelevant for the particular purpose at hand and ignoring the irrelevant ones. Applying abstraction correctly is the essence of successful programming. 1.3.7 RAD (Rapid Application Development) ‘The RAD model is based on prototyping and iterative development with no specific planning involved. The process of writing the software itself involves the planning required for developing the product. RAD focuses on gathering customer requirements through workshops or focus groups, early testing of the prototypes by the customer using iterative concept, reuse of the existing prototypes (components), continuous integration and rapid delivery. Rapid application development is a software development methodology that uses minimal planning in favor of rapid prototyping. A prototype is a working model that is functionally equivalent to a component of the product. RAD Model Vs Traditional SDLC The traditional SDLC follows a rigid process models with high emphasis on requirement analysis and gathering before the coding starts. It puts pressure on the customer to sign off the requirements before the project starts and the customer doesn’t get the feel of the product as there is no working build available for a long time. The customer may need some changes after he/she gets to see the software. However, the change process is quite rigid and it may not be feasible to incorporate major changes in the product in the traditional SDLC. The RAD model focuses on iterative and incremental delivery of working models to the customer. This results in rapid delivery to the customer and customer involvement during the complete development eycle of product reducing the risk of non-conformance with the actual user requirements. RAD Model - Application RAD model can be applied successfully to the projects in which clear modularization is possible. Ifthe project cannot be broken into modules, RAD may fail. The following pointers describe the typical scenarios where RAD can be used. + RAD should be used only when a system can be modularized to be delivered i manner, + It should be used if there is a high availability of designers for modeling. + It should be used only if the budget permits use of automated code generating tools. * RAD SDLC model should be chosen only if domain experts are available with relevant business knowledge. + Should be used where the requirements change during the project and working prototypes are to be presented to customer in small iterations of 2-3 months. an ineremental Complied by Akfete.A SITY ADAMA CAMPUS 2 1.3.8 Case tools + CASE stands for Computer Aided Software Engineering. It means development and maintenance N of software projects with help of various automated software tools. CASE tools are set of software application programs, which are used to automate Software Development Life Cycle (SDLC) activities, Components of CASE Tools CASE tools can be broadly divided into the following parts based on their use at a particular SDLC stage: * Central Repository - Central repository is a central place of storage where a product specification, requirement documents, related reports and diagrams, other useful information regarding management is stored. Central repository also serves as data dictionary, =a + Upper Case Tools - Upper CASE tools are used in planning, analysis and design stages of SDLC. asvo Jeddn, Asvo payeaboyyy 3SVO 40M07 + Lower Case Tools - Lower CASE tools are used in implementation, testing and maintenance. 1.3.8 Prototyping Prototyping is the process of quickly putting together a working model (a prototype) in order to test various aspects of a design, illustrate ideas or features and gather early user feedback. Prototyping is often treated as an integral part of the system design process, where it is believed to reduce project risk and cost. It ean also be a method used by designers to acquire feedback from users about future designs. The goal of prototyping is to support requirements determination to develop concrete specifications for the ultimate (final) system. Prototyping is most useful in the following circumstances’situation © User requirements are not clear or well understood * Only one or a few users involved Possible designs are complex * Communication problems have existed in the past, between users and analysts Modular programming HARAMBEE UNIVES! 4 'Y ADAMA CAMPUS a Modular programming also called "top-down design" and "stepwise refinement" is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality. A module is a separate unit of software or hardware. Modular programming means break a large program into smaller independent modules (process of subdividing a computer program into separate sub-programs). So that modular programming is a solution to the problem of very large programs that are difficult to debug and maintain. The benefits of using modular programming include: Less code has to be written. inating the need to retype the code many times. ‘A single procedure can be developed for reuse, el Programs can be designed more easily because a small team deals with only a small part of the entire code. It allows many programmers to collaborate on the same application, The code is stored across multiple files. Code is short, simple and easy to understand. Errors can easily be identified, as they are localized to a subroutine or funetion. The same code can be used in many applications. The scoping of variables can easily be controlled Complied by Akfete.A Ml, HARAMBEE UNIVES! Y ADAMA CAMPUS Self-Check 1.1 Directions: Answer all the questions listed below. 1. Choose the best answer (each 1 point) 1. provide a simplified picture of the relationships between the program activities and the desired outcom of the program ‘A. Logic models B. Program planning, C. Program implementation, D. None 2. Logic model is valuable in supporting all the following except one. A. Program planning. B. Program implementation, C. Program monitoring, D. Program exceution. 3. It defines a picture of why and how you believe a program or a policy will work. A. Program planning, B. Program implementation, C. Program logic D. Program monitoring. 4. Weuse a logic mode! for al the following activities except one. ‘A. Brings detail to broad goals. B. Helps identify gaps in program logic and clarify assumptions. CC. Builds understanding and promotes consensus. 1D. Makes implicit underlying beliefs 5. One of the following will be the starting point in many cases you should do before doing any of the actual work of program. A. Design Document B. Coding program C. Testing program L Self-Check 1.2 Written Test Directions: Answer all the questions listed below. 1. Choose the best answer (each 1 point) 1. The aim ofa program of requirements is A. To lay down a clear framework for everyone involved in the project. B. To set the criteria for everyone involved in the project. C. To inform the criteria for everyone involved in the project. D. All Complied by Akfete.A HARAMBEE UNIVES! Y ADAMA CAMPUS 2. Which one is not true about the programming phases? ‘A. Understand the problem B. Plan the logic C. Selection of diagram D. Code the program 3. Which one is not the element of understanding the problem? A. May be the most difficult phase B. Users may not be able to articulate their needs well C. User needs may be changing frequently D. None 4. Testing the program is A. Execute it with sample data and check results B. Identify logic errors and correct them C. Choose test data carefully to exercise all branches of the logic. Dz. All 5. Which onc is a document used in a design or procurement process? A. Program planning B. Setting framework C. Program of requirements D. Monitoring planning Written Test “Answer all the questions listed below, 1. Choose the best answer (each I point) 1. software development method is called. A. Preliminary investigation B. Programming design C. Software life eyele D. Maintenance of program 2. In.which of the following you defining the problem and Suggesting a solution? A. Preliminary investigation B. Design phase C._ Implementation phase D. Testing phase 3. Which one is not a primary activities involved in the analysis phase are as follows: ‘A. Gathering business requirement B. ing process diagrams CC. Performing a detailed analysis D. Documentation of the project Complied by Akfete.A HARAMBEE UNIVESIITY ADAMA CAMPUS ED | 4. Inwhich phase we describe the desired features and operations of the system including business rules, pseudo- code, screen layouts, and other necessary documentatior A. Preliminary investigation B. Design phase C._ Implementation phase D. Testing phase 5. The sequence of computational steps to solve a problem is said to be A. Algorithm B. Data Structure C. Pseudo-code D. D. Procedures 6. The way data are organized in a computer's memory is said to be, A. Algorithm B. Data Structure C. Pseudo code D. Data gathering technique ___is used in planning an algorithm with sketching out the structure of the program before the actual coding takes place. A. Narrative B. Flowchart C. Algorithm D. Pseudo-code 8. Which tools is used to analyze a problem and visualize a solution using the top down design approach? A. RAD B. HIPO chart c. DED D. Data structure 9. This process of modeling is called . A. Data structuring B. abstraction CC. prototyping D. All 10. Which one is not true about DFD? A. DFDs depict flow of data in the system at various levels, B. DED does not contain any control or branch elements. C._DEDs depict flow of control in the system at various levels D. all Complied by Akfete.A HARAMBI yES! ADAMA CAMPUS a Part II: Matching (each 1 point) Mateh from column B to column A. Y Column A Column B 1. Algorism A. Cardinality 2. Graphical representation for an algorithm. B. flowchart 3. Entity C. Diamond 4, It deseribes relationship D. Person 5. It defines the relationship between the entities in terms of numbers _E. Solve problem 6. Computer Aided Software Engineering F.CASE Part III: Write brief answer (5 point each) 1. Draw the flow chart that calculates grade for ten students based on the scale: >80-A, >60-B, > 50-C, >40-D, <40-F. 2. Write a pseudo-code that calculates grade hint mark >=80 grade A, mark >=60 grade B, mark >=50 grade C, mark >=40 grade D, F< 40. 3. Draw the flow chart for enter to gmail Complied by Akfete..

You might also like