Premium Essay

Pt 1420 Unit 4

In:

Submitted By mashon01
Words 384
Pages 2
Unit 4 Research 1: Using Global Variables
Advantages of using Global Variables * Global variable belongs to every function in the program. * Avoid passing frequently-used variables between several functions. * A global variable is accessible in every scope. * A global variable can potentially be modified from anywhere. * It can be accessed from any other files using extern.
Disadvantages of using Global Variables * Non-locality -- Source code is easiest to understand when the scope of its individual elements is limited. Global variables can be read or modified by any part of the program, making it difficult to remember or reason about every possible use. * Implicit coupling -- A program with many global variables often has tight couplings between some of those variables, and couplings between variables and functions. Grouping coupled items into cohesive units usually leads to better programs. * Concurrency issues -- if globals can be accessed by multiple threads of execution, synchronization is necessary (and too-often neglected). When dynamically linking modules with globals, the composed system might not be thread-safe even if the two independent modules tested in dozens of different contexts were safe. * Namespace pollution -- Global names are available everywhere. You may unknowingly end up using a global when you think you are using a local (by misspelling or forgetting to declare the local) or vice versa. Also, if you ever have to link together modules that have the same global variable names, if you are lucky, you will get linking errors. If you are unlucky, the linker will simply treat all uses of the same name as the same object. * Memory allocation issues -- Some environments have memory allocation schemes that make allocation of globals tricky. This is especially true in languages where "constructors" have

Similar Documents

Free Essay

Pt 1420

...PT 1420 Student Name:__________________ Introduction to Programming Winter 2014/2015 Instructor: Martin Remmele Unit 7 Homework Assignment Due by end of first break February 10, 2015 Learning Objectives and Outcomes NOTE: This section lists concepts and techniques to be understood from this unit. The actual assignment that you are to complete is found in the next section: “Assignment Requirements”. * Be able to Use pseudocode/flowcharts to represent repetition structures. * Be able to Create While, Do-While, and Do-Until conditional loops. * Be able to Describe the implications of an infinite loop. Assignment Requirements Complete the following exercises. An exercise that calls for an algorithm may be written in English as a series of steps. An exercise that calls for program statements may be written in a) the text’s pseudocode, b) your own preferred pseudocode notation or c) Visual Basic. (VB code can simply be typed into your Word document; it does not have to be created in the development environment.) The logic of the statements will be more important to the grade than the syntax. * Short Answer Review Questions 1-5, starting on page 213 (5 pts each) * Algorithm Workbench Review Questions 1, 2, 7, and 8, starting on page 213 (10 pts each) * Programming Exercises 1, 3, and 4, starting on page 214 (10 points each) Required Resources *...

Words: 310 - Pages: 2

Free Essay

Pt 1420 Homework

...Pt 1420 Unit 10 Homework Introduction to Programming Unit 10 Assignment 1 Short Answer 1. * Open the file – Opening the file creates a connection between the file and a program; this allows the program to read data from the file. * Process the file – Data is either read from the file or written to the file * Closing the file – The file must be closed when a program is finished using it. Closing the file disconnects the file from the program. 2. The file must be closed so the program will force any unsaved data in the buffer to be written to the file. 4. The file will not be erased, and any new data will be written at the end of the file’s current contents. 5. The program will create a new file. Algorithm Workbench 1. Declare OutputFile myFile Open myFile “my_name.dat” Write myFile “fatima” Close myFile 2. Declare InputFile myFile Declare String name1 Open myFile “my_name.dat” Read myFile name1 Close myFile Display ”Hello! My name is,” 3. Declare OutputFile numberList Declare Integer counter = 1 Open numberList “number_list.dat” For counter = 1 to 100 Write numberList, counter Next counter End For Close numberList 4. Declare InputFile number_list Declare Integer myNumber Open number_list ”number_list.dat" Display "Here are the numbers: " While NOT eof (number_list) Read numberList myNumber Display myNumber End While Close myName Programming Exercise Pg. 410 1. Declare Integer number Declare...

Words: 296 - Pages: 2

Premium Essay

Assignment 1

...PT 1420 Unit Assignment 1: Homework 1. Describe the role of software for computers. computer software can be divided into Application software uses the computer system to perform useful work or provide entertainment functions beyond the basic operation of the computer itself. System software is designed to operate the computer hardware, to provide basic functionality, and to provide a platform for running application software. Malicious software computer software developed to harm and disrupt computers. As such, malware is undesirable. Software is essential to a computer because without software, a computer can do nothing. All of the software that we use to make out computers useful is created by individuals known as programmers or software developers. 2. Identify the hardware associated with a computer. The term hardware refers to all of the physical devices, or components, that a computer is made of. A computer is not one single device , but a system of devices that all work together. Like the different instruments in a symphony orchestra, each device in a computer plays its own part. These are the main components; The central processing (CPU), Main, memory, Secondary storage devices, Input devices, Output devices. 3. Describe how computers store data. A modern digital computer represents data using the binary numeral system. Text, numbers, pictures, audio, and nearly any other form of information can be converted into a string of bits, or binary...

Words: 549 - Pages: 3

Free Essay

Researching Variable Naming Rules

...PT 1420 Unit 2 Research Assignment 1 12/28/2013 Unit 2 Research Assignment 1: Researching Variable Naming Rules Variable Naming Rules of Visual Basic * The first character must be a letter. * The usage of spaces, period (.), comma (,), Exclamation mark (!), or the characters @, &, $, # in the variable name are not allowed, but the underscore (_) is a valid character. * The name must be less than 256 characters in length. * You cannot use any names that are the identical as the functions, statements, and methods in Visual Basic. Variable Naming Rules of Python * The first character of the variable name must begin with a letter (a – z, A – Z), or an underscore (_). * The name can only consist of letters, numbers, and underscores (no special characters). * Variable names are case sensitive. * The variable name cannot be identical as a reserved name in Python due to the fact that Python uses them for other things. Variable Naming Rules of Java * Variable names are case sensitive. * A variable name can be any length as long as it is within the Unicode letter and digit standard, also you should use a letter as the first character of the variable word. You are allowed to use the dollar sign or underscore ($, _ ) as a first character but it isn’t recommended. * The only characters other than letters and number that can be used is the dollar sign and underscore (“$”, “_”), and no other special characters may be allowed. * If...

Words: 702 - Pages: 3

Free Essay

Six Sigma

...UNIVERSITAS INDONESIA SIX SIGMA MAKALAH diajukan sebagai salah satu tugas mata kuliah Manajemen Kualitas Terpadu yang diampu oleh Bapak Dr. Ir. Rahmat Nurcahyo, M.Eng.Sc. NAMA : TRISNA YUNIARTI NPM : 1406507114 FAKULTAS TEKNIK DEPARTEMEN TEKNIK INDUSTRI UNIVERSITAS INDONESIA 2014 KATA PENGANTAR Alhamdulillah atas kehadirat Allah SWT karena berkat segala rahmat dan hidayah-Nya sehingga penulis dapat menyelesaikan tugas makalah ini dengan baik. Makalah ini merupakan salah satu tugas mata kuliah Manajemen Kualitas Terpadu yang membahas mengenai Six Sigma baik itu sejarahnya, konsep Six Sigma, tahapan, tools yang digunakan dalam six sigma, serta contoh studi kasus. Akhir kata semoga makalah ini bisa bermanfaat bagi pembaca pada umumnya dan penulis pada khususnya. Penulis menyadari bahwa dalam pembuatan makalah ini masih ada kekurangan untuk itu penulis menerima saran dan kritik yang bersifat membangun demi perbaikan kearah kesempurnaan. Akhir kata penulis sampaikan terima kasih. Penulis, Trisna Yuniarti ABSTRAK Metodologi Six sigma untuk peningkatan kualitas adalah sebuah sistem yang banyak konsep, tools, dan prinsip-prinsip yang dapat membantu perusahaan fokus pada pengembangan dan membuat produk dan layanan yang mendekati sangat sempurna. Hal itu berdasarkan pekerjaan statistik Joseph Juran, seorang Rumania yang lahir di US sebagai perintis manajemen mutu. Kata Sigma adalah huruf Yunani yang digunakan untuk area statistik yang mengukur...

Words: 7500 - Pages: 30

Free Essay

Analisis Swot

...ANALISIS SWOT PADA BANK SYARIAH MANDIRI ANALISIS SWOT PADA BANK SYARIAH MANDIRI [pic] Disusun Oleh : Kelompok 3 Kartika Tri Perwirasari (20206519) Lia Lutfiah (20206545) Mirra Permanasari (20206621) Yuni Purtati (21206075) Safira Rahmania (21206117) Dian Tri Lestari (21206144) UNIVERSITAS GUNADARMA DEPOK 2010 [pic] KATA PENGANTAR Assalamu’alaikum Wr, Wb, Dengan mengucapkan puji dan syukur kehadirat Allah SWT atas rahmat dan karunia yang diberikan-Nya, Alhamdulillah penulis berhasil menyelesaikan penulisan makalah yang berjudul : “ANALISIS SWOT PADA BANK SYARIAH MANDIRI”. Selama proses penyusunan penulisan makalah ini, penulis mendapat banyak bantuan dan dukungan, baik berupa moral maupun materi dari berbagai pihak, sehingga penulis dapat menyelesaikan penulisan skripsi ini. Penulis ingin mengucapkan terima kasih yang tulus kepada : Ibu Prof. Dr. E. S. Margianti, SE., MM., selaku Rektor Universitas Gunadarma; Bapak Ir. Toto Sugiharto S., M.Sc., Phd, selaku Dekan Fakultas Ekonomi Universitas Gunadarma; Ibu Dr. Rr. Dharma Tintri E., SE., Ak., MBA., selaku Ketua Jurusan Akuntansi Fakultas Ekonomi Universitas Gunadarma; Ibu Izzati Amperaningrum selaku Dosen Manajemen Strategik Kelas 4EB01 Universitas Gunadarma; My lovely best friends…in 4EB01 thanks for the memories we’ve been through, wish this friendship will last forever; Berbagai pihak yang namanya...

Words: 2943 - Pages: 12

Free Essay

Big S Strategy

...Facilities Excerpt from 28 CFR Part 36: ADA Standards for Accessible Design Pt. 36, App. A 28 CFR Ch. I (7-1-94 Edition) APPENDIX A TO PART 36 -- STANDARDS FOR ACCESSIBLE DESIGN ADA ACCESSIBILITY GUIDELINES FOR BUILDINGS AND FACILITIES TABLE OF CONTENTS 1. PURPOSE ....................................................................................... 1 2. GENERAL ....................................................................................... 1 2.1 Provisions for Adults ............................................................................................. 1 2.2* Equivalent Facilitation. ....................................................................................... 1 3. MISCELLANEOUS INSTRUCTIONS AND DEFINITIONS ..................... 1 3.1 3.2 3.3 3.4 3.5 Graphic Conventions ............................................................................................. Dimensional Tolerances ........................................................................................ Notes ...................................................................................................................... General Terminology ............................................................................................. Definitions ............................................................................................................. 1 2 2 2 2 4. ACCESSIBLE ELEMENTS AND SPACES: SCOPE AND TECHNICAL REQUIREMENTS .....................

Words: 39235 - Pages: 157

Premium Essay

Fafafdafef Feaf

...for y to obtain Solutions to The Grammar of Fixed Income Securities 1. Part Part Part Part Part Part a. b. c. d. e. f. $100/(1.20)3 = $57.87. $100/(2)3 = $12.50. $100/(1)3 = $100. $100/(1.10)6 = $56.45. $100/(1.05)12 = $55.68. $100/e.20×3 = $54.88. y= So yB = and yA = 2nLN nSN 1 + c/2 −1 . P/100 2 · 184 1 + .09125/2 − 1 = 2.991185% 105 103.6776495/100 2 · 184 1 + .09125/2 − 1 = 2.778233% . 105 103.7401495/100 2. Remember we are trying to find r such that the growth in our initial investment is the ˙ same as the growth from an alternative investment providing a rate of r(m). That is, find r ˙ Part a. Part b. Part c. Part d. ˙ ˙ such that er = (1 + r(m)/m)m so r = m ln(1 + r(m)/m). m = 1: ln(1.04) = 3.922%. m = 1: ln(1.20) = 18.232%. m = 4: 4 ln(1.05) = 19.516%. m = 1: ln(2) = 69.315%. In addition, we have Part b. Ignoring for the moment any restrictions on lot size, we note that a cash flow of $100 to be received on 12/31/92 and purchased on 9/17/92 is available either in the form of $100 par amount of the 12/31/92 bill or in the form of $100/(1+.09125/2) par amount of the 9 1/8’s of 12/31/92. (Indeed, since $100 par of the 9 1/8’s will pay off $(100 + 9.125/2) on 12/31/92, $100/(1 + .09125/2) par amount of the 9 1/8’s will pay off $100.) Can we buy this cash flow low through one instrument and sell it high through the other? We must see if the asked price of one of the instruments is lower than the bid price of the other. For the T -bill, we have computed from Example 14 the asked...

Words: 25468 - Pages: 102

Free Essay

Preve

...Table of Contents List of Figures 4 List of Tables: 5 Preface 6 Acknowledgements 7 Executive Summary 8 Abstract 9 PART ONE 10 Launching the Proton Prevé – DRIVE IT TO believe IT 10 1) Prevé – Product (Atrributes) 10 2) Prevé - Price 10 3) Prevé – Place (Distribution) 11 4) Prevé – Promotion 11 COMPANY BACKGROUND 12 PROTON Business Strategy 12 FINANCIAL INSIGHTS OF PROTON 14 Critical Success factor 15 Product 15 Price 15 Promotion 15 Place 15 Critical Success factor 16 Comparison of Prevé with other brands on the critical success factor of Prevé 16 Product 16 Price 18 Promotion 19 Place 19 PART TWO 22 SWOT Analysis 22 Strengths 22 Weaknesses 22 Opportunity 23 Threat 23 TOWS Analysis 24 Strength-Opportunities (SO) 25 Strength-Threat (ST) 25 Weaknesses-Opportunities 25 Weaknesses-Threat 25 PART THREE 27 Strategic Planning and Implementation: Short to Mid Term 27 For first time buyer; Rebate 27 Lower interest rate and zero down payment 27 Indirect Promotion 27 Preve variants :Competitive Price 27 R & D & Special Edition 27 Strategic Planning and Implementation: Long Term Strategy 27 10 years scrap program 28 Proton First than Foreign Car program 28 Proton Car Financing 28 Strategic Partnership 29 Completely Knock Down (CKD) Plant 29 APPENDICES: BROCHURES 30 References 31 List of Figures Figure 1: Photo from the Launching of Prevé Figure 2 : PROTON Company Logo Figure...

Words: 6934 - Pages: 28

Premium Essay

Dynamics of Viral Marketing

...The Dynamics of Viral Marketing ∗ Jure Leskovec Machine Learning Department, Carnegie Mellon University, Pittsburgh, PA Lada A. Adamic School of Information, University of Michigan, Ann Arbor, MI Bernardo A. Huberman HP Labs, Palo Alto, CA 94304 April 20, 2007 Abstract We present an analysis of a person-to-person recommendation network, consisting of 4 million people who made 16 million recommendations on half a million products. We observe the propagation of recommendations and the cascade sizes, which we explain by a simple stochastic model. We analyze how user behavior varies within user communities defined by a recommendation network. Product purchases follow a ’long tail’ where a significant share of purchases belongs to rarely sold items. We establish how the recommendation network grows over time and how effective it is from the viewpoint of the sender and receiver of the recommendations. While on average recommendations are not very effective at inducing purchases and do not spread very far, we present a model that successfully identifies communities, product and pricing categories for which viral marketing seems to be very effective. 1 Introduction With consumers showing increasing resistance to traditional forms of advertising such as TV or newspaper ads, marketers have turned to alternate strategies, including viral marketing. Viral marketing exploits existing social networks by encouraging customers to share product information with their friends...

Words: 19974 - Pages: 80

Free Essay

The Leadership

...General Meeting Statement Accompanying Notice of Annual General Meeting Corporate Information Profile of the Board of Directors Statement of Directors’ Responsibilities Audit Committee Report Statement on Corporate Governance Statement on Risk Management & Internal Control Analysis of Shareholdings Statement of Directors’ Interests Schedule of Share Buy-Back List of Properties Directors’ Report Statement by Directors Statutory Declaration Independent Auditors’ Report Income Statements Statements of Comprehensive Income Statements of Financial Position Statements of Changes in Equity Statements of Cash Flows Notes to the Financial Statements Supplementary Information – Breakdown of Retained Earnings into Realised and Unrealised Form of Proxy 2 4 8 10 24 38 42 43 44 49 50 54 58 62 64 68 69 72 84 84 85 87 88 89 91 94 97 234 Financial Statements YTL CORPORATION BERHAD 92647-H FINANCIAL HIGHLIGHTS 2013 Revenue (RM‘000) Profit Before Taxation (RM‘000) Profit After Taxation (RM‘000) Profit for the Year Attributable to Owners of the Parent (RM‘000) Total Equity Attributable to Owners of the Parent (RM’000) Earnings per Share (Sen) Dividend per Share (Sen) Total Assets (RM‘000) Net Assets per Share (RM) 19,972,948 2,313,389 1,845,782 1,274,494 2012 20,195,789 2,450,154 1,974,090 1,181,123 2011 18,354,770 2,351,949 1,835,920 1,034,569 2010 16,505,033 2,278,404 1,619,092 844,165 2009 8,892,125 2,288,197 1,401,615 834,472 13,333,471 12,178,674 10,365,853 ...

Words: 85387 - Pages: 342

Free Essay

Ancient History

...which of the combinations correctly represents the group of letters based on the coding and mark the letter of that combination as your answer. If none of the combinations correctly represents the group of letters, mark (E) i.e. 'None of these' as your answer. Letter : D O U S P N E L T W Q K Z Digit/Symbol Code : 2 @ 9 4 # % 3 8 5 1 $ 6 +   Conditions­ (i) If the first and the last letters are vowels then first letter is coded by the code of third letter. (ii) If the first letter is vowel and the last letter is consonant then both codes are to be interchanged. (iii) If there is no any vowel in the group then third letter is coded by the code of fifth letter.   1. ESNQTO A %4$  @% 5 B %$  @4% 5 C %4% $  @ 5 D % $  @%4 5 E None of these Ans. C Sol. E S N Q T O Condition (i) % 4 % $ 5 @     2. EEKETZ A +36353 B 35363+ C +63533 D 35336+ E None of these Ans. A Sol. E E K E T Z Condition (ii) + 3 6 3 5 3   3. PNTTSZ A #%54+4 B #%454+ C 454+#% D #%4+54 E None of these Ans. B Sol. P N T T S Z Condition (iii) # % 4 5 4 +   4. DZTQLN A 2%+5$  8 B 2+5%$  8 C 5$  %2+ 8 D 2+8$  % 8 E None of these https://mockbank.edoola.com/tests/test­print/united­india­insurance­2016­generalist­ao­mock­test­1/ 1/44 06/06/2016 MockBank ­ United India Insurance 2016 Generalist AO Mock Test­ 1 Ans. D Sol...

Words: 15642 - Pages: 63

Premium Essay

Production Planning with Load Dependent Lead Times and

...Wirtschaftswissenschaften (Dr. rer. pol.) Cumulative Dissertation submitted by Julia Pahl Head of board of examiners: Prof. Dr. Knut Haase First examiner: Prof. Dr. Stefan Voß Second examiner: Prof. Dr. Hartmut Stadtler Date of thesis discussion: 18. May 2012 Contents Table of Contents 1 I Framework of the Thesis 2 1 Production Planning with Load-Dependent Lead Times and Sustainability Aspects 1.1 List of Related Research Articles and Reports . . . . . . . . . . . . . . . . 1.2 Course of Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Conclusions and Research Directions . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4 5 7 9 2 Cumulative Doctoral Thesis 2.1 Three Thematically Related Research Articles and Reports . . . . . . . . . 2.2 Co-Authors and Substantial Contribution of Candidate . . . . . . . . . . . 2.3 Publication of Research Articles and Reports . . . . . . . . . . . . . . . . 10 10 11 12 3 Curriculum Vitae 13 II Literature 21 1 Part I Framework of the Thesis 2 Chapter 1 Production Planning with Load-Dependent Lead Times and Sustainability Aspects The research contained in this thesis was undertaken partly as an external doctoral candidate and partly as a research and teaching assistant at the Institute of Information Systems, University of Hamburg. It contains eight articles and a technical report...

Words: 148849 - Pages: 596

Premium Essay

Tuberculosis

...Strategies for Tuberculosis Control from Experiences in Manila: The Role of Public-Private Collaboration and of Intermittent Therapy INAUGURALDISSERTATION zur Erlangung der Würde eines Doktors der Philosophie vorgelegt der Philosophisch-Naturwissenschaftlichen Fakultät der Universität Basel von Christian Auer aus Bottmingen (BL) Basel, Mai 2003 Genehmigt von der Philosophisch-Naturwissenschaftlichen Fakultät der Universität Basel auf Antrag von Herrn Prof. Dr. Marcel Tanner und Herrn Professor Dr. Klaus M. Leisinger Basel, den 6. Mai 2003 Prof. Dr. Marcel Tanner Dekan DEDICATION In memory of Aling Tess and Mang Tony, former neighbours of mine, victims of tuberculosis, the unrestrained killer that terminates daily the lives of 5000 people. With the sincere hope and plea that some findings and thoughts of this dissertation will contribute to reducing tuberculosis and poverty. “The appalling global burden of tuberculosis at the turn of the millennium, despite the availability of effective control measures, is a blot on the conscience of humankind. For developing countries, the situation has become desperate and the "cursed duet" of tuberculosis and AIDS is having a devastating impact on large sections of the global community. The vital question is, can despair be turned to hope early in the next millennium?” John Grange and Almuddin Zumla, 1999 TABLE OF CONTENTS Acknowledgements Summary Zusammenfassung Abbreviations i iii vii...

Words: 23795 - Pages: 96

Free Essay

Matha

...Higher Engineering Mathematics In memory of Elizabeth Higher Engineering Mathematics Sixth Edition John Bird, BSc (Hons), CMath, CEng, CSci, FIMA, FIET, MIEE, FIIE, FCollT AMSTERDAM • BOSTON • HEIDELBERG • LONDON • NEW YORK • OXFORD PARIS • SAN DIEGO • SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Newnes is an imprint of Elsevier Newnes is an imprint of Elsevier The Boulevard, Langford Lane, Kidlington, Oxford OX5 1GB, UK 30 Corporate Drive, Suite 400, Burlington, MA 01803, USA First edition 2010 Copyright © 2010, John Bird, Published by Elsevier Ltd. All rights reserved. The right of John Bird to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise without the prior written permission of the publisher. Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone (+44) (0) 1865 843830; fax (+44) (0) 1865 853333; email: permissions@elsevier.com. Alternatively you can submit your request online by visiting the Elsevier web site at http://elsevier.com/locate/permissions, and selecting Obtaining permission to use Elsevier material. Notice No responsibility is assumed by the publisher for any injury and/or damage to persons or property as a matter of products...

Words: 203239 - Pages: 813