Premium Essay

Programming Ch3

In:

Submitted By kevinthomas1995
Words 1062
Pages 5
1. Structured programs use spaghetti code logic. | a. | True | | b. | False | | | |

2. In a selection structure, you perform an action or task, and then you perform the next action in order. | a. | True | | b. | False | | | |

3. Repetition and sequence are alternate names for a loop structure. | a. | True | | b. | False | | | |

4. In a structured program, any structure can be nested within another structure. | a. | True | | b. | False | | | |

5. A structured program must contain a sequence, selection, and loop structure. | a. | True | | b. | False | | | |

6. Because you may stack and nest structures while retaining the overall structure, it might be difficult to determine whether a flowchart as a whole is structured. | a. | True | | b. | False | | | |

7. As a general rule, an eof question should always come immediately after an input statement because the end-of-file condition will be detected at input. | a. | True | | b. | False | | | |

8. Structured programming is sometimes called goto-less programming. | a. | True | | b. | False | | | |

9. No matter how complicated it is, any set of steps can always be reduced to combinations of the two basic structures of sequence and loop. | a. | True | | b. | False | | | |

10. The case structure is a variation of the sequence structure and the do loop is a variation of the while loop. | a. | True | | b. | False | | | |

11. Programs that use _____ code logic are unstructured programs that do not follow the rules of structured logic. | a. | case | b. | loop | | c. | spaghetti | d. | nested | | | |

12. With a(n) ____, you perform an action or task, and then you perform the next action, in order. | a. | ordered structure | b. |

Similar Documents

Free Essay

29:623:311:01-08 Product & Opns Mgmt (Spring 2016)

...29:623:311:01-08 Product & Opns Mgmt (Spring 2016) Instructor: Sheema Mirchandani Email: sheemam@andromeda.rutgers.edu Lecture: Mon/Thurs 8:30 AM – 9:50 AM Room CON100 Recitation: (Check your section time) Course Website: http://blackboard.rutgers.edu COURSE DESCRIPTION Key quantitative techniques essential for analyzing and improving business operations. Spreadsheet modeling of business decision problems, both with and without data uncertainty. Linear and integer programming optimization models. Elementary applied probability modeling and Monte Carlo simulation. COURSE MATERIALS Required Textbook(s): Introduction to Management Science, 11/E (Available in Book Store) Bernard W. Taylor ISBN - 10: 0132751917 ISBN - 13: 9780132751919 Course items in Blackboard LEARNING GOALS AND OBJECTIVES LGO1. Students will understand and be able to apply Key quantitative techniques essential for analyzing and improving business operations A. Students will be able to use spreadsheet modeling of business decision problems, both with and without data uncertainty in preparing assignments, projects, or term papers in other courses in the functional area business disciplines as well as in research projects in the workplace. B. Students will be able to employ spreadsheet software (e.g. Microsoft Excel) as a tool to assist in the solution of business problems. C. Students will have an awareness of ethical issues in conducting research, in optimization...

Words: 1655 - Pages: 7

Premium Essay

Word

...be exact, of all American adults have a smartphone (Mobile Technology Fact Sheet, 2014). One of the biggest draws to a smartphone is the ability to download and use mobile applications. Because of the widespread adoption of mobile communicating devices, the demand for creating new ways to develop exciting, fun and innovative mobile applications is prominent. Apple Inc., a global electronics juggernaut, has been one of the leading pioneers of this groundbreaking new forefront. In the fall of 2014, Apple introduced a new programming language for their mobile operating system, iOS. Swift combines the best of Apple’s previous language “C” with safe programming patterns and modern features (The Swift Programming Language, n.d.). Swift is known for being the most modern, safe, fast and powerful programming language that is available for the iOS operating system. With the decades of experience at Apple, the have created the most modern and relevant programming language on the market. It was created to make the code used to develop apps easier to read and maintain. Because of this easier way of writing code, programmers are less apt to make mistakes which will lead to less bugs and glitches in applications (Introducing Swift, n.d.). The revolutionary language was designed to be the safest language ever. “Variables are always initialized before use, arrays and integers are checked for overflow, and memory is managed automatically.” (Introducing Swift, n.d.) Using Swift, one character...

Words: 545 - Pages: 3

Premium Essay

Medical Store Management System

...TOPIC: MEDICAL STORE MANAGEMENT SYSTEM 1 |Page ACKNOWLEDGEMENT Completing a task is never a one man effort. It is often the result of valuable contribution of a number of individuals in a direct or indirect manner that helps in shaping and achieving an objective. It is very difficult for anyone to complete a project without the active cooperation and the benefit of the advice from the people who are experts in their field of specialization. The satisfaction and euphoria that accompanies the successful completion of any task would not be complete without the mention of the people who made it possible With due honor, We want to thank all the personalities who made us able to do this interesting work. First of all we would like to thank lovely professional university for giving us this opportunity to carry out this minor project at their esteemed institution. We are grateful to our honorable faculty who provided all the facility. 2 |Page INDEX 1. Project proposal 2. Software development cycle requirements 3. Software development cycle 4. Coding. 5. Testing and debugging. 6. Maintenance and redesigning. 7. References. 3 |Page PROJECT PROPOSAL A transfer is a lateral move to a position in the same classified pay range (classified position) or to a position with comparable duties and responsibilities (non-classified positions). Eligibility:All non-faculty employees are eligible for transfer after being employed in their present position for atleast three...

Words: 1202 - Pages: 5

Free Essay

Management

...1802 marian@ dcs.shef.ac.uk Abstract This paper presents an early empirical study on Extreme Programming practices employing a qualitative action research method. The study was conducted on university students doing real commercial development projects to gain an insight into the problems faced by the new developers in adopting these agile practices. The aim of the study was to investigate the effects of the XP practices on the quality of software developed. What emerged from the analysis was the positive relationship between number of XP practices employed and the quality of software delivered as perceived by the clients. Keywords Agile methodology, action research, contentanalysis, empirical study, Extreme Programming, positivist approach, qualitative, XP teams and traditional methods teams but for the purpose of this study, focus was only made on the XP project teams. METHODOLOGY Respondents The Software Hut class consists of the 2nd year undergraduate students from Computer Science and Engineering degrees, and 3rd year students from Math and Computer degree. The computer science students were required to complete all the subjects in Level 1 and the first semester of Level 2 subject before enrolling in the Software Hut class. The subjects which are related to the Software Hut projects are Introduction to Programming, Requirement Engineering, Object Oriented Programming and System Design and Testing modules in the...

Words: 3439 - Pages: 14

Premium Essay

Linear Optimization

...Values of the decision variables must be chosen such that the inequality constraints are all satisfied while either maximizing or minimizing the desired performance variable. These models can contain tens, hundreds, or thousands of decision variables and constraints. Linear Optimization Very efficient search techniques exist to optimize constrained linear models. constrained These models are historically called linear programs linear (LP). In this chapter we will: 1. Develop techniques for formulating LP models 2. Give some recommended rules for expressing LP models in a spreadsheet that facilitates application of Excel’s Solver 3. Use Solver to optimize spreadsheet LP models Formulating LP Models Every linear programming model has two important features: Objective Function Constraints A single performance measure to be maximized or minimized (e.g., maximize profit, minimize cost) Constraints are limitations or requirements on the set of allowable decisions. Constraints may be further classified into physical, economic, or policy limitations or requirements. Formulating LP Models The first step in model formulation is the development of the constraints. For example: Investment decisions are restricted by the amount of capital and government regulations. Management decisions are restricted by plant capacity and availability of resources. Staffing and flight plans of an airline are restricted by the maintenance needs of...

Words: 4037 - Pages: 17

Premium Essay

Code

...Pseudocode syntax, descriptions and examples Overview: This table provides a reference for commonly used pseudocode for introductory computer program design courses. You should use this as your reference and copy and paste code examples into your projects to ensure you are using proper syntax. Be sure to indent your code to make it more readable and use modify and enhance from the examples as needed. Also, capitalize the first letter of your pseudocode (e.g. While, not while). Pseudocode Write/Prompt Description Displays messages and other information on the screen Flowchart equivalent Write “What is your name?” Input Pauses execution, allowing the user to enter data Input FirstName Input FirstName Compute/Set Assigns a value to a variable Set Avg=(num1+num2)/2 Declare Example usage Write “What is your name?” Write “Your name is “ +YourName + “.” Prompt for ItemName, Price, Quantity Declares a variable to be of a specific type Input Number1, Number2 Compute average value: Set Avg= (num1 + num2)/2 Compute total cost: Set TotalCost= 1.25*Songs Declare FirstName As String Declare FirstName as String Declare Num1, Num2 As Integer Possible datatypes may include: String 1 Call Requests a module, subprogram, or function be executed Call WriteNums(num1, num2)) If End If Tests if a condition is met. If the test condition is true, the statements are executed. Enter Is Number < 5? Character Integer Float Main Module Write “Enter 2 numbers” Input Num1,Num2 Call WriteNums(num1...

Words: 712 - Pages: 3

Premium Essay

Personal Learning Management

...This part of the project is all about planning the overall project. As instructed, a Visual Logic flowchart was designed, as well as a pseudo code for the project. As in most cases, these things are living plans, meaning that they are not written in concrete. As the need arrives, the code and flowchart can be modified to better fit the desired outcome. The pseudo code consists of three string variables, five number variables, three arrays, and a Boolean variable. The string variables are mainly for the use of storing data which will be used for searching the arrays or for storing new types of information in the array. The number variables are being used mainly for the option of making choices. This program has a few choices where the user can go one of two ways. For example, in the beginning, they can choose whether they would like to add new data or view already stored data. That will be determined by the variable “choice1”. The variable “choice2” will allow for the user to make a choice depending on the choice they made for “choice1”. The last choice variable , “choice3”, is used only to allow the user to determine whether they are done using the program or not. A very important variable called “count” will store the number of data entries the user has inputted. This will come in handy when traversing the arrays. The variable “i” is only used for use in the For loops and referencing the array. There are three arrays in the program. The “informationGenre[]”...

Words: 481 - Pages: 2

Free Essay

Programming Solution Proposal

...Programming Solution Proposal Donald L. Smith PRG/211 June 24, 2013 Jack Warner Programming Solution Proposal The McBride Financial Services Company, a part of the Virtual Organizations, needs a computer program to calculate mortgage payments in their agent field offices. The agents want to input a mortgage loan amount, an interest rate, and a number to pay off the loan into this program and have the mortgage’s monthly payments as output. In addition, agents want the program to calculate the pay-off amount of the loan for a specific year(s) or an amortization table for the mortgage. The benefits of this program are faster and more reliable than using manual calculations or an electronic calculator where they can still key in the wrong number. The program can also be ported to a company website. This website can be accessed by customers to inquire about mortgage information and thus free the agents’ time for such requests. The program development cycle is the best approach for coding a program solution. The first paragraph has done the analyzing of the problem, then comes the design phase. The requirements for this task are identified as input, output, and processing tasks. Tasks are coded into a program module. This breaking down of tasks into modules is known as modular programming. According to Torres (2012), ”Breaking down a programming project into modules makes it more manageable. These individual modules are easier to design, implement, and test. Then...

Words: 545 - Pages: 3

Premium Essay

Calorie Management

...PRG/211 Algorithm Planning for Calorie Management Algorithm Planning for Calorie Management 1. We need to analyze the program.              By determining the information we are given and what results we need to get. What information do we need to calculate the calories daily. What calories are in the food and beverages. How many calories are burned daily. What is the required balance per person.  2. Design a program to solve the program.             The heart of the program development process.  3. Code the program.             Write statements in a computer language that will design what we need in the program. 4. Test the program.  Make sure the program solves the given problem. Make sure we are able to calculate the user's daily calorie balance.  Determine the modules that will be needed in the program. User Intake – Breakfast, Lunch, Dinner, Snacks, Drink User Activity – Sedentary, Light Active, Moderate Active, Very Active, and Extremely Active Pseudocode for Calorie Management Input Data Module Write “What was your daily meal calorie intake?” Input calorieIntake Write “Select your daily activity” Input dailyActivity Calorie Caluctions Module Set Totalcalories = calorieIntake- dailActivity Output Module Write “Your total calorie intake is: `` + Totalcalories End This a simple pseudocode for the calorie management program. The key variable are calorieintake the...

Words: 372 - Pages: 2

Free Essay

Revised Simplex Method

...REVISED SIMPLEX METHOD We have implemented the simplex algorithm by using the Tableau to update the information we proceed along the various steps. For problems with only a few variables the simplex method is efficient. However, problems of practical interest often have several hundred variables. The tableau method is hopeless for problems containing more than a few variables. We are in fact calculating AB-1aj for all j as well as calculating all components of the relative cost coefficient r, albeit in an fairly automatic manner. However, we really need to know only one component rj of r, one row AB-1aj of the Tableau †(B), and the column constant AB-1b of the Tableau in order to pass to the next basic index set B. The goal of the revised simplex method is the ordering of all calculations so that no unnecessary calculations are performed. No new theory will be need. The simplex algorithm exactly as written in an earlier chapter will be implemented. The implementation will avoid all unnecessary calculations and will try whenever possible to update any available information. The Simpex Algorithm (Theoretical Foundation) 1. 2. Start with some basic index set B1 = {i(1), i(2), … ,i(m)}. Compute a coefficient of the relative cost coefficient rj = cj - cBAB-1aj for B1 until some index j with rj > 0 is found. (i).If all rj ≤ 0, termination phase has been reached. (ii).Only those j M N1 are candidates 3. Find AB-1aj = aj and AB-1b = b and compute the allowable ratios of the jth column...

Words: 3270 - Pages: 14

Free Essay

Assessment 1

...Michael Ayala 5/12/12 Psych 1 Assessment 1 Essay In the the first example, the researcher used the experimental design in his study to examine how poeple respond to pictures of faces with different racial features. The experimental design is when the experimenter isolates and controls all the variables excpet one, he makes sure that variable is the only one causing the desired effect. The The independent variable, which is the variable that the researcher is manipulating, is computer program that he created that will randomly generate the faces as each subject comes in. In this study the researcher used random assignment as the the subject would come in the the room. Random assignment is went the experimental and control groups a non-systematic and randomized way. The way he did this is by not telling his research nor the subjects knew which order they were going in. The team of researchers that found that the more time students spend interacting with technology, the less empathy they show towards other by doing a correlation study. Since many students already use technology a lot this was would be easier to use. The students increased use of their devices is one variable and their lower empathy towards other is the second one making a negative correlation. A negative correlation is a correlation indicating that the variables simultaneous in opposite directions. The second researcher...

Words: 258 - Pages: 2

Premium Essay

Operations Research and Its Prospects in Pakistan

...Operations Research and its Prospects in Pakistan Prof. Dr. Shoaib ud Din Mathematics Department Punjab University, Lahore, Pakistan Operations Research has had an increasingly great impact on the management of organizations in the recent years. In fact, with the exception of advent of electronic computer, the extent of this impact seems to be unrivalled by that of any other recent development. However, all the development in this field has gone almost unnoticed in most developing countries including Pakistan. This article is an effort to introduce Mathematics community in the country to the subject and its achievements. A brief history In order to appreciate the importance of OR in the world today it is important that we know something of its history and evolution. Although roots of Operations Research can be traced back many decades, it is generally agreed that this discipline began during World War II. During the War team of British scientists with diverse background were called upon to study the strategic and tactical problems associated with air and land defense of the country. The establishment of this scientific team marked the first formal Operations Research activity. Their efforts were allegedly instrumental in winning the Air Battle of Britain, The Island Campaign in the Pacific, the Battle of the North Atlantic, and so on. The name Operations Research-Operational Research in the United Kingdom – was apparently coined because the problems assigned to this team...

Words: 1347 - Pages: 6

Free Essay

Boolean Logic

...language—essentially, a "switchon/switchoff" pattern. Today, using tiny electronic switching mechanisms inside the computer, "decisions" are made with lightning speed within the central processing unit (CPU). These decisions are based on whether a tiny switch is on or off at any given time. Computer programmers follow prescribed sets of instructions to "teach" computers how to make decisions to carry out instructions. Programming is made possible by sets of instructions called languages. Many of these languages are made up of the logic building blocks identified by Mr. Boole more than 100 years ago, long before computers. The building blocks that Mr. Boole identified are AND logic, OR logic, NOT logic, NAND logic, and NOR logic. Computer decisions are made from these patterns of logic. All programming languages allow you to create expressions that can be evaluated as either true or false, which are called Boolean expressions. A Boolean condition is a conditional statement containing a Boolean expression, and another name for a conditional statement is a hypothesis. In computer programming languages, a hypothesis is formed by using the word “if” with a Boolean expression. The Boolean expression can be evaluated as True or False. When the Boolean expression within the hypothesis is true, then the conclusion occurs. The conclusion will not happen unless this hypothesis is satisfied as True. So, the “if” statement uses the...

Words: 703 - Pages: 3

Premium Essay

Syllabus

...Job description Director of Programs Position title Director of Programs Reporting to Executive Director Position summary The director of programs is responsible for the implementation, management, supervision and evaluation of all the organization’s programs in accordance with the national standards set out by the organization. As a member of the senior management team, the director of programs participates in strategic planning and budgeting initiatives in addition to problem solving. He/she works within the guidelines, policies and mission of the organization and will be accountable and responsible for specific projects as assigned. Duties and responsibilities Human resource management • Direct, plan and coordinate the work of the program staff including supervision and evaluation, training and team building • Organize and attend weekly departmental meetings to maintain effective communication • Ensure adequate and qualified staff to carry out the program activities • In consultation with the executive director, responsible for the selection, hiring, coaching, and discipline of the program employees Program delivery • Responsible for the implementation, management, supervision and evaluation of all activities of the program in accordance with National Standards • Remain up-to-date on all modifications to the National Standards implementing the same in a timely and organized manner • Responsible for the supervision and...

Words: 608 - Pages: 3

Premium Essay

Managing Stress

...DIS 511: IS DATA, CODING, AND INFORMATION Data and information Data. ← Items about things, events, activities, and transactions are recorded, classified, and stored but are not organized to convey any specific meaning. ← Data items can be numeric, alphanumeric, figures, sounds, or images. Information. ← Data that have been organized in a manner that gives them meaning for the recipient. They confirm something the recipient knows, or may have “surprise” value by revealing something not known. Internal and External data ← Internal data ← An organization internal data are stored in one or more places. Internal data is normally accessible via an organization computer network and may reside in user’s PC, databases and people’s memory. Internal data relates to: ← People e.g. employees – corporate database ← Products - sales ← Services ← Processes ← External data relates to activities outside the organisation. The data is critical in the management of the organization. Source include: Commercial databases e.g. data available on CD-ROMS, Internet servers, pictures, diagrams, atlases, television, Government reports, Commercial databases that normally charge for access to specialized databases Internal and External data ■ External data must be monitored and captured to ensure that important data...

Words: 7046 - Pages: 29