1. Software Engineering In this unit, students will be introduced to the most common software development methodologies. They will learn about the life cycle of a system and explain its different phases. Students will also understand the importance of converting high-level programming languages into executable instructions in machine language, and they will learn about the programs used to do this. Ministry of Education 8 2024-1446 Learning Objectives In this unit, you will learn to: > Distinguish the most popular software development methodologies. > Recognize the different stages of the software development lifecycle. > Create a software development life cycle for an application. > Describe the analysis phase of the software development lifecycle. > Recognize different requirement collection methods. > Classify programming languages and their features. > Outline the function of the compiler and the interpreter. > Classify different software development tools. > Explain what a code editor is and what the advantages and challenges of using one are. > Recognize an integrated development environment and explain the advantages and challenges of using one. > Recognize how different software development tools can be used to provide different software solutions.

Lesson 1 Principles of Software Engineering

Software Engineering

Learning Objectives

Lesson 1 Principles of Software Engineering Link to digital lesson www.ien.edu.sa Software Engineering is a branch of computer science that deals with developing and maintaining software systems. It involves the application of engineering principles and practices to software product design, development, testing, and maintenance. Software engineering aims to produce reliable, efficient, and high-quality software that meets the requirements of its stakeholders. This is achieved through systematic and repeatable processes, tools, and techniques. Software engineering also involves the management of the software development process, including project planning, estimation, risk management, and quality assurance. The Software Development Life Cycle (SDLC) The Software Development Life Cycle (SDLC) describes the organization of the production processes for systems in various fields. The aim of the SDLC is not limited to improving the final product, but also extends to the management of the production and development processes and the optimal use of resources during these processes. In this lesson, we will discuss the stages of the SDLC in the context of developing systems for Information and Communication Technology (ICT). The SDLC consists of a series of phases, which are illustrated in the figure. You will discover all the phases of the SDLC through an example of building software for a banking system. Analysis وزارة التعليم Ministry of Education 2024-1446 Evaluation Maintenance Implementation 6 5 1 2 4 ник Testing 3 Design Development Documentation Figure 1.1: The Software Development Life Cycle 9

Lesson 1 Principles of Software Engineering

Software Engineering is a branch of computer

The Software Development Life Cycle (SDLC)

Analysis The first step of the SDLC is to identify the problem that needs to be solved, followed by defining the requirements for its solution as accurately as possible through requirements engineering. Requirements engineering involves analyzing, specifying, validating, and managing the needs and expectations of stakeholders for a software system. It involves understanding the problem domain and determining the functional and non-functional requirements for the software. The difference between functional and non-functional requirements is the following: • Functional Requirements: These are the specific capabilities or features that the software must have to meet its stakeholders' needs. For example, a common functional requirement for an online shopping website is the ability for users to search for products, add them to a shopping cart, and complete a secure checkout. • Non-functional Requirements: These are the constraints and quality attributes the software must meet to be acceptable to its stakeholders. Examples of non-functional requirements include performance requirements (e.g., response time, throughput), security requirements (e.g., data privacy, authentication), and usability requirements (e.g., user-friendly interface). During the analysis process, all resources (human, material, costs, budget, time available and everything else related to the project) must be taken into consideration, and all functions required for the new system must be defined in detail with reference to any limitations that exist. The analysis process involves identifying users, and their needs and requirements. The following tools are most commonly used to collect the required data: • Questionnaires • Interviews • Observation Consider a bank. Its problem is how to establish an electronic system to provide banking services via the Internet. The analysis phase of this project will include collecting data from management and customers about their requirements in order to understand which banking services should be automated, the design required for the user interface, security requirements, digital permissions assigned to bank employees and customers, etc. Design The design phase is the second stage of the SDLC, in which the systems analyst participates in providing expertise and skills for building the structure and designing the solution to the given problem. The design phase defines the different interfaces and data types that are used in the ICT system. More specifically, the following steps are taken: 1. Define the flow of data and information in all aspects of the new system. 2. Determine the main data to be processed. This will define the data structures used by .the systemة التعليم Ministry of Education 10 2024 -1446 B||

Lesson 1 Principles of Software Engineering

Analysis

Design

Consider a bank. Its problem is how to establish an electronic

3. Determine where and how data is stored so that it is accessible and secure. 4. Design reports and other data and information outputs. 5. Design the user interface and define the functions of all the elements in it. 6. Design integration interfaces for data exchange with other ICT systems. 7. Determine the method for testing the system, the data used for testing and how to use these in quality assurance. In the design of an electronic banking system, data flow pathways should be defined between the system and the user and various databases and integrated systems, all of which will depend on the different data types that need to be stored, secured and transferred. The system requirements for data input and output should be defined, and user interfaces for staff and clients should be designed as well as interfaces for data and monetary exchanges with other organizations. Finally, it must be decided what tests must be carried out to ensure the system operates as expected. Development and Testing Next come the development and testing phases. After carrying out detailed analysis and design processes, programmers and system testers must now convert the requirements and specifications into code segments using appropriate programming languages or computer programs. The development and testing phases cannot be separated as the system must be comprehensively tested during and after development to ensure all issues are addressed and that the system reaches its end users as per their requirements. Elements of the system that require independent testing include the following: ник 1. Testing the validity of the entered data: The entry of invalid data may cause problems within the banking system and it is therefore important to test the validity of the entered data. In the example of electronic banking services, this will require the development of security rules for receiving passwords from users and the number of incorrect attempts allowed when entering passwords, rules for verifying the numbers entered into the system, such as phone numbers and personal numbers, and rules specifying the maximum amounts that can be withdrawn or transferred through the system. 2. Testing system functionality and usability: This includes testing the user interface and user experience. For example, for the electronic banking system, this will require the formation of a group of stakeholders to test whether the system and its ...various functions (such as checking balances or making a transaction) are working as they should. وزارة التعليم Ministry of Education 2024-1446 11

Lesson 1 Principles of Software Engineering

Determine where and how data is stored so that it is accessible and secure.

Development and Testing

In the design of an electronic banking system,

وزارة التعليم Ministry of Education 12 2024 -1446 3. Operation Error Testing: This includes testing for logical errors in the code. For example, in the electronic banking system, it may be necessary to test whether the steps to complete a transaction are done logically, and whether the appropriate messages (such as error and confirmation messages) appear at the appropriate steps. 4. Test communication with other systems: This depends on the extent to which the system is linked with other systems. For the electronic banking system, this will require testing that the new system integrates well with other information technology systems in the bank, such as customer databases, currency conversion systems, and automated teller systems. Implementation After obtaining user approval for the new system that has been developed and tested, the implementation phase begins. This is the phase where the theory is converted into practice as the product is put into service. The system is prepared for deployment and installation at the target site in order to be operational and ready for productivity. Implementation may involve training end users to ensure they know how to use and familiarize themselves with the system. The implementation phase may take a long time depending on the complexity of the system. Implementation sometimes requires transferring data from the previous system to the new system. It is often preferable to introduce the new system gradually. If a bank implements a new electronic banking system, the transition may require the deployment of a "beta" version of the system, so that the public can test it and give feedback on the experience, before the final version of the system is implemented. BELL Figure 1.2: Designing and implementing a software product

Lesson 1 Principles of Software Engineering

3. Operation Error Testing:

Implementation

If a bank implements a new electronic banking system,

Figure 1.2: Designing and implementing a software product

Maintenance Maintenance is necessary to eliminate errors in the system during its working life and tune the system to any variations in its working environments. It must meet the scope of any future enhancement, future functionality and any other added functional features to cope with the latest needs. Through user feedback and the evaluation of the IT team, the system is continuously assessed to ensure that it does not become obsolete. Working with the new system means that some small fixes or adjustments will be required. Needs and requirements change regularly, and during this stage the IT team has to keep everything working as expected. In the example of an electronic banking system, once the system is implemented, ongoing maintenance will be required to ensure the system remains functional, secure and up-to-date. Systems require many major and minor software and hardware updates to protect against new security threats, fix unforeseen bugs, and implement new functionality. Some system maintenance can be done automatically, such as automated security updates, but other tasks, such as carrying out hardware updates, may require engineers to be present on site. Documentation The documentation process includes describing all the details of the analysis, design, development, testing, implementation, and maintenance of the system, and is later used to build a knowledge base of how the system works. System documentation is referred to if any change, repair or adjustment is required, and the documentation itself may then need to be updated. Documentation is important in software development because it promotes communication, transparency, maintenance, compliance, training, and legacy. Documentation helps to ensure that the software system is developed consistently and effectively and that it will continue to meet the needs of its intended users over time. Evaluation Each stage of the SDLC must be evaluated. This may involve making some difficult decisions, as a design problem may lead to larger problems later during development or when implementing and using the system. Among the areas that need continuous evaluation are: •••• System efficiency Ease of use and learning · System suitability for the required tasks وزارة التعليم Ministry of Education 2024-1446 Evaluation may be carried out by the following groups to ensure that the system meets the requirements: • IT team • Users • Management 13

Lesson 1 Principles of Software Engineering

Maintenance

Documentation

Evaluation

In the example of an electronic banking system,

SDLC for a Smartphone Application Let's say we want to create a mobile application that provides information about different tourist attractions in KSA. More specifically, the application aims to help elderly people with vision problems or trembling hands to browse on the screen for information on tourist sites to visit in KSA. The application will allow people with vision problems to adjust the font size of the text to suit them so that they can read information easily, and it will also allow those who suffer from shaky hands the opportunity to adjust the size of the buttons to prevent them from incorrectly pressing a button by mistake, and finally, users will be able to change the colors in the application to black and white to facilitate reading and reduce eyestrain. An application destined for smartphones and tablets, for people with vision problems and shaking hands, with adjustable size fonts and buttons. Receiving feedback from users and limiting system problems and maintenance. Maintenance Includes feedback from users وزارة التعليم Ministry of Education 14 2024-1446 Evaluation 6 Analysis || 1 5 4 2 3 Design ник Implementation Development Test then publish the application and train users on how to use it. Testing An application designed for android operating systems, with fixed screen size and with colors. Documentation App Inventor is the main program for the implementation of our application. Figure 1.3: Summary of the SDLC of a smartphone application

Lesson 1 Principles of Software Engineering

SDLC for a Smartphone Application

Based on what you have learned so far in this lesson, the SDLC of this application will include the following phases of Analysis, Design, Development and Testing, Implementation, Maintenance and ongoing Documentation and Evaluation. Analysis: In the analysis phase, we identify the problem that needs solving. The application will be: • Destined for smartphones and tablets. • Designed for people with vision problems. • Designed for people with shaky hands. Based on these requirements, the applications must have adjustable font and button sizes. Also, for people with shaky hands, the buttons must be very big so that they can be easy to press. Design: The design phase will include the determination of all the technical details of our application. More specifically, the technical requirements include: • The application must be designed for Android operating systems. • The size of the screen must be fixed. • It must not have many colors because that would be confusing for the users. Development, Testing, Implementation: In the development and testing phase, software engineers and testers will take the requirements and specifications described in the previous steps and implement them in the working code. For this purpose, we will use App Inventor as our main program for the development of our application. The app will then need to be thoroughly tested before being published on an app store such as Google Play. It may be preferable to begin by releasing a beta version, available to a limited number of users, in order to further test the app before its full release. Maintenance: The maintenance phase will include the procedure of getting feedback from users, in order to use it to improve our application. Through user feedback our application will be continuously assessed to ensure that it does not become obsolete. Small fixes or adjustments will be required. Documentation and Evaluation: Documentation for a mobile application is a set of written materials that provide information about the application, including its design, development, and maintenance. It helps developers, stakeholders, and users understand the application's purpose, functionality, and behavior. Regarding the evaluation, we can gather information from Google Play's ratings and reviews of our application. To document the app, you will need to perform the following steps: • Write a clear document explaining the design of the system. • Add annotations within code sections during the development process. • Document system testing processes. • Prepare a user guide. وزارة التعليم Ministry of Education 2024-1446 15

Lesson 1 Principles of Software Engineering

Based on what you have learned so far in this lesson,

Job Opportunities in Software Engineering Software engineering offers various job opportunities in various domains and industries. The following are some of the most common job opportunities in software engineering: • Web Developer: This role is responsible for developing websites and web applications. • Mobile Developer: This role is responsible for developing mobile applications for iOS or Android platforms. • DevOps Engineer: This role is responsible for automating the deployment and operation of software systems. • Cloud Engineer: This role is responsible for building and maintaining cloud-based software systems. • Database Administrator: This role is responsible for managing and maintaining databases. • Quality Assurance Engineer: This role is responsible for testing software systems to ensure they meet quality standards. • System Administrator: This role is responsible for maintaining and managing computer systems and networks. Software Development Methodologies The process of developing information systems differs from that of writing small programs. Developing large programs such as the systems of government institutions or commercial companies requires great effort and may take months or even years. Understanding customer requirements and the nature of the required system or software functionality is also a challenge for the development team. Software engineering aims to develop workflows, methods and protocols to overcome these difficulties. There are many software development methodologies and each one is used for different purposes. The most common ones are the following. Waterfall Methodology This method is considered one of the oldest methods in software development. It gets its name because its development stages are sequential from one stage to another in a unidirectional manner. When a certain stage in development is completed, the transition to the next stage is carried out without returning to the previous stages. The outputs of each stage represent the inputs for the next stage. وزارة التعليم Ministry of Education 16 2024-1446 Imprum in-app onboarding Trello notification integration mobile Build NPS App загроз Restructure Onboarding flow Trello Allow Chutbat igration Jephs Launch new wabrik Chrome inleyin Githud integrative Figure 1.4: Planning the development of a software product

Lesson 1 Principles of Software Engineering

Job Opportunities in Software Engineering

Software Development Methodologies

The Waterfall Methodology

The waterfall methodology goes through all stages of developing the system sequentially, and each stage depends on the outputs of the stages that precede it, as follows: 1. Analysis stage At this stage, requirements are collected in the ways that were explained earlier, and after completion, they are documented accurately and in detail. They are verified and approved by the customer before the design stage is begun. Changes to the requirements later in the process can cause serious problems in the system. Design Analysis 2. Design stage The requirements documented from the previous stage are translated into a design. that clarifies the structure of the system and identifies its resource needs. The system design reflects how the requirements are implemented from a technical point of view. and the logical sequence of the operations that take place in it. 3. Development stage At this stage, the system is built and programs are written based on the outputs of the design. Implementation Maintenance Development Testing 4. Testing stage Figure 1.5: The stages of waterfall methodology At this stage, testers verify that the system has met the requirements documented in the previous stages, and investigate whether there are any errors to be fixed. The customer sees the real product for the first time at this stage. 5. Implementation stage This is the stage in which the system is implemented and delivered to the client. Users are trained or deployed, and the system's performance is monitored to ensure that there are no errors during the implementation. 6. Maintenance stage This stage includes fixing errors that appear during everyday use of the system as well as making some .developments and improvements to the system التعليم Ministry of Education 2024-1446 17

Lesson 1 Principles of Software Engineering

The waterfall methodology goes through all

Advantages of the Waterfall Methodology in Development: • The stages are clear and specific and do not overlap with each other. • Project planning, management and follow-up is easy due to the clarity of the stages. • It is suitable for small projects whose requirements are clear and stable. Challenges of the Waterfall Methodology: • It is difficult to go back from one stage to the previous stages for modification because each stage depends on the previous one. Going back and making changes to earlier stages greatly affects the next stages and increases the cost of development. • It is not suitable for large and complex systems and software. • It is not suitable for software and systems whose requirements are subject to change. • It is not possible to begin a new stage before the completion of the previous stage. This delays the discovery of any misunderstanding of the client's requirements that may appear in late stages, and makes late-stage modification after that a difficult and costly process and even increases the risk of project failure. Rapid Application Development Methodology (RAD) In contrast to the waterfall methodology, in which the development process takes place through separate phases, the rapid application development methodology relies on development through iterative cycles. The key characteristic of this methodology is the development of prototypes of the system in order to obtain feedback and suggestions from the client in the early stages of development. This helps avoid misunderstanding of requirements and thus avoids the significant cost of returning to modify the system after development has been completed. It is worth noting that these prototypes are modified to become part of the final product. Requirements planning وزارة التعليم Ministry of Education 18 2024-1446 Refine User Design Prototype Test Construction Cutover Figure 1.6: The stages of RAD methodology

Lesson 1 Principles of Software Engineering

Advantages of the Waterfall Methodology in Development:

Rapid Application Development Methodology (RAD)

Challenges of the Waterfall Methodology:

This methodology includes the following stages: 1. Requirements Planning The requirements planning phase in Rapid Application Development (RAD) is the stage in the software development process where the scope and objectives of the software project are defined. The requirements planning phase focuses on ensuring that the software project is well defined and understood and that the resources and schedule needed to complete the project are identified. 2. User Design The user design phase in Rapid Application Development (RAD) is the stage in the software development process where the software requirements and design are created in close collaboration with end users. The user design phase focuses on ensuring that the software application meets the needs and expectations of its intended users. 3. Construction The construction phase in RAD is the stage in the software development process where the software application is developed and built. This phase involves writing code, integrating the various components of the software application, and testing it to ensure it meets the requirements and quality standards. This phase also involves fixing any bugs or issues discovered during testing. The construction phase focuses on efficiently delivering a working software application that meets the requirements defined in earlier stages of the RAD process. 4. Cutover The cutover phase in RAD is the final phase of the software development process, in which the new software application is transitioned into the live production environment. The cutover phase involves a series of activities that must be completed in order to successfully transition the new software application into the production phase and training the users on how to use the application. وزارة التعليم Ministry of Education 2024-1446 Advantages of the Rapid Application Development Methodology • Developers receive end-user feedback continuously from the beginning of the project, which reduces the risk of failure and the cost of modification. • User participation, through their feedback, leads to more efficient software production and reduces the error rate. • The use of iterative cycles and prototyping contributes to reducing the time required for system development. Challenges of the Rapid Application Development Methodology • The development cycle is more complex and must be carefully managed. • Stakeholder interaction in providing insufficient feedback may result in a product that does not meet the desired requirements. It requires highly qualified programmers and designers who are able to get things done quickly. 19

Lesson 1 Principles of Software Engineering

This methodology includes the following stages:

Advantages of the Rapid Application Development Methodology

Challenges of the Rapid Application Development Methodology

Agile Methodology The agile development methodology uses a project delivery method with successive releases called sprints. Each release adds new features to the previous one, and each release goes through all stages of system development from planning to testing and approval by the user. The agile development methodology can be distinguished from the rapid application development methodology because in the agile development methodology a functioning product is presented to the user at each stage. When needed, the product is worked on and modified or new functions are added. This is in contrast to the rapid application development methodology, in which the user is presented with an incomplete prototype in order to give feedback and only then, when all the requirements are fully established is the final product developed. Sprint A sprint is a time-boxed iteration of work in Agile software development that typically lasts one to four weeks. The purpose of a sprint is to deliver a potentially shippable increment of the software product, focusing on meeting the goals and objectives set at the beginning of the sprint. Development Test Feedback SPRINT 1 Design Analysis Release Development Test Feedback Design SPRINT 2 Analysis Development Test Release Feedback Figure 1.7: The stages of Agile methodology Design SPRINT 3 Analysis Release Advantages of the Agile Development Methodology: • Less time needed to achieve the first product release. • Project risks are identified easily through user feedback. • Stakeholder participation in the development of the system gives them more confidence in the developed software or system. Challenges of the Agile Development Methodology: • This methodology focuses more on development and less on documentation. It is therefore difficult to integrate new team members into a project after it has begun. • The response and performance of users affects the speed of production and quality of the product. • A change in project requirements can disrupt the entire project, especially if the user is frequently changing their mind. وزارة التعليم Ministry of Education 20 ZU24-1446 INFORMATION The agile methodology requires effective communication and continuous collaboration between all teams involved in planning, design, development, and user testing.

Lesson 1 Principles of Software Engineering

Agile Methodology

Advantages of the Agile Development Methodology:

The agile methodology requires effective

Sprint

Challenges of the Agile Development Methodology:

1 Exercises Choose the appropriate method that corresponds to each of the following statements: Waterfall methodology 1 Rapid application development 2 Agile methodology 3 وزارة التعليم Ministry of Education 2024-1446 О Product evolution in the form of successive versions. О You cannot move to the next stage without completing the previous one. О It is based on the method of designing and improving prototypes. Not suitable for large and complex systems. О Repeated cycles are used to reduce production time. О The fastest way to get a preview of the real product. 21

Lesson 1 Principles of Software Engineering

Choose the appropriate method that corresponds to each of the following statements:

1 Exercises Choose the appropriate method that corresponds to each of the following statements: Waterfall methodology 1 Rapid application development 2 Agile methodology 3 وزارة التعليم Ministry of Education 2024-1446 О Product evolution in the form of successive versions. О You cannot move to the next stage without completing the previous one. О It is based on the method of designing and improving prototypes. Not suitable for large and complex systems. О Repeated cycles are used to reduce production time. О The fastest way to get a preview of the real product. 21

Lesson 1 Principles of Software Engineering

Compare the three methodologies described in the lesson by their design and implementation phases.

Clarify the role of the user in the three methodologies, with reference to the stage in which this role appears clearly.

5 LO 4 Read the sentences and tick ✓ True or False. 1. Software development refers to the process of planning. 2. The methodology of software development is a framework that is used for many procedures. 3. Software development involves the creation, testing and development of an information system. 4. The procedure of the development of an information system is controlled by the software development methodology that is used. 5. Software development is the process that divides the whole procedure into distinct phases and is also called the software development life cycle (SDLC). وزارة التعليم Ministry of Education 2024-1446 Fill in the blanks for the phases of the SDLC in the following diagram. 1 2 3 7 6 5 4 1 छ । ник 4 </> 2 8 5 6 7 3 8 True False 23

Lesson 1 Principles of Software Engineering

Read the sentences and tick True or False.

Fill in the blanks for the phases of the SDLC in the following diagram.

6 Study the following figure and then answer the questions that follow. Development Test Feedback SPRINT 1 Design Analysis Development Test Release Feedback Design SPRINT 2 Analysis Development Test Release Feedback 1. Which software development methodology is represented by the figure? 2. What is meant by the term sprint? 3. What are two advantages of this methodology? 4. What are two challenges of this methodology? وزارة التعليم Ministry of Education 24 2024-1446 Design SPRINT 3 Analysis Release

Lesson 1 Principles of Software Engineering

1. Which software development methodology is represented by the figure?

2. What is meant by the term sprint?

3. What are two advantages of this methodology?

4. What are two challenges of this methodology?

7 Match each of the following stages of system development with the appropriate processes in each of the following sentences: وزارة التعليم Ministry of Education 2024-1446 Analysis 1 Design 2 Development 3 and testing О Implementation 4 Maintenance 5 О Documentation 6 Evaluation 7 The theory is turned into practice. This eliminates errors in the system during the working life. The requirements and the specifications are converted into effective code. All the details of the new system are defined here. This has to do with the knowledge base which is required for anyone involved to understand how the system works. The problem that needs to be solved is identified. This can be performed not only by the IT team but also by the users and management. 25

Lesson 1 Principles of Software Engineering

Match each of the following stages of system development with the appropriate processes in each of the following sentences:

8 Graphically illustrate how each of the three software development methodologies works. Waterfall methodology Rapid Application Development methodology Agile development methodology وزارة التعليم Ministry of Education 26 2024-1446

Lesson 1 Principles of Software Engineering

Graphically illustrate how each of the three software development methodologies works.

9 Choose the correct answer: Analysis 1. The stage in which data collection tools are used is: Design Implementation Maintenance Design 2. The stage in which a programming language or computer program is used to prepare the system is: Evaluation Development Documentation Analysis 3. The stage in which the user guide for the system is prepared is: Documentation Evaluation 4. In the evaluation phase of the smartphone application: Testing The application is created using the App Inventor program. The user needs are determined. وزارة التعليم Ministry of Education 2024-1446 Feedback is received from users. The application is designed to work on the Android platform. 27

Lesson 1 Principles of Software Engineering

Choose the correct answer: