Computer Programming: Systems Development Life Cycle PDF

Summary

This document provides an overview of the Systems Development Life Cycle (SDLC) in computer programming. It covers the key phases of planning, analysis, design, development, testing, implementation, and maintenance. The document also introduces program design aspects within a project. It is suitable for students and aspiring programmers.

Full Transcript

**PART 1:INTRODUCTION TO PROGRAMMING** **Systems Development Life Cycle** The **Systems Development Life Cycle** describes a process for planning, creating, testing, and deploying an information system. It is a project management model used to outline, design, develop, test, and deploy an informat...

**PART 1:INTRODUCTION TO PROGRAMMING** **Systems Development Life Cycle** The **Systems Development Life Cycle** describes a process for planning, creating, testing, and deploying an information system. It is a project management model used to outline, design, develop, test, and deploy an information system or software product. In other words, it defines the necessary steps needed to take a project from the idea or concept stage to the actual deployment and further maintenance. **1. PLANNING STAGE** *What Are the Existing Problems?* -**Planning** is one of the core phases of SDLC. It acts as the foundation of the whole SDLC scheme and paves the way for the successful execution of upcoming steps and, ultimately, a successful project launch. In this stage, the problem or pain the software targets is clearly defined. -At its core, the planning process helps identify how a specific problem can be solved with a certain software solution. Crucially, the planning stage involves analysis of the resources and costs needed to complete the project, as well as estimating the overall price of the software developed. **2. ANALYSIS STAGE** *What do we want?* -Once the planning is done, it's time to switch to the research and analysis stage. In this step, you incorporate more specific data for your new system. This includes the first system prototype drafts, market research, and an evaluation of competitors. -To successfully complete the analysis and put together all the critical information for a certain project, developers should do the following: Generate the system requirements. Evaluate existing prototypes. Conduct market research. Set concrete goals. **3. DESIGN STAGE** *What Will the Finished Project Look Like?* \- The next stage of a system development project is design and prototyping. This process is an essential precursor to development. It is often incorrectly equated with the actual development process but is rather an extensive prototyping stage. \- This step of the system development life cycle can significantly eliminate the time needed to develop the software. It involves outlining the following: The system interface Databases Core software features User interface and usability Network and its requirement **4. DEVELOPMENT STAGE** *Let's Create the System* \- In the development stage of SDLC, the system creation process produces a working solution. Developers write code and build the app according to the finalized requirements and specification documents. \- This stage includes both front and back-end development. DevOps engineers are essential for allocating self-service resources to developers to streamline the process of testing and rollout, for which CI/CD is typically employed. **5. INTEGRATION AND TESTING STAGE** *Is It the Exact One We Needed?* \- The testing stage ensures the application's features work correctly and coherently and fulfill user objectives and expectations. -This process involves detecting the possible bugs, defects, and errors, searching for vulnerabilities, etc., and can sometimes take up even more time compared to the app-building stage **6. IMPLEMENTATION STAGE** *How Will We Use It?* \- Once the product is ready to go, it's time to make it available to its end users and deploy it to the production environment. At this stage, the software undergoes final testing through the training or pre-production environment, after which it's ready for presentation on the market. \- It is important that you have contingencies in place when the product is first released to market should any unforeseen issues arise. **7. MAINTENANCE STAGE** *Let's Make the Improvements* \- The last but not least important stage of the SDLC process is the maintenance stage, where the software is already being used by end-users. \- During the first couple of months, developers might face problems that weren't detected during initial testing, so they should immediately react to the reported issues and implement the changes needed for the software's stable and convenient usage. \- This is particularly important for large systems, which usually are more difficult to test in the debugging stage. \- Automated monitoring tools, which continuously evaluate performance and uptime and detect errors, can assist developers with ongoing quality assurance. This is also known as "instrumentation." **6 BASIC SDLC METHODOLOGIES/MODELS** ![](media/image8.png)![](media/image7.png)![](media/image5.png) **PART 1: INTRODUCTION TO PROGRAMMING** **Program Design** Program design consists of the steps a programmer should do before they start coding the program in a specific language. These steps when properly documented will make the completed program easier for other programmers to maintain in the future. There are three broad areas of activity: Understanding the Program Using Design Tools to Create a Model Develop Test Data **Understanding the Program** If you are working on a project as one of many programmers, the system analyst may have created a variety of documentation items that will help you understand what the program is to do. These could include screen layouts, narrative descriptions, documentation showing the processing steps, etc. If you are not on a project and you are creating a simple program you might be given only a simple description of the purpose of the program. Understanding the purpose of a program usually involves understanding its: Inputs Processes Outputs **Using Design Tools to Create a Model** The **first modeling tool you will usually learn is pseudocode.** You will document the logic or algorithm of each function in your program. At first, you will have only one function, and thus your pseudocode will follow closely the IPO approach above. There are also several methods or tools for planning the logic of a program. They include ***flowcharting, hierarchy or structure charts, pseudocode, HIPO, Nassi-Schneiderman charts, Warnier-Orr diagrams, etc.*** Programmers are expected to be able to understand and do flowcharting and pseudocode. **Develop Test Data** Test data consists of the programmer providing some input values and predicting the outputs. This can be quite easy for a simple program and the test data can be used to check the model to see if it produces the correct results. **PART 1: INTRODUCTION TO PROGRAMMING** **Program Quality** \- **Program quality** describes fundamental properties of the program's source code and executable code, including reliability, robustness, usability, portability, maintainability, efficiency, and readability. \- Whatever the approach to development may be, the final program must satisfy some fundamental properties. The following properties are among the most important: Reliability Robustness Usability Portability Maintainability Efficiency Readability **Reliability** - how often the results of a program are correct. This depends on the conceptual correctness of algorithms, and minimization of programming mistakes, such as mistakes in resource management. **Robustness** - how well a program anticipates problems due to errors **(not bugs)**. This includes situations such as incorrect, inappropriate or corrupt data, unavailability of needed resources such as memory, operating system services and network connections, user error, and unexpected power outages. **Usability** - the ergonomics of a program: the ease with which a person can use the program for its intended purpose or in some cases even unanticipated purposes. This involves a wide range of textual, graphical and sometimes hardware elements that improve the clarity, intuitiveness, cohesiveness, and completeness of a program's user interface. **Portability** - the range of computer hardware and operating system platforms on which the source code of a program can be compiled/interpreted and run. **Maintainability** - the ease with which a program can be modified by its present or future developers in order to make improvements or customizations, fix bugs and security holes, or adapt it to new environments. **Efficiency** - the measure of system resources a program consumes (processor time, memory space, slow devices such as disks, network bandwidth and to some extent even user interaction): the less, the better. This also includes careful management of resources, for example cleaning up temporary files and eliminating memory leaks. **Readability** - the ease with which a human reader can comprehend the purpose, control flow, and operation of source code. Readability is important because programmers spend the majority of their time reading, trying to understand and modifying existing source code, rather than writing new source code. Unreadable code often leads to bugs, inefficiencies, and duplicated code **PART 1: INTRODUCTION TO PROGRAMMING** **Pseudocode** **Pseudocode** is an informal high-level description of the operating principle of a computer program or other algorithm. **Pseudo** means **false;** thus **pseudocode** means **false code**. Pseudocode is fake. It looks like real code, but it is NOT real code. **It uses English statements to describe what a program is to accomplish.** It is fake because no compiler exists that will translate the pseudocode to any machine language. Pseudocode is used for documenting the program or module design (also known as the **algorithm**). Example: We want to be able to enter the ages of two people and have the computer calculate their average age and display the answer. **Input:** display a message asking the user to enter the first age get the first age from the keyboard/user display a message asking the user to enter the second age get the second age from the keyboard/user **Process:** calculate the answer by adding the two ages together and dividing by two (age1 + age2) / 2 **Output:** display the answer on the screen pause so the user can see the answer Example: We want to be able to get the name and grades of the student for his 2 subjects during the midterm and another 2 subjects during the final term and display his final weighted average grade. **Input:** display a message asking the user to enter his name get the name of the user display a message asking the user to enter his grade for midterm subject 1 get the midterm subject 1 grade from the user display a message asking the user to enter his grade for midterm subject 2 get the midterm subject 2 grade from the user display a message asking the user to enter his grade for final subject 1 get the final subject 1 grade from the user display a message asking the user to enter his grade for final subject 2 get the final subject 2 grade from the user **Process:** calculate the answer by adding first the grades for the midterm and divide it by two to get the midterm average (midterm grade1 + midterm grade 2) / 2 = midterm average then, calculate the final term average by adding the grades for final term, and divide it also by two (final grade1 + final grade2) / 2 = final term average now, compute the final weighted average grade by adding the midterm average and final term average and divide it by two (midterm average + final term average) / 2 = final weighted average grade) **Output:** display the output (average) on the screen pause so the user can see the answer **PART 1: INTRODUCTION TO PROGRAMMING** **Flowcharts** A flowchart is a type of diagram that represents an algorithm, workflow or process. The flowchart shows the steps as boxes of various kinds, and their order by connecting the boxes with arrows. This diagrammatic representation illustrates a solution model to a given problem. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields. **Simple Flowcharting Symbols** **Terminal** -The rounded rectangles, or terminal points, indicate the flowchart's starting and ending points. **Flow lines** -Lines (sometimes with arrows) that connect the various flowcharting symbols. Note: The default flow is left to right and top to bottom (the same way you read English). To save time, arrowheads are often only drawn when the flow lines go contrary the normal. **Input / Output** -The parallelograms that designate input or output operations. **Process** -The rectangle depicts a process such as a mathematical computation, or a variable assignment. **Decision** -The diamond is used to represent the true/false statement being tested in a decision symbol. **PART 1: INTRODUCTION TO PROGRAMMING** **Integrated Development Environment** An **integrated development environment (IDE)** is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools, and a debugger. Most modern IDEs have intelligent code completion. Some IDEs contain a compiler, interpreter, or both. **Compiler vs Interpreter** **Compiler:** A compiler translates code from a high level programming language into machine code before the program runs. **Interpreter:** An interpreter translates code written in a high-level programming language into machine code line-by-line as the code runs. A compiler translates code written in a high-level programming language into a lower-level language like assembly language, object code and machine code (binary 1 and 0 bits). It converts the code ahead of time before the program runs, while an interpreter translates the code line-by-line when the program is running. **PART 1: INTRODUCTION TO PROGRAMMING** **Debugging** Despite our best efforts at becoming perfect programmers, we will create errors. Solving these errors is known as **debugging** your program. **Debugging** is the process of finding, isolating and resolving coding errors known as **bugs** in software programs. **Debugging** helps uncover the cause of coding errors, prevent software function issues and improve the overall performance of software. **Common Errors in Programming** **SYNTAX ERROR** -Syntax errors are the coding equivalent of grammatical errors. The key difference is that while people can still communicate even if grammatical errors are made, computers cannot communicate with syntax errors. This means that even a small error in coding will keep a program from running. **RUNTIME ERROR** -Unlike syntax errors, runtime errors occur when an end-user is working with your program. With this type of error, the program works correctly for developers but for some reason, it doesn't work for users. This is often because the web server they're using has some sort of different configuration, but it can also be caused by the user interacting with the program in an unforeseen way. **LOGIC ERROR** \- Logic errors are often the most difficult problems to identify. Unlike a syntax error that keeps the program from working, with a logic error, the program still works, it just doesn't work the way you want it to. The basic idea here is that all the coding is done correctly, but the program just does the wrong thing. **ARITHMETIC ERROR** \- Arithmetic errors are exactly what you would expect - a programming issue that involves a mathematical error. The most common is a division equation that involves dividing by zero. For example, if the parameters in your system allow for the range of numbers to go down to zero, it can result in the program being asked to do something impossible, such as divide by zero. \- Arithmetic errors can lead to both logic and run-time errors, frustrating for both users and developers. Functional tests, including testing edge cases, are the best ways to avoid arithmetic errors in your programs. **PART 1: INTRODUCTION TO PROGRAMMING** **Version Control** **Version control**, also known as revision control or source control, is the management of changes to documents, computer programs, large websites, and other collections of information. Each revision is associated with a timestamp and the person making the change. Revisions can be compared, restored, and merged with some types of files. Version control systems (VCS) most commonly run as standalone applications, but may also be embedded in various types of software, including integrated development environments (IDEs). Version control allows you to: Track developments and changes in your files Record the changes you made to your file in a way that you will be able to understand later Experiment with different versions of a file while maintaining the original version 'Merge' two versions of a file and manage conflicts between versions Revert changes, moving 'backward' through your history to previous versions of your file **Git** is one of the most popular example of version control system Free public git repositories are available from: Bitbucket GitHub **PART 2: DATA AND OPERATIONS** **Constant and Variables** A **constant** is a data item whose value cannot change during the program's execution. Thus, as its name implies -- the value is constant. **constant PI = 3.14159** A **variable** is a data item whose value can change during the program's execution. Thus, as its name implies -- the value can vary. **variable value = 3** **Literals** -Literals are the actual values that are directly written into your code to represent specific data. They are used to provide initial values for variables, as operands in expressions, or as direct values in statements. 21 12.34 \'A\' \"Hello world!\" false Null **PART 2: DATA AND OPERATIONS** **Identifier Names** Within programming, a variety of items are given descriptive names to make the code more meaningful to us as humans. These names are called **"Identifier Names"**. Constants, variables, type definitions, functions, etc. when declared or defined are identified by a name. These names follow a set of rules that are imposed by: 1\. the language's technical limitations 2\. good programming practices 3\. common industry standards for the language **Technical to Language** Use only allowable characters (in many languages the first character must be alphabetic or underscore, can continue with alphanumeric or underscore) Can't use reserved words Length limit These attributes vary from one programming language to another. The allowable characters and reserved words will be different. The length limit refers to how many characters are allowed in an identifier name and often is compiler dependent and may vary from compiler to compiler for the same language. **Industry Rules** Almost all programming languages and most coding shops have a standard code formatting style guide programmers are expected to follow. Among these are three common identifier casing standards: c**amelCase** -- each word is capitalized except the first word, with no intervening spaces **PascalCase** -- each word is capitalized including the first word, with no intervening spaces **snake\_case** -- each word is lowercase with underscores separating words C++, Java, and JavaScript typically use camelCase, with PascalCase reserved for libraries and classes. C\# uses primarily PascalCase with camelCase parameters. **Python uses snake\_case for most identifiers.** In addition, the following rules apply: Do not start with an underscore (used for technical programming) CONSTANTS IN ALL UPPER CASE (often UPPER\_SNAKE\_CASE). **PART 2: DATA AND OPERATIONS** **Data Types** A **data type** is a classification of data which tells the compiler or interpreter how the programmer intends to use the data. Most programming languages support various types of data, including integer, real, character or string, and Boolean. **DATA TYPES** **Integer (int)** represent numeric data type for numbers without fractions ( 300, 0 , -300 ) **Floating Point (float)** represent numeric data type for numbers with fractions ( 34.67, 56.99, -78.09 ) **Character (char)** represent single letter, digit, punctuation mark, symbol, or blank space ( a , 1, ! ) **String (string)** Sequence of characters, digits, or symbols---always treated as text ( Hello, please, help, I'm, under, the, water ) **Boolean (bool)** True or false values ( true- 1, false- 0 ) ![](media/image1.png) **PART 2: DATA AND OPERATIONS** **Order of Operations** The **order of operations** (or operator precedence) is a collection of rules that reflect conventions about which procedures to perform first in order to evaluate a given mathematical expression. **Operator Precedence Chart** ** Parentheses** ** Exponents** ** Multiplication / Division** ** Addition / Subtraction** **PART 2: DATA AND OPERATIONS** **Arithmetic Operations** The basic arithmetic operations are addition, subtraction, multiplication, and division. Arithmetic is performed according to an order of operations. **Addition +** **Subtraction -** **Multiplication \*** **Division /** **Modulus %** **PART 2: DATA AND OPERATIONS** **Assignment Operators** An **assignment statement** sets and/or re-sets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable. The assignment operator allows us to change the value of a modifiable data object (variable). It is associated with the concept of moving a value into the storage location. Within most programming languages the **symbol used for assignment is the equal symbol.** The **assignment operator has two operands**. The one to the **left of the operator is usually an identifier name for a variable. The one to the right of the operator is a value.** **age = 21** **num1 = 20** **num2 = 40** **sum = 15 + 12** **product = num1 \* num2** **PART 2: DATA AND OPERATIONS** **Arithmetic Assignment Operators** Many programming languages support a combination of the assignment (=) operators (+ , -, \* , = ) and arithmetic / , % ). Various textbooks call them "compound assignment operators" or "combined assignment operators". Their usage can be explained in terms of the assignment operator and the arithmetic operators. **age += 14 ; age = age + 14 ;** **age - = 14 ; age = age - 14 ;** **age \*= 14 ; age = age \* 14 ;** **age /= 14 ; age = age / 14 ;** **age % = 14 ; age = age % 14 ;** **PART 2: DATA AND OPERATIONS** **Data Type Conversion** **IMPLICIT TYPE CONVERSION** In Implicit type conversion of data types in Python, the Python interpreter automatically converts one data type to another without any user involvement. The Python interpreter automatically performs Implicit Type Conversion as Python prevents Implicit Type Conversion from losing data. num1 = 20 height = 5.7 name = Simon temp = 20.1 **EXPLICIT TYPE CONVERSION** In Explicit Type Conversion in Python, the data type is manually changed by the user as per their requirement. With explicit type conversion, there is a risk of data loss since we are forcing an expression to be changed in some specific data type. This conversion is sometimes called "type casting". **a = 5** **b = 7** **c = float (a + b)** **name = input ("Enter name: ")** **print ("Your name is: ", name)** **age = input ("Enter age: ")** **print ("Your age is: ", age)** **age = int (input ("Enter age: "))** **Introduction to Python Programming** **(Slides Presented on the Recorded Session)** **Who Created Python?** Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. *Guido van Rossum* Guido van Rossum created Python in 1990 while working at CWI in Amsterdam. He was the language\'s BDFL until he stepped down in 2018. He has held various tech jobs, including Senior Staff Engineer at Google and Principal Engineer at Dropbox. He is currently a Distinguished Engineer at Microsoft, where he is still actively involved in Python\'s development. Born and raised in the Netherlands, he moved to the US in 1995 and currently lives with his family in the Bay Area. **Python is used for:** **1. web development (server-side),** **2. software development,** **3. mathematics,** **4. system scripting.** **What can Python do?** 1\. Python can be used on a server to create web applications. 2\. Python can connect to database systems. It can also read and modify files. 3\. Python can be used to handle big data and perform complex mathematics. 4\. Python can be used for rapid prototyping, or for production ready software development. **Python Syntax vs Other Programming Languages** 1\. Python was designed for readability, and has some similarities to the English language with influence from mathematics. 2\. Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses. 3\. Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly-brackets for this purpose. **BASIC PYTHON PROGRAMMING** **Variables** Variables are used to store data values. A variable is essentially a name that refers to a location in memory where a value is stored. The value of a variable can be changed throughout the program. **Important Points on VARIABLES** You don\'t need to declare a variable type explicitly. Python determines the type based on the value assigned to it. Variables are assigned values using the = operator. The type of a variable is inferred from the value assigned to it. You can reassign a different value to a variable at any time. Variable names must start with a letter or an underscore (\_), and can contain letters, numbers, and underscores. Variable names are case-sensitive. **Data Types** ** int for integers (example = 1)** ** float for floating-point numbers (example 1.25)** ** str for strings (example = "PUP Grad School)** ** bool for Booleans (example = True)** **Python Tuple ( )** A tuple in Python is an **ordered and immutable (unchangeable) collection of items.** Like lists, tuples can hold a sequence of items, which can be of any data type (integers, strings, other tuples, etc.). However, unlike lists, you cannot modify the contents of a tuple. **my\_tuple = (10, 20, 30, 40, 50)**

Use Quizgecko on...
Browser
Browser