# Programming

Submitted By polina12
Words 835
Pages 4
Polina Sasinovich
Ex.2, p.16
1)

Extended program listing

1
2

Operation A,B,C,D,E,F,G,H
SIMULATE 2
GENERATE 10,5
TERMINATE 1
START
END

!

Polina Sasinovich

80

Line no. 1
2
3
4
5
6
7

Line 3: customers arrive at an exhibition every 10 minutes on average with a standart deviation of 5 minutes.
Line 4: one customers takes 1 brochure.
Clock

795.04

Block counts
1
2

Oper. Current
GENERA
TERMIN

Total
80
80

-------------------------------------------------------------Run nr

2

Clock

756.04

Block counts
1
2

Oper. Current
GENERA
TERMIN

Total
80
80

2) Extended program listing

1
2

Operation A,B,C,D,E,F,G,H
SIMULATE 2
GENERATE 10,5
TERMINATE 2
START
END

!

Polina Sasinovich

80

Line no. 1
2
3
4
5
6
7

Line 3: customers arrive at an exhibition every 10 minutes on average with a standart deviation of 5 minutes.
Line 4: one customers takes 2 brochures.
Clock

395.85

Block counts
1
2

Oper. Current
GENERA
TERMIN

Total
40
40

-------------------------------------------------------------Run nr

2

Clock

374.21

Block counts
1
2

Oper. Current
GENERA
TERMIN

Total
40
40

3) Extended program listing

1
2

Operation A,B,C,D,E,F,G,H
SIMULATE 2
GENERATE 10,5
TERMINATE 2
START
END

Clock

!

Polina Sasinovich

79

Line no. 1
2
3
4
5
6
7

395.85

Block counts
1
2

Oper. Current
GENERA
TERMIN

Total
40
40

-------------------------------------------------------------Run nr

2

Clock

374.21

Block counts
1
2

Oper. Current
GENERA
TERMIN

Total
40
40

After reducing the quantity of brochures by 1, the…...

### Similar Documents

#### Programming

...times 4 and stores the result in a c. Divides a by 3.14 and stores the result in b d. Subtracts 8 from b and stores the result in a 8. Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total. 9. Write a pseudocode statement that subtracts the variable downPayment from the variable total and assigns the result to the variable due. 11. If the following pseudocode were an actual program, what would it display? Declare Integer a = 5 Declare Integer b = 2 Declare Integer c = 3 Declare Integer result Set result = a + b * c Display result 12. If the following pseudocode were an actual program, what would it display? Declare Integer num = 99 Set num = 5 Display num PROGRAMMING EXERCISES (Input, processing, and output) 2. Sales Prediction A company has determined that its annual profit is typically 23 percent of total sales. Design a program that asks the user to enter the projected amount of total sales, and then displays the profit that will be made from that amount. Hint: Use the value 0.23 to represent 23 percent 3. Land Calculation One acre of land is equivalent to 43,560 square feet. Design a program that asks the user to enter the total square feet in a tract of land and calculates the number of acres in the tract. Hint: Divide the amount entered by 43,560 to get the number of acres. 4. Total Purchase A customer is a store is purchasing five items. Design a program that asks......

Words: 1054 - Pages: 5

Free Essay

#### Programming

...Definitions ........................................................................................16 Datafile ............................................................................................................16 Record ..............................................................................................................16 Field ..................................................................................................................16 Key....................................................................................................................16 Search Key........................................................................................................17 A Quick Introduction to Object-Oriented Programming ......................................18 Problems with Procedural Languages ..............................................................18 Objects in a Nutshell ........................................................................................19 A Runnable Object-Oriented Program ............................................................21 Inheritance and Polymorphism ........................................................................24 New C++ Features ................................................................................................25 The string Class..............................................................................................25 The vector......

Words: 10065 - Pages: 41

#### Programming

...flowcharts to describe a program’s structure. Use pseudocode to define a program’s structure. Formulate solution algorithms for calculations by properly following the order of operations. Assignment Requirements Answer: * Short Answer 1, 2, 3, and 4 on page 71 * Algorithm Workbench Review Questions 1 and 2 on page 71 * Programming Exercises Questions 1 and 4, starting on page 72 Required Resources Textbook Submission Requirements Submit your written answers to your instructor at the beginning of Unit 3. Unit 2 Research Assignment 1: Researching Variable Naming Rules Learning Objectives and Outcomes Determine program input, processing, and output stages. Create the necessary flowcharts to describe a program’s structure. Use pseudocode to define a program’s structure. Formulate solution algorithms for calculations by properly following the order of operations. Assignment Requirements Use the Internet and the ITT Tech Virtual Library to research the following questions: What are the variable naming rules of Visual Basic, Python, and Java? List three similarities and differences in between the three programming languages. Required Resources Textbook ITT Tech Virtual Library: http://library.itt-tech.edu Submission Requirements Submit your written answers to your instructor at the beginning of Unit 3. Labs Unit 2 Lab 2.1: Pseudocode Learning Objectives and Outcomes * Use pseudocode to define a program’s structure. *......

Words: 450 - Pages: 2

#### Programming

...Question: Analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array. The specific problem you need to solve for the final project is: Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. 2. What is the required output? What is the necessary input? How you will obtain the required output from the given input? Clearly describe variable names and definitions. Include all necessary formulas and example calculations. 3. Display pseudocode of your overall design including the Main module and the order of the module, subprogram and function calls. 4. Create a Hierarchy chart for the overall program in raptor 5. detailed pseudocode for each module, subprogram and function. 6. Add pseudocode comments with all major functionality and most minor functionality commented 7. Show test plan covering all major functionality and most minor functionality. Multiple Input and expected output provided for most modules. SOLUTION: Analysis: For this program, user will be asked for name, age and state of their family members, one by one, until the user decides to stop entering this information. To achieve the given task (printing average family......

Words: 919 - Pages: 4

Free Essay

#### Programming

...Programming 1 - Semester 1, 2015 Assignment 1 Release Date: 27 / 02 /2015 Total raw marks: 60 Assignment weight: 6% NOTE: This assignment is to be undertaken individually—no group work is permitted. Background information For this assignment you are to complete a partially completed menu-driven, Java console application, which allows the user to select one of four options:     Display Time and Date Swim Fitness Summary Calculator Sentence Analyser Exit The incomplete code solution (in the source file called MenuDrivenProgram.java) is in the same Assignment 1 folder, available via myRMIT. The partially completed program already has code to display the menu. You should study the code and then compile and execute it without implementing the following options. This will allow you to understand the flow of execution of the program, as is. a) Once the processing for the selected option has been completed the program should return to the menu (that is, the program should not terminate). b) You do not need to handle runtime errors of any kind for this assignment and you may assume that the user will always enter input in the correct format. This applies both to the menu itself and the processing of the menu options. Program Features Menu Option A - Display Time and Date (10 marks) The program should retrieve the current time and date from the system and then display it in the format shown......

Words: 1404 - Pages: 6

Free Essay

#### Programming

...- -[ ] http://blog.renren.com/blog/73603/740437492 » / [ ] 2011-07-18 10:47 | ( : ) http://coolshell.cn/articles/4990.html 6 12 programming An open letter to those who want to start id Mailper Python Web “ Build Your Programming Technical Skills “ ( ) Notes/ActiveX/COM/ADO/ATL/.NET …… Mailper Delphi/Power builder ” Lotus 5 3D TA 561 ” The architecture of w-ai.org –... Some updates and my first Engl... / 10 Unix/Linux Windows 1 Linux Web+ 1 Python/Ruby Web 2 iOS Android Windows Windows Windows Linux+ Windows 9 : csv ( log python csv, python open, python sys) 52 word count (sys, os, path) (python sqlite) print Google (phrase, domain, use reader to follow tech blogs) 2 ( Vim / Emacs / Notepad++ Source Insight ( ctag) Cool IDE) / / 3 Unix/Linux Shell windows man ls/chmod/chown/rm/find/ln/cat/mount/mkdir/tar/gzip … sed/awk/grep/tail/less/more … ps/top/lsof/netstat/kill/tcpdump/iptables/dd… /etc /var/log /proc linux vmware player Ubuntu 1 6 9/6/13 1:36 PM - -[ ] http://blog.renren.com/blog/73603/740437492 /Linux 4 Web Web HTML CSS HTML Firefox + Firebug Javascript HTML DOM Firefox + Firebug Apache PHP PHP PHP chrome Nginx HTML MySQL MySQL SQL http://www.stanford.edu/~ouster/cgi-bin/cs142-fall10/index.php ) javascript HTTP: The Definite Guide browsers) Cookie/Session jQuery 4 3-5 ExtJS + Ajax ( +JSON (proxy, gateway, Javascript box model chrome DOM......

Words: 807 - Pages: 4

Free Essay

#### Programming

...the module in which its declared and only statements inside that module can access that module can access the variable. 5. The local variable usually beings at the variables declaration and ends at the end of the module which is then the variable is declared. 6. The difference between the both is that only a copy of the arguments value is passed and passing by reference means that the argument is passed into a specific type of parameter. 7. Global variables make debugging difficult because they make programming hard to understand, modules that use global variables are usually dependent and you have to track down every statement. Algorithm Workbench 1. Module main() Declare userNum as Integer Display “Enter a number” Input userNum Call TimesTen(usernum) Display usernum End 5. 13.4 00.0 00.0 6. 1, 3.4 0, 0 0, 0 7. Allows changes the values of passed parameters 1,3.4 0,0 0,0 Doesn’t allow changing of parameters 1,3.4 0,0 1,3.4 Programming Exercises 1. Kilo=input (“Enter distance in kilometers”) Miles=Kilo Print”, Kilo 2. Module TotalPurchase Declare Double amount, total Declare TAX=.06 While I<6 Display “Enter the price” Input amount Total=total+amount I=I+1 End while Display “Subtotal is:” + total Display “Tax is:” + (total*TAX) Display “Total is:”=(total*TAX)+total) End Module...

Words: 309 - Pages: 2

Free Essay

#### Programming

...Calling an external function or program that is written in a different programming language like a Java program within a Visual Basic program you first need to know the Function fundamentals that’s executed in any programming language. I came across this website called maples, where they have the ability to connect to and call functions from other programming languages. Maple uses this for various reasons. Like all other languages, the F# function has a name, it can have parameters, has a body and takes arguments. F# also supports functional programming constructs such as handling functions as values, depleting unnamed functions in expressions, composition of functions to form new functions, curried functions, and the implicit definition of functions by way of the partial application of function arguments. Maple's help system documents all the External Calling functions so you can see what is available. Briefly, however there are functions for converting Maple types to C and back, creating and interacting with Maple data structures creating and interacting with Maple language elements (names, procedures, etc), printing to the Maple interface, memory allocation, evaluating Maple statements and raising exceptions. There is even a C interface to the Task Programming Model. The function-name is an identifier that represents the function. The parameter-list consists of successive parameters that are separated by spaces. You can specify an explicit type for each parameter, as......

Words: 394 - Pages: 2

Free Essay

#### Programming

... | name | nationality | 01 | Pat | British | 02 | Hilary | British | 03 | Sven | Swedish | 04 | Pierre | French | | Event | eid | description | winner | 01 | running |   | 02 | jumping |   | 03 | throwing |   | | Competes | cid | eid | 01 | 01 | 02 | 01 | 03 | 02 | 04 | 02 | 04 | 03 | | Select the BEST answer from the following options based upon the provided data and data structures: Select one: a. There is a British competitor in every event. b. Pierre does not compete in any event c. Sven has been entered in two events d. Pat is competing in the jumping event e. Hilary has entered only the running event Question 1 If we write a program in a programming language and switch to SQL when we require to use the database, then the SQL environment in use is known as _______ SQL. Select one: a. Real - time b. Dynamic c. PL - d. Embedded Question 2 Embedded SQL is which of the following? Select one: a. Hard-coded SQL statements in a program language such as Java. b. The process of making an application capable of generating specific SQL code on the fly. c. Hard-coded SQL statements in a procedure. d. Hard-coded SQL statements in a trigger. Question 3 In JDBC, what represents a single instance of a particular database session? Select one: a. a thread b. an opened connection c. a closed connection d. a pipe Question 4 A relational database query normally......

Words: 4344 - Pages: 18

#### Programming Languages

...Exploring Programming Languages Computers don't do anything without someone telling them what to do, much like the average teenager. To make the computer do something useful, you must give it instructions in either of the following two ways. When you write a program it tells a computer what to do, step by step, just as you would like when taking directions. When you buy a program that someone else has already written, it tells the computer what to do. Ultimately, to get a computer to do something useful, you (or somebody else) must write a program. A program does nothing more than tell the computer how to accept some type of input, manipulate that input, and spit it back out again in some form that humans find useful. Table 1 lists some common types of programs, the types of input that they accept, and the output that they produce. The five popular programming languages in the 1970’s were Pascal, C, SQL, KRL, and COMAL. Pascal is an influential imperative and procedural programming language, designed in 1968–1969 and published in 1970 by Niklaus Wirth. C (/ˈsiː/, as in the letter C) is a general-purpose programming language initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs. SQL was developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. SQL often referred to as Structured Query Language. KRL is a knowledge representation language, developed by Daniel G. Bobrow and Terry Winograd while at Xerox PARC and Stanford......

Words: 839 - Pages: 4

Free Essay

#### Computer Programming

...Computer Programming Computers and machines have definitely changed people's lives over the years influencing academic life, workplace, and even the home setting. Therefore, it is important to become knowledgeable about computers and its different applications. Without doing so can severely affect one's chances in succeeding especially in his or her professional life since majority, if not all, of companies around the world depend on computers and machines. There are numerous jobs that deal specifically on the development of technology, including computers. One of the major careers in the field of computers is computer programming. People who work in this field are responsible for “writing, testing, and maintaining the instructions that computers follow to perform their functions. They also focus on conceiving, designing, and testing logical structures for solving problems by computer” (“Computer Programmers”). Literally, they program computers, softwares, and applications to function the way computers should. In 2007, “40 percent of companies expected to add programmers and information technologists, 45 percent expected to maintain their staffs, and 81 percent planned to increase the salaries of their computer programmers” (“The 2007 Job Market Outlook for Computer Programmers”). However, these numbers are not enough because it seems that the job outlook for this profession is not good. “The occupation is forecasted to grow more slowly than the average for all other......

Words: 911 - Pages: 4

#### C++ Programming

... C++ PROGRAMMING: FROM PROBLEM ANALYSIS TO PROGRAM DESIGN FIFTH EDITION D.S. MALIK Australia  Brazil  Japan  Korea  Mexico  Singapore  Spain  United Kingdom  United States C++ Programming: From Problem Analysis to Program Design, Fifth Edition D.S. Malik Executive Editor: Marie Lee Acquisitions Editor: Amy Jollymore Senior Product Manager: Alyssa Pratt Editorial Assistant: Zina Kresin Content Project Manager: Matthew Hutchinson Art Director: Faith Brosnan Print Buyer: Julio Esperas Cover Designer: Roycroft Design/ www.roycroftdesign.com Cover Photo: ª Guntmar Fritz/Masterfile Proofreader: Green Pen QA Indexer: Elizabeth Cunningham Compositor: Integra ª 2011 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher. For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at www.cengage.com/permissions Further permissions questions can......

Words: 11776 - Pages: 48

#### Programming Timeline

...After researching the programming languages between the eras of 1970s-2000s I discovered there were many types of programming languages being developed at a spectacular rate. The popularity of the languages were dependent upon what you were trying to program. Below you will find a general idea of 5 programming languages and a brief description of those languages. 1970s- PASCAL • Designed in 1968-1969 • Published in 1970 by Niclaus Wirth • Historically influential and procedural programming language • Intended to encourage good programming practices using structured programming and data structuring • Influential imperative and procedural programming language 1980s- C++ (pronounced see plus plus) • Statically typed, free-form, multi-pariadigm, compiled, general-purpose programming language • Middle-level language o Comprises a combination of both high-level and low-level language features • Developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C programming language • Renamed C++ in 1983 • Has imerative, object-oriented, generic programming features • Provides low-level memory manipulation • For use in embedded systems or operating system kernels • Is a compiled language • Available on many platforms and provided by various organizations 1990s- JAVA • Originally developed by James Gosling at Sun Microsystems • Released in 1995 as core component of Sun Microsystems’ Java platform • Derives much of its syntax from C and...

Words: 470 - Pages: 2

Free Essay

#### Programming Solutions

...Programming Solutions Being able to create a solution to a certain problem through programming can be a huge task to undertake, but it is a task that must be accomplished in order to get certain things done. Many companies face problems in the IT field that can be solved through programming, from simple to very complex, these problems usually require some sort of input and variables in order to create a solution. One problem that I face in the workplace of construction, is trying to figure out the number of ceiling tiles we will need to fit the ceilings in most offices we build. The ceiling tiles are a certain size and cover large areas which can be a tedious task trying to count how many tiles it will take to fill in the ceiling. A programming solution could be very beneficial in an instance such as this because by creating inputs such as the size of the tiles and the area they need to cover, an output could be the number of tiles that will be needed and thus saving a large amount of time on counting every space they need to fill. This problem of having to determine the number of ceiling tiles it will take to cover the celling area is normally done by counting the spaces in the ceiling that need to be filled and then determining how many tiles will need to be purchased. By coming up with a program to solve this problem would no doubt save a lot of time and even money by not buying an excess amount and either throwing them away or storing them. I believe a simple program......

Words: 701 - Pages: 3

Free Essay