Technology in Action PDF Textbook

Document Details

HandsDownSamarium

Uploaded by HandsDownSamarium

2021

Alan Evans Kendall Martin Mary Anne Poatsy

Tags

programming computer science software development technology

Summary

This textbook, Technology in Action, explains programming concepts and the programming life cycle. It covers topics such as problem statements, algorithms, and diverse programming languages. Throughout the text, the authors emphasize programming applications and practical examples within various scenarios.

Full Transcript

Every day we face a wide array of tasks. Some tasks are complex. These tasks require creative thought and human touch. But some tasks are candidates for automation with computers—automation achieved through programming. This includes: Tasks that are repetitive. Those that work with...

Every day we face a wide array of tasks. Some tasks are complex. These tasks require creative thought and human touch. But some tasks are candidates for automation with computers—automation achieved through programming. This includes: Tasks that are repetitive. Those that work with electronic information. Those that follow a series of clear steps. 2 A career in programming offers many advantages: Jobs are plentiful. Salaries are strong. Telecommuting is often easy to arrange. If you can’t find an existing software product to accomplish a task, programming is mandatory. Macros can execute a complicated sequence of steps with a single command. 3 Generally speaking, a system is a collection of pieces working together to achieve a common goal. Your body, for example, is a system of muscles, organs, and other groups of cells working together. An information system includes data, people, procedures, hardware, and software that help in planning and decision making. Information systems help run an office and coordinate online-purchasing systems and are behind database-driven applications used by Amazon and Netflix. 4 There are six steps in a system development life cycle (SDLC) model. Corporations form a development committee to evaluate proposals. Analysts explore the problem, develop a program specification, define user requirements, and recommend a plan of action. A plan using flowcharts and data-flow diagrams helps programmers. Program development begins next. Testing and installing the program ensure it works properly. Program performance is monitored to determine whether the program is meeting the needs of end users. 5 Programming is the process of translating a task into commands that a computer uses to perform a task. Program development life cycle (PDLC) is the process of moving through the stages a project goes through from development to deployment. 6 The problem statement is the starting point of programming. It provides a clear description of tasks to be performed. It helps the programmer understand goals of programming. The goal of a good problem statement is to have programmers interact with users in these three areas: Data is the raw input that users have at the start of the job. Information is the result needed at the end of the problem. Method is the process of converting inputs into proper outputs. 7 Error handling describes what the program should do if the input is invalid. A testing plan lists specific input numbers expected to be entered by users and lists output values that a program would return for those input values. 8 An algorithm is a set of steps that describe what a program must do to complete its task. Algorithms can be represented through flowcharts. They provide visual representations of patterns. Pseudocode is a text-based approach to documenting an algorithm. 9 Flowcharts use symbols to provide a visual representation of the patterns the algorithm. This figure shows the flowcharting symbols. 10 Algorithms include decision points, which are places where the program must choose from a list of actions based on the value of a certain input. Binary decisions are questions that can be answered with either yes (true) or no (false). With loops, when a question is asked, i the answer is yes, actions are performed. Once the actions have finished, the question is asked again, creating a loop. When the answer is no, the algorithm moves to the first step that follows the loop. 11 Top-down design is an approach in which a problem is broken into a series of high-level tasks. In this figure: A. The top-down design is applied to the highest level of tasks in our parking garage example, B. The tasks are further refined into subtasks, and C. Subtasks are refined into a sequence of instructions—an algorithm. 12 In object-oriented analysis, programmers first identify all the categories of inputs the program is meant to solve. These categories are called classes. An important aspect of object-oriented design is that it leads to reusability. Inheritance means that a new class can automatically pick up all the data and methods of an existing class and then can extend and customize those to fit its own specific needs. The original class is called the base class, and the new, modified class is called the derived class. Programmers may need to create several different examples of a class. Each of these examples is an object. As seen in the figure, John Doe, Jane Doe, and Bill McGillicutty are Employee objects (specific examples of the Employee class). 13 Translating an algorithm into a programming language is called coding. Once programmers create an algorithm, they select the best programming language for the problem and then translate the algorithm into that language. Translating an algorithm into a programming language is the act of coding. Once programmers have an algorithm, they identify the key pieces of information the algorithm uses to make decisions. Then they convert the algorithm into computer code in a specific programming language. 14 A programming language is a kind of “code” for the set of instructions the CPU knows how to perform. Computer programming languages use special words and strict rules so that programmers can control the CPU without having to know all of its hardware details. There are five generations of languages. 15 Portability is the capability to move a solution from one type of computer to another. Variables are the input and output a program manipulates. Variable declarations tell the system to allocate space in RAM. Comments are added to explain the purpose of a section of code. 16 Compilation is the process by which code is converted into machine language—the language the CPU can understand (1s and 0s). A compiler is a program that understands both the syntax of the programming language and the exact structure of the CPU. An interpreter translates the source code into an intermediate form, line by line. Each line is executed as it’s translated. The finished program runs faster than an interpreter. 17 An integrated development environment (IDE) is a developmental tool that helps programmers write and test their programs. 18 Debugging is the process of running the program over and over to find and repair errors and to make sure the program behaves in the way it should. A complete testing plan includes sample inputs that exercise all the error handling required as well as all the processing paths. Logical errors in the problem are caught when the program executes. Runtime errors include issues like dividing by zero. 19 In internal testing, a group uses the program in every possible way. In external testing, people like those who will use the software work with it. Before commercial release, software is often provided in a beta version to test sites or to interested users. Releasing to other manufacturers is called release to manufacturers (or RTM). Documentation is created. Finally, the product is in general availability (or GA) and can be purchased by the public. 20 One quick way to determine which languages are popular is to examine job postings for programmers. As of this presentation, the languages most in demand include C/C++ and Java. In specific industries, certain languages tend to dominate the work. A good introductory programming course will emphasize many skills and techniques. You should find a course that emphasizes design, algorithm development, debugging techniques, and project management. 21 A programming team considers several factors before selecting the language it will use for a specific project: Space available, Speed required, Organizational resources available, and Type of target application. Visual programming languages, like Scratch and App Inventor, use graphical blocks to represent control elements and variables. Programming consists of clicking together these blocks to define program behavior. 22 Java and C# were developed to collect information from networked computers. They are architecture neutral. C# competes with Java. Objective C is the language most often used to program applications to run under macOS. It’s an object-oriented style of language. Swift is a new programming language introduced by Apple for developing for iOS and macOS. 23

Use Quizgecko on...
Browser
Browser