Design a Module Named Getnumber

In: Computers and Technology

Submitted By msfroggie
Words 1206
Pages 5
Unit 4 Assignment 1: Homework Jeannie Stephens
Learning Objectives and Outcomes * Explain the importance of separating code into modules for efficiency * Use flowcharts and pseudocode to represent program modules * Describe the impact of program modules on variables – variable scope * Describe the necessity of having compatible argument in module parameters * Evaluate the various program modules
Assignment Requirements
Do the following problems: * Short answer 1-7 on page 111 * Algorithm workbench Review Questions 1, 5, 6, and 7 starting on page 111 * Programming Exercise 1 and 2 on page 113
Required Resources * Textbook
Submission Requirements
Submit your written answers to your instructor at the beginning of Unit 5 SHORT ANSWER 1) How do modules help you to reuse code in a program? a. A specific operation is performed in several places in a program, the module can be rewritten once to perform that operation, and then be executed any tie needed 2) Name and describe the two parts that a module definition has in most languages. b. The header- indicates the starting point of the module c. The body – is a list of statements that belong to the module 3) When a module is executing, what happens when the end of the module is reached? d. When they reach the end of the module, the program will stop executing 4) What is a local variable? What statement are able to access a local variable? e. It is a variable that is declared inside the module f. Only the statements inside the variable can access the variable, such as: call, display, declare, input. 5) In most languages, where does a local variable’s scope begin and end? g. Begins at the variable’s declaration h. Ends at the end of the module in which the variable is declared 6) What is the…...

Similar Documents

Is Design informatică şi cunoştinţe de management al proiectelor. În această etapă se elaborează „Specificaţiile de proiectare”, care prevăd estimativ resursele hardware, software şi auxiliare necesare. Conform acestor cerinţe, se elaborează o structură a sistemului care poate să realizeze funcţiile dorite şi se indică modalităţile de testare care pot atesta atingerea scopurilor. urmărind o metodă anume. Pentru a realiza cu succes şi eficienţă această etapă este necesară adoptarea şi respectarea unei o metodologii - adică a unei abordări ştiinţifice şi sistematice verificate. Astăzi, pentru această etapă se pot folosi instrumente CASE (Computer Aided Software Engineering) care asistă analistul de sistem în definirea structurilor şi funcţiilor pe module, în proiectarea lor, iar apoi poate genera aplicaţia (codul programului) şi chiar întocmi în linii mari documentaţia de proiectare. 3) Proiectarea logică – priveşte etapa de concepţie a structurilor şi a elementelor ce compun SI, care vor constitui ulterior baza pentru realizarea sistemului. Sunt implicaţi analişti programatori şi specialişti care stabilesc cadrul în care se va realiza şi va funcţiona SI: resurse fizice existente, aplicaţii existente şi necesare, modul de realizare a aplicaţiilor şi structurii de echipamente; în această etapă se stabileşte şi modul general de desfăşurare a acţiunile de implementare. Documentul elaborat este „Proiectul de ansamblu”. 4) Proiectarea fizică - în cadrul căreia se detaliază toate datele şi......

Words: 25152 - Pages: 101

Programming Logic and Design Unit 4

... How do modules help you to reuse code in a program? A. It reduces the duplication of code within a program by reusing the module that was written once. 2. Name and describe the two parts that a module definition has in most languages. A. Header and a body, header indicates starting point, and the body is a list of statements. 3. When a module is executing, what happens when the end of the module is reached? A. It’s executed and returned back to the point in main program where it was sidetracked from. 4. What is a local variable? What statement is able to access a local variable? A. A variable declared inside a local module, only statement within a module 5. In most languages, where does a local variable’s scope begin and end? A. Begins at the variables declaration within a module and ends at the end of the module in which the variable is declared. 6. What is the difference between passing an argument by value and passing it by reference? A. By value only a copy of the argument’s value is passed. By reference its passed into a special modification parameter. 7. Why do global variables make a program difficult to debug? A. Because global is used throughout all modules and hard to track. Algorithm Workbench Review 1, 5, 6, 7 1. Design a module named timesTen. The module should accept an Integer argument. When the module is called, it should display the product of its argument multiplied times 10. Module main()......

Words: 1032 - Pages: 5

Logic and Design

...Programming Logic and Design, 6th Edition Chapter 6 Exercises 1. a. Design the logic for a program that allows a user to enter 10 numbers, then displays them in the reverse order of their entry. Answer: A sample solution follows Flowchart: Pseudocode: start Declarations num index num SIZE = 10 num numbers[SIZE] = 0,0,0,0,0,0,0,0,0,0 getReady() while index < SIZE getNumbers() endwhile finishUp() stop getReady() index = 0 return getNumbers() output “Enter a number for position ”, index input numbers[index] index = index + 1 return finishUp() output “The numbers in reverse order are: ” while index > 0 index = index – 1 output numbers[index] endwhile return b. Modify the reverse-display program so that the user can enter up to 10 numbers until a sentinel value is entered. Answer: A sample solution follows Flowchart: Pseudocode: start Declarations num index num SIZE = 10 num numbers[SIZE] = 0,0,0,0,0,0,0,0,0,0 string CONTINUE = “Y” string moreNumbers = CONTINUE getReady() while index < SIZE AND moreNumbers equal to CONTINUE getNumbers() endwhile finishUp() stop getReady() index = 0 output “Do you want to enter a number? (Y/N)” input moreNumbers return getNumbers() output “Enter a number for position ”, index input numbers[index] index =......

Words: 4366 - Pages: 18

Computer Application and Microcontroller System Design for Light and Temperature Sensors Measurement Tool Module

...COMPUTER APPLICATION AND MICROCONTROLLER SYSTEM DESIGN ON TEMPERATURE AND LIGHT SENSORS MEASUREMENT TOOL MODULE Wilson Wiyatno1, Melisa Mulyadi2 Electrical Engineering Department – Faculty of Engineering Atma Jaya Catholic University of Indonesia e-mail:, ABSTRACT The experiment module for sensor testing in the Electronic Laboratory Electrical Engineering Department, Faculty of Engineering Atma Jaya Catholic University of Indonesia, Jakarta is not well integrated. The sensor output is not homogenous and there is no application to show the characteristic of the sensor. To solve this problem, a computer based sensors measurement tool module needs to be made. The sensor gives the output such as analog value to the microcontroller. Microcontroller receives the output with Analog to Digital Converter (ADC), then microcontroller send the digital value to computer using serial communication. The application based on C# programming language is made as user interface to the user. To know the input of the sensor, simple linear regression, a type of numeric method, is used to calculate the input of the sensor and to make the linearity between the input and the output. The testing of the results in computer show that the error rate system is small. After the input and the output have been known, the graphic can be made to show the characteristic sensor to the user. ...

Words: 2154 - Pages: 9

Module a

...Module A Project- Lillian Kimmons A.51 Erroneous Reporting on Interim Financial Information: a) Erroneous portions found: * There should be a paragraph describing management’s responsibility with the internal control responsibility immediately following the introductory paragraph. * The report does not point out that a review is considerably less in scope than an examination in accordance with normally established auditing standards. The purpose of which is the expression of an opinion concerning the financial statements as a whole. * Knowledge of a company’s system for preparing information in not necessary in an interim review report. * There is no disclaimer of opinion in the scope paragraph. * The standard audit opinion and final paragraph appear to be similar if not identical. The final paragraph should be focusing on the “negative assurance” and should not be identical to the audit opinion that Baker & Baker should not have been giving. * The date of the review should be dated later than March 31, 2013 due to the fact that the end of the interim review work is later than the date specified in the report. b) Rewrite the report Report of Independent Auditor’s Review The Board of Directors and Stockholders Micro Mini Company We have reviewed the balance sheet of Micro Mini Company at March 31, 2013. The related statement of income for the three-month period ended on March 31, 2013 and the statement of cash flow for the three-month......

Words: 579 - Pages: 3

Logic & Design

... Third Edition Starting Out with Programming Logic & Design This page intentionally left blank Third Edition Starting Out with Programming Logic & Design Tony Gaddis Haywood Community College Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City São Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo Editorial Director: Marcia Horton Editor in Chief: Michael Hirsch Acquisitions Editor: Matt Goldstein Editorial Assistant: Chelsea Kharakozova Director of Marketing: Patrice Jones Marketing Manager: Yez Alayan Marketing Coordinator: Kathryn Ferranti Marketing Assistant: Emma Snider Director of Production: Vince O’Brien Managing Editor: Jeff Holcomb Production Editor: Pat Brown Manufacturing Buyer: Pat Brown Art Director: Anthony Gemmellaro Cover Designer: Joyce Cosentino Wells Cover Art: © iStockphoto Media Project Manager: John Cassar Full-Service Project Management: Jogender Taneja/Aptara®, Inc. Composition: Aptara®, Inc. Printer/Bindery: Edwards Brothers Cover Printer: Lehigh-Phoenix Color/Hagerstown Copyright © 2013, 2010, 2008 by Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved. Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in......

Words: 115158 - Pages: 461

The Design Guide

...1 INDEX Page INTRODUCTION 1. 2. YOUR CV USING THIS GUIDE TO CREATE A CV AND GETTING HELP 3 3 THE DESIGN GUIDE 3. 4. GETTING STARTED 4 Fig 1. Your Lifeline PROVIDING EVIDENCE THAT 4 CROSSES CULTURES Fig 2. Explaining Your Results COVERING LETTERS 6 Fig 3: Covering Letter Layout Fig 4: Opening Paragraph of Covering Letter Fig 5: Middle Paragraphs of Covering Letter Fig 6: Closing Paragraphs of Covering Letter CV FORMAT – 1 PAGE OR 2? 8 IMAGE AND FONTS 9 THE HEADER 9 Fig. 7: Header Fig. 8: Header plus ORGANISING YOUR MATERIAL 9 AND HEADINGS TACKLING WORK PERMIT ISSUES 10 Fig. 9 Nationality and Work Permission Data WRITING PERSONAL PROFILES 12 Fig 10. Personal Profile Statement Fig 11: Career Objective Statement Fig 12: Career Summary Fig 13: Expertise Summary BEAUTIFUL BULLETS 13 Fig 14: Bullet 1 Fig 15: A Powerful Summary SHOWING MANAGERIAL CAPABILITIES 14 REFERENCES 14 Fig 16. References SCANNING YOUR WORK 15 CV EXAMPLES PROFILE EXAMPLES EXAMPLE COVERING LETTER 16-28 29-30 31 5. 6. 7. 8. 9. 10. 11. 12. 13. 14 15. CV EXAMPLES 2 INTRODUCTION 1. YOUR CV Welcome. If you are a postgraduate student at The Birmingham Business School, one of the tasks you are likely to want to tackle is the design of a CV to ‘market’ your skills for the future. Even if you do not intend to try and seek work in the UK, you are likely to find that you can learn from the self-marketing skills our Careers Advisers and Consultants will emphasise in the workshop sessions......

Words: 9018 - Pages: 37

Module a

...Module A The Simplex Solution Method A-1 A-2 Module A The Simplex Solution Method he simplex method is a general mathematical solution technique for solving linear programming problems. In the simplex method, the model is put into the form of a table, and then a number of mathematical steps are performed on the table. These mathematical steps in effect replicate the process in graphical analysis of moving from one extreme point on the solution boundary to another. However, unlike the graphical method, in which we could simply search through all the solution points to find the best one, the simplex method moves from one better solution to another until the best one is found, and then it stops. The manual solution of a linear programming model using the simplex method can be a lengthy and tedious process.Years ago, manual application of the simplex method was the only means for solving a linear programming problem. Now computer solution is certainly preferred. However, knowledge of the simplex method can greatly enhance one’s understanding of linear programming. Computer software programs like QM for Windows or Excel spreadsheets provide solutions to linear programming problems, but they do not convey an in-depth understanding of how those solutions are derived. To a certain extent, graphical analysis provides an understanding of the solution process, and knowledge of the simplex method further expands on that understanding. In fact, computer solutions are......

Words: 22849 - Pages: 92


...Chapter 4 Product Design Russell and Taylor Operations and Supply Chain Management, 8th Edition Lecture Outline • • • • • • • Design Process – Slide 4 Rapid Prototyping and Concurrent Design – Slide 11 Technology in Design – Slide 27 Design Quality Reviews – Slide 29 Design for Environment – Slide 33 Quality Function Deployment – Slide 36 Design for Robustness – Slide 45 © 2014 John Wiley & Sons, Inc. - Russell and Taylor 8e 4-2 Learning Objectives • Explain the importance of the product design process and provide an overview of each step of the process • Calculate the reliability and availability of a product or service • Understand the technologies involved in designing new products and their related production processes • Utilize techniques for analyzing design failures and eliminating unnecessary design features • Explain why and how each step of the product lifecycle can be changed for improved environmental stewardship, and provide examples of programs that support green efforts • Use quality function deployment as a design tool © 2014 John Wiley & Sons, Inc. - Russell and Taylor 8e 4-3 Design Process • Effective design can provide a competitive edge • matches product or service characteristics with customer requirements • ensures that customer requirements are met in the simplest and least costly manner • reduces time required to design a new product or service • minimizes revisions necessary to make a design workable © 2014 John Wiley...

Words: 2304 - Pages: 10

Program Design & Development

...Block comments take up several lines and are used when lengthy explanations are required. Line comments are comments that occupy a single line, and explain a short section of the program. Chapter 3 3.1 A module is a group of statements that exist within a program for the purpose of performing a specific task. 3.2 A large task is divided into several smaller tasks that are easily performed. 3.3 If a specific operation is performed in several places in a program, a module can be written once to perform that operation, and then be executed any time it is needed. 3.4 Modules can be written for the common tasks that are needed by the different programs. Those modules can then be incorporated into each program that needs them. 3.5 When a program is developed as a set of modules that each performs an individual task, then different programmers can be assigned the job of writing different modules. 3.6 In most languages, a module definition has two parts: a header and a body. The header indicates the starting point of the module, and the body is a list of statements that belong to the module. 3.7 To call a module means to execute the module. 3.8 When the end of the module is reached, the computer jumps back to the part of the program that called the module, and the program resume execution at that point. 3.9 • The overall task that the program is to perform is broken down into a series of subtasks. • Each of the subtasks is examined to determine......

Words: 5516 - Pages: 23


...MODULE 1 1. Discuss the importance of Comparative and International Education (CIE) as a course. The Comparative and International Education is considered as a global, cross cultural, and transdisciplinary curriculum that prepares its graduates to work in and with schools – both locally and internationally – as agents of change in classrooms, schools, and educational systems as a whole.  Comparative and International Education as a course is considered vital because it prepares educators like myself to analyze, assess, and evaluate educational practice, policies in wide variety of social and educational settings. It also promotes a broad understanding of educational institutions, systems and their programs/curricula. Comparative education examines how countries plan for the expansion, upgrade, and improvement of their educational system. It imparts a wider understanding on the origins of the challenges within and outside the school system, providing us the opportunity to create and explore solutions on the said challenges. Moreover, the study in comparative and international education prepares researchers, teachers, and planners who are interested in education across nations and cultures. Various modes of inquiry and the intellectual orientations of several disciplines are used to investigate, from a comparative and/or cross-cultural perspective, the following aspects of education in one or more geographical regions of the world: educational......

Words: 1487 - Pages: 6

Interior Design Module Guide

...IIE Module Guide INTD7321 INTERIOR DESIGN 3A MODULE MANUAL/GUIDE 2016 (First Edition: 2016) This manual enjoys copyright under the Berne Convention. In terms of the Copyright Act, no 98 of 1978, no part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording or by any other information storage and retrieval system without permission in writing from the proprietor. The Independent Institute of Education (Pty) Ltd is registered with the Department of Higher Education and Training as a private higher education institution under the Higher Education Act, 1997 (reg. no. 2007/HE07/002). Company registration number: 1987/004754/07. © The Independent Institute of Education (Pty) Ltd 2016 Page 1 IIE Module Guide INTD7321 DID YOU KNOW? Student Portal The full-service Student Portal provides you with access to your academic administrative information, including:  an online calendar,  timetable,  academic results,  module content,  financial account, and so much more! Module Guides or Module Manuals When you log into the Student Portal, the ‘Module Information’ page displays the ‘Module Purpose’ and ‘Textbook Information’ including the online ‘Module Guides or ‘Module Manuals’ and assignments for each module for which you are registered. Supplementary Materials For certain modules, electronic supplementary material is available to you via......

Words: 9963 - Pages: 40

Sd2720 Module 3 Working with Methods

...SD2720 Module 3 Working with Methods Click Link Below To Buy: SD2720 Module 3 Working with Methods and Encapsulation Lab 3.1 Creating a Method In this lab, you will complete two tasks related to Java methods. The tasks performed in this lab will help you use method overloading and understand ambiguous overloading. Task 1 Write a program for swapping two numbers. In the program: • Create a method by passing primitive values as parameters for checking the result. • Create another method by passing object references as parameters for checking the result. • Identify the difference between two outputs. Task 2 Write a Java program that accepts 10 numbers from the user and finds the greatest and smallest numbers among them. Create two methods, findGreatest() and findSmallest(), to find the greatest and smallest numbers, respectively. Task 3 Write a Java program that implements the following methods: • getNumbers()to accept two numbers from the user. • calculateHCD()to calculate the highest common divisor (HCD) of the two numbers. Please note that it should be a recursive function. • calculateLCM()to calculate the least common multiple (LCM) of the two numbers. Display()to display HCD and LCM. Submission Requirements: Compress your Java project folder and responses in a Microsoft Word document into one zipped folder and submit it to the instructor. Evaluation......

Words: 384 - Pages: 2


...ingredient in determining locational policies designed to reduce the need for travel by car” To reduce the need for travel by car the PPG 13 aims to identify key routes for bus improvements, give priority to people over ease of traffic movement and plan to give more road space to pedestrians, cyclist and public transport in town centres, local neighbourhoods etc. The key priority is to improve the personal safety for people for the whole of their journey to/from work/home/leisure. To encourage people to replace short car journeys with walking which is identified as the most important mode of transport, the PPG 13 aims to encourage walking by ensuring that Local authorities ensure that new developments “pay particular attention to the design, location and access arrangements, to help promote walking as a prime of means access” an important policy that is set out in the PPG 13 to ensure “that walking routes are more direct, safe and secure, particularly in and around town centres and local neighbourhoods, and to public transport, and to ensure that the personal security concerns of pedestrians are addressed” The PPG 13 aims to achieve this objective (3) by ensuring the certain measures such as the “provision of wider footways, including the reallocation of road space to pedestrians” “pedestrian-friendly road crossings which give pedestrians greater priority at traffic signals and avoid long detours and waiting times indirect footbridges or underpasses” are thought......

Words: 1556 - Pages: 7

How Companies Are Named

...w areHow companies are named? ABN AMRO- In the 1960s, the Nederlandse Handelmaatschappij (Dutch Trading Society; 1824) and the Twentsche Bank merged to form the Algemene Bank Nederland ( ABN; General Bank of the Netherlands). In 1966, the Amsterdamsche Bank and the Rotterdamsche Bank merged to form the Amro Bank. In 1991, ABNand Amro Bank merged to form ABN AMRO. Accenture- Accent on the Future. Greater-than 'accent' over the logo's t points forward towards the future. The name Accenture was proposed by a company employee in Norwayas part of a internal name finding process (BrandStorming). Prior to January 1, 2001 the company was called Andersen Consulting. Adidas- from the name of the founder Adolf (Adi) Dassler. Adobe- came from name of the river Adobe Creek that ran behind the houses of founders John Warnock and Chuck Geschke . AltaVista- Spanish for "high view". - Founder Jeff Bezos renamed the company to Amazon (from the earlier name of after the world's most voluminous river, the Amazon. He saw the potential for a larger volume of sales in an online bookstore as opposed to the then prevalent bookstores. (Alternative: It is said that Jeff Bezos named his book store Amazon simply to cash in on the popularity of Yahoo at the time. Yahoo listed entries alphabetically, and thus Amazon would always appear above its competitors in the relevant categories it was listed in.) AMD- Advanced Micro Devices. Apache- The name was......

Words: 3479 - Pages: 14