...David McCon March 31, 2014 Unit 2 Assignment 1 Introduction to Programming The first thing a professional programmer will usually do to gain the understanding of a problem is to work directly with, and interview the customer. What is pseudocode? Pseudocode is an informal language that has no syntax rules, and is not meant to be compiled or executed. Computer programs typically perform what three steps? Computer programs usually follow the following three steps: 1) Input is received. 2) Some process is performed on the input. 3) Output is produced. What does the term “user- friendly” mean? User friendly- easy to use, simple, not complicated Algorithm Workbench 1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height. 1. Display “enter height here” 2. Input height 3. save in word document named height 2. Design an algorithm that prompts the user to enter his or her favorite color and stores the user’s input in a variable named color. 1. Display “enter favorite color” 2. Input favorite color 3. Save in word document named favorite color. Total Purchases 4: #include <iostream> using namespace std; int main(void) { //declarations double item1 = 0; double item2 = 0; double item3 = 0; double item4 = 0; double item5 = 0; double subtotal = 0; double total...
Words: 400 - Pages: 2
...PERSPECTIVE The logic of indirect speech Steven Pinker*†, Martin A. Nowak‡, and James J. Lee* *Department of Psychology, and ‡Program for Evolutionary Dynamics, Departments of Mathematics and Organismic and Evolutionary Biology, Harvard University, Cambridge, MA 02138 Edited by Jeremy Nathans, Johns Hopkins University School of Medicine, Baltimore, MD, and approved December 11, 2007 (received for review July 31, 2007) When people speak, they often insinuate their intent indirectly rather than stating it as a bald proposition. Examples include sexual come-ons, veiled threats, polite requests, and concealed bribes. We propose a three-part theory of indirect speech, based on the idea that human communication involves a mixture of cooperation and conflict. First, indirect requests allow for plausible deniability, in which a cooperative listener can accept the request, but an uncooperative one cannot react adversarially to it. This intuition is supported by a game-theoretic model that predicts the costs and benefits to a speaker of direct and indirect requests. Second, language has two functions: to convey information and to negotiate the type of relationship holding between speaker and hearer (in particular, dominance, communality, or reciprocity). The emotional costs of a mismatch in the assumed relationship type can create a need for plausible deniability and, thereby, select for indirectness even when there are no tangible costs. Third, people perceive language as a digital...
Words: 6875 - Pages: 28
...1. CPU (Computer Processing Unit): the key component of a computer system, which contains the circuitry necessary to interpret and execute program instructions. 2. RAM (Random Access Memory): computer memory available to the user for creating, loading, or running programs and for the temporary storage and manipulation of data, in which time of access to each item is independent of the storage sequence. As a storage medium, RAM is volatile, so its contents are lost when the power fails or is turned off 3. ROM (Read Only Memory): computer memory in which program instructions, operating procedures, or other data are permanently stored, generally on electronic chips during manufacture and that ordinarily cannot be changed by the user. 4. Firmware: a microprogram stored in ROM, designed to implement a function that had previously been provided in software. 5. Operating system: the collection of software that directs a computer's operations, controlling and scheduling the execution of other programs, and managing storage, input/output, and communication resources. 6. Application program: a program used for a particular application 7. Machine language: a coding system built into the hardware of a computer, requiring no translation before being run. 8. Binary: A system of numerical notation to the base 2, in which each place of a number, expressed as 0 or 1, corresponds to a power of 2 9. Main memory: program-addressable storage that is directly controlled...
Words: 913 - Pages: 4
...Introduction to OOPs ------------------------------------------------- 1.1 STRUCTURED INTRODUCTION Structured programming (known as modular programming) is a subset of procedural programming that enforces a logical structure in the programming being written, to make it more efficient and easier to understand and modify. Structured programming frequently employs a top-down design model, in which developers map out the overall program structure into separate subsections. A defined function or a set of similar functions coded in separate modules can be reused in other programs. After a module has been tested individually, it is then integrated with other modules into the overall program structure. Program flow follows a simple hierarchical model that employs looping constructs such as 'for,' 'repeat' and 'while.' Use of the 'Go To' statement is discouraged in structured programming. Structured programming was first suggested by the mathematicians Corrado Bohm and Guiseppe Jacopini. They demonstrated that any computer program can be written with just three structures: decision, sequences and loops. In structured programming coders break larger pieces of code into shorter subroutines (functions, procedures, methods, blocks or otherwise) that are small enough to be understood easily. In general, programs should use local variables and take arguments by either value or reference. These techniques help to make isolated small pieces of code easier to understand the whole program at once...
Words: 2729 - Pages: 11
...Variable Name | Problem(Yes or No) | If Yes, What is wrong? | Declare Real creditsTaken | NO | | Declare Int creditsLeft | YES | INT can only hold whole numbers, cant account for half credits. | Declare Real studentName | Yes | Needs to be string not Real. Real is for numbers | Constant Real creditsNeeded = 90 | No | | Step 1 Step 2 What is wrong with the following calculation? Set creditsLeft = creditsTaken – creditsNeeded The calculation is backwards, if left as is it would read a negative number. It should be Set creditLeft = creditsNeeded – creditsTaken. Step 3 Display “The student’s name is”, studentName The student’s name is Nolan Owens Step 4 Display “The Network Systems Administration degree is awarded after 90 credits and”, studentName, “has”, creditsLeft, “left to take before graduation.” The Network System Administration degree is awarded after 90 credits and Nolan Owens has 70 left to take before graduation. Step 5 1. //Provide documentation on line 2 of what this program does 2. //This program shows how many credits a student needs to graduate from Network System Administration. 3. //Declare variables on line 4, 5, 6, and 7 4. Declare Real creditsTaken 5. Declare Real creditsLeft 6. Declare String studentName 7. Declare Constant Integer creditsNeeded = 90 8. //Ask for user input of studentName and creditsTaken on line 9-12 9. Display “What is the student’s name?” 10. Input studentName 11....
Words: 275 - Pages: 2
...7072 01266 MACRO ECONOMICS D 11:0 - 12:30 ST 7072 01267 MACRO ECONOMICS E 12:30 - 2:0 MW 7072 01268 MACRO ECONOMICS F 2:0 - 3:30 ST 7072 01269 MACRO ECONOMICS G 3:30 - 5:0 MW 7072 01270 MACRO ECONOMICS H 5:0 - 6:30 ST 7072 BEHAVIORAL SCIENCE 00783 INTRODUCTION TO BEHAVIORAL SCIENCE A 3:30 - 5:0 MW 154 00784 INTRODUCTION TO BEHAVIORAL SCIENCE B 5:0 - 6:30 ST 154 00785 INTRODUCTION TO BEHAVIORAL SCIENCE D 9:30 - 11:0 ST 154 00787 INTRODUCTION TO BEHAVIORAL SCIENCE E 11:0 - 12:30 MW 154 00788 INTRODUCTION TO BEHAVIORAL SCIENCE F 12:30 - 2:0 ST 154 00789 INTRODUCTION TO BEHAVIORAL SCIENCE G 2:0 - 3:30 MW 154 00790 INTRODUCTION TO BEHAVIORAL SCIENCE H 3:30 - 5:0 ST 154 00791 INTRODUCTION TO BEHAVIORAL SCIENCE I 5:0 - 6:30 MW 154 INTRO TO PROGRAMMING 00030 INTRO TO PROGRAMMING (BBA) A 8:0 - 10:0 S 432 LABORATORY 8:0 - 11:0 T CL7...
Words: 479 - Pages: 2
...MATHEMATICAL PROGRAMMING - INDR. 363 (1) 2011 FALL Class Meeting Location ENG Z27 Class Meeting Times TH B3,TU B3 Instructor Office Hours Office Location Office Phone Email Web Address Number of Credits ETC Credit Prerequisites Language ONUR KAYA W 14:00-16:00 ENG 206 1583 okaya@ku.edu.tr 3 6 INDR. 262 English Assistant TA/RA/Lab Assistant Name AYLİN LELİZAR POLAT GÜLÇİN ERMİŞ Email aypolat@ku.edu.tr gulermis@ku.edu.tr Office Hours Office Location Course Description Introduction to modeling with integer variables and integer programming; network models, dynamic programming; convexity and nonlinear optimization; applications of various optimization methods in manufacturing, product design, communications networks, transportation, supply chain, and financial systems. Course Objectives The course is designed to teach the concepts of optimization models and solution methods that include integer variables and nonlinear constraints. Network models, integer, dynamic and nonlinear programming will be introduced to the students. Students will be exposed to applications of various optimization methods in manufacturing, product design, communications networks, transportation, supply chain, and financial systems. Several different types of algorithms will also be presented to solve these problems. The course also aims to teach how to use computer programs such as Matlab and GAMS to solve mathematical models. Learning Outcomes Students are expected to model...
Words: 768 - Pages: 4
...Programming Assignment 1 (Submit by Sunday of Week 6) Preliminary Steps 1. Invoke Visual Basic by following the directions in section 2.2, pp. 20– 23. 2. Perform the text box, button, label, and list box walkthroughs, pp. 23– 30. 3. Perform the event procedure walkthrough, pp. 38–43. Programming Exercises Do the following exercises from An Introduction to Programming Using Visual Basic 2010. a. Exercise no. 70, p. 67 b. Exercise no. 40, p. 82 To submit your assignment, first create a ZIP file of the application folder for each exercise (see “Appendix: A Note on Submitting Programming Assignments” at the end of the syllabus). Then upload and submit both ZIP files (compressed folders) to the assignment link provided in the Assignments area of the course Web site. S-18 ASSIGNMENT MODULE 5 Learning Objectives After successfully completing this assignment, you should be able to: Write programs in Visual Basic 2010 while being guided by the six steps of the program development cycle: analyze the problem, design a solution, choose the interface, write code, test and debug your solution, and document your code. Incorporate input and output methods, including reading data from sequential files, obtaining user input to input boxes, and displaying boxes, and displaying messages in message boxes. Study Assignment Assigned Reading Read chapter 3, section 3.3, in An Introduction to Programming Using Visual Basic 2010, 8th ed., by Schneider. Read the...
Words: 660 - Pages: 3
... | | |Information Systems & Technology | | |PRG/211 Version 4 | | |Algorithms and Logic for Computer Programming | Copyright © 2012, 2011, 2010 by University of Phoenix. All rights reserved. Course Description This course provides students with a basic understanding of programming development practices. Concepts covered include the application of algorithms and logic to the design and development of procedural and object oriented computer programs to address the problem solving requirements associated with business information systems. This course will cover procedural programming concepts including data types, controls structures, functional decomposition, arrays, and files, classes and objects. Policies Faculty and students/learners will be held responsible for understanding and adhering to all policies contained within the following two documents: • University policies: You must be logged into the student website to view this document. • Instructor policies: This document is posted in the Course Materials forum. University policies are...
Words: 1735 - Pages: 7
...Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune Pattern 2008, w.e.f. 2010-11 Semester – V Course No. 501 502 503 504 505 506 Subject Name VB.NET or VB.NET Programming Internet Programming and Cyber Law Principals of Marketing Core Java Project work ( VB ) Computer Laboratory and Practical Work (.NET + Core Java ) Semester – VI Course No. 601 602 603 604 605 606 Subject Names E-Commerce Multimedia Systems Introduction to Syspro And Operating Systems Advance Java Project Work (Banking & Finance, Cost Analysis, Financial Analysis, Payroll, EDP, ERP etc.) Computer Laboratory and Practical Work (Multimedia + Advanced Java) University of Pune, T.Y. B.C.A., Semester V & VI 2 T.Y. B.C.A. Semester V Subject Name -: VB.NET or VB.NET Programming. Course Code -: 501 Sr. No. 1. TOPICS .NET Framework (Introduction to .NET Framework) 1.1 Introduction 1.2 CLR 1.3 CTS 1.4 MSIL 1.5 Garbage Collection 1.6 Assemblies 1.6.1 Assembly content 1.6.2 Assembly types VB.Net Programming 2.1 Windows Forms 2.1.1. Setting Title Bar Text 2.1.2. Seeing the initial position of a form 2.1.3. Minimizing/Maximising a form 2.1.4. Working with multiple forms 2.1.5. Setting the StartUp Form 2.1.6. Adding controls to a form 2.1.7. Setting properties at Design Time...
Words: 3973 - Pages: 16
...CAPITOL UNIVERSITY College of Computer Studies Introduction to Programming Activity Book Compiled by: Mark Godfrey D. Torres 2012 Introduction to Programming ii Table of Contents Weeks 1 to 3 – Creating Your First Java Classes ....................................................................................... 1 Objectives ........................................................................................................................................... 1 Summary ............................................................................................................................................ 1 The Don’ts........................................................................................................................................... 2 Key Terms ........................................................................................................................................... 3 Seatwork............................................................................................................................................. 6 Where to Save Your Files ................................................................................................................. 6 Configuring Windows to Work with the Java SE Development Kit................................................... 6 Your First Application ........................................................................................................................
Words: 4647 - Pages: 19
...PRINCIPLES OF PROGRAMMING LANGAUAGES Sub Code: IA Marks: Hrs/Week: 04 Exam Hours: 03 Total Hrs: 42 Exam Marks: 100 UNIT I 1. Introduction 4 Hrs Toward higher level languages, Programming paradigms, Language implementation: Bridging the gap, Expression notations, Abstract syntax trees. 2. Types : Data Representation 6 Hrs Elementary data types – Data objects, Variables and Constants, Data types, Declarations, Type checking and type conversion. Numeric data types, Enumerations, Booleans, characters. Structural data types- Structured data objects and data types, Specification of data structure types, Implementation of data structure types, Vectors and arrays, Records, Type equivalence. UNIT II 3. Imperative Programming 6 Hrs Basic statements, Structured sequence control, Handling special cases in loops, Programming with invariants, Proof rules for partial correctness. Procedure activations – simple call-return subprograms, Parameter passing methods, Scope rules for names...
Words: 403 - Pages: 2
...C++LOCATION OF VIDEONOTES IN THE TEXT Chapter 1 Designing a Program with Pseudocode, p. 19 Designing the Account Balance Program, p. 24 Predicting the Output of Problem 30, p. 24 Solving the Candy Bar Sales Problem, p. 25 Using cout to Display Output, p. 32 Assignment Statements, p. 59 Arithmetic Operators, p. 61 Solving the Restaurant Bill Problem, p. 72 Using cin to Read Input, p. 75 Evaluating Mathematical Expressions, p. 81 Combined Assignment Operators, p. 102 Solving the Stadium Seating Problem, p. 151 Using an if Statement, p. 162 Using an if/else Statement, p. 172 Using an if/else if Statement, p. 175 Solving the Time Calculator Problem, p. 236 The while Loop, p. 249 The for Loop, p. 263 Nested Loops, p. 277 Solving the Ocean Levels Problem, p. 299 Defining and Calling Functions, p. 306 Using Function Arguments, p. 316 Value-Returning Functions, p. 326 Solving the Markup Problem, p. 380 Creating a Class, p. 391 Creating and Using Class Objects, p. 393 Creating and Using Structures, p. 436 Solving the Car Class Problem, p. 480 Accessing Array Elements, p. 487 Passing an Array to a Function, p. 517 Two-Dimensional Arrays, p. 526 Solving the Chips and Salsa Problem, p. 567 Performing a Binary Search, p. 580 Sorting a Set of Data, p. 587 Solving the Lottery Winners Problem, p. 616 (continued on next page) Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 LOCATION OF VIDEONOTES IN THE TEXT Chapter 10 Pointer Variables...
Words: 11246 - Pages: 45
...Instructor’s Solutions Manual to Concepts of Programming Languages Tenth Edition R.W. Sebesta ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Preface Changes for the Tenth Edition T he goals, overall structure, and approach of this tenth edition of Concepts of Programming Languages remain the same as those of the nine earlier editions. The principal goals are to introduce the main constructs of contemporary programming languages and to provide the reader with the tools necessary for the critical evaluation of existing and future programming languages. A secondary goal is to prepare the reader for the study of compiler design, by providing an indepth discussion of programming language structures, presenting a formal method of describing syntax and introducing approaches to lexical and syntatic analysis. The tenth edition evolved from the ninth through several different kinds of changes. To maintain the currency of the material, some of the discussion of older programming languages has been removed. For example, the description of COBOL’s record operations was removed from Chapter 6 and that of Fortran’s Do statement was removed from Chapter 8. Likewise, the description of Ada’s generic subprograms was removed from Chapter 9 and the discussion of Ada’s asynchronous message passing was removed from Chapter 13. On the other hand, a section on closures, a section on calling subprograms indirectly, and a section on generic functions in...
Words: 7025 - Pages: 29
...Guide Computers in Society Introduction to Data Organisation and Management Trigonometry Linear Algebra I Elementary Mechanics Heat and Properties of Matter Introductory Practical Physics I * Students are expected to offer at least one elective course per semester. Also they can only register a maximum of 25 units per semester Total Credit Unit - Compulsory Total Credit Unit - Elective Total Credit Units 2 2 2 2 2 2 2 2 2 C C C C C C C C C 18 0 18 2 2 2 2 2 2 2 2 2 2 C C C C C C C C C C 2nd Semester GST 102 Use of English and Communication Skills II GST 105 History and Philosophy of Science CIT 102 Software Application Skills MTH 102 Introductory Statistics MTH 112 Differential Calculus MTH 122 Integral Calculus MTH 142 Vectors and Geometry PHY 124 Geometric and Wave Optics PHY 132 Electricity, Magnetism and Modern Physics PHY 192 Introductory Practical Physics II * Students are expected to offer at least one elective course per semester. Also they can only register a maximum of 25 units per semester Total Credit Unit - Compulsory Total Credit Unit - Elective Total Credit Units 20 0 20 200 Level Course Code 1st Semester GST 201 CIT 211 GST 203 CIT 213 CIT 215 CIT 237 MTH 211 MTH 213 MTH 241 MTH 281 Course Titles Unit(s) Status Nigerian Peoples and Cultures Introduction to Operating Systems Introduction to Philosophy and Logic Elementary Data Processing Introduction to Programming Languages Programming & Algorithms Introduction to Set Theory and Abstract Algebra...
Words: 911 - Pages: 4