Free Essay

Programming Languauges

In:

Submitted By RichMetcalf
Words 1974
Pages 8
Introduction to Programming PT-104 | UNIT 1ASSIGNMENT | Research Popular Programming Languages | Associated with the Past Present and Future of Virtualization | | 9/30/2013 |

Introduction to Programming
23 September 2013

Unit 1 Assignment 1 Exploring Programming Languages
Platform virtualization vs. application virtualization
Virtual machines (VMs), in their first incarnation, were created by IBM 60 years ago as a way to share large and expensive mainframe systems. And although the concept is still applied in current IBM systems, the popular concept of a VM has broadened and been applied to a number of areas outside of virtualization.
Virtual machine origins
The first operating system to support full virtualization for VMs was the Conversational Monitor System (CMS). CMS supported both full virtualization and paravirtualization. In the early 1970s, IBM introduced the VM family of systems, which ran multiple single-user operating systems on top of their VM Control Program—an early type-1 hypervisor.
The area of virtualization that IBM popularized in the 1960s is known asplatform (or system) virtualization. In this form of virtualization, the underlying hardware platform is virtualized to share it with a number of different operating systems and users.
Another application of the VM is to provide the property of machine independence. This form, called application (or process) virtualization, creates an abstracted environment (for an application), making it independent of its physical environment.
Aspects of application virtual machines
In the application virtualization space, VMs are used to provide a hardware-independent environment for the execution of applications. For example, consider Figure 1. At the top is the high-level language, which developers use to construct applications. Through a compilation process, this high-level code is compiled into an intermediate representation called object code. In a non-virtualized environment, this object code (which is machine independent) is compiled into the native machine code for execution on the physical platform. But in an application virtualization environment, the object code is interpreted within an abstract machine to provide the execution. The key advantage here is that the same object code can be executed on any hardware platform that supports the abstract machine (the interpreter).
Figure 1. Application VM for platform independence

In addition to creating a portable environment in which to execute the object code, application virtualization provides an environment in which to isolate the VM from other applications running on the host. This setup has a number of advantages, such as detailed resource management and security.
The object code for a VM is also called bytecode, specifically defining an instruction set that an interpreter executes. The term bytecode evolved from implementations that efficiently implemented their virtual instruction sets as single bytes for simplicity and performance.
Now, let's look at some of the historical uses for application virtualization and explore some of its modern uses.

BCPL, then and now
Although BCPL originated in 1966, it's still under active development today by its creator, Martin Richards. BCPL's first compiler was written for the IBM 7094 system under the Compatible Time Sharing System, one of the first time-sharing operating systems developed. Today, you can use BCPL on a variety of systems, including Linux.
Virtual machines today
The use of VMs to provide an abstraction to the physical host is historically a common method and today evolves and finds application. Let's look at some of the newer open source solutions that push the concept of VMs into the future.
Dalvik VM
Dalvik is an open source VM technology developed by Google for the Android operating system. Android is a modified Linux kernel that incorporates a software stack for mobile devices (see Figure 2). Unlike many VM technologies that rely on stack-based architectures, the Dalvik VM is a register-based virtual architecture (see Resources for more information on the architecture and instruction set). Although stack-based architectures are conceptually simple and efficient, they can introduce new inefficiencies, such as larger program sizes (because of stack maintenance).
Figure 2. Simple architecture of a Dalvik software stack

Because Dalvik is the VM architecture, it relies on a high-level language compiled into the bytecodes that the VM understands. Rather than reinvent the wheel, Dalvik relies on the Java language as the high-level language for application development. Dalvik also relies on a special tool called dx to convert Java class files into Dalvik VM executables. For performance, the VM may further modify a Dalvik executable (dex) for further optimizations, including JIT compilation, which translates the dex instructions into native instructions for native performance. This process is also known as dynamic translation and is a popular technique for increasing the performance of VM technologies.
As shown in Figure 2, a Dalvik executable (along with an instance of the VM) is isolated as a single process in Linux user space. The Dalvik VM has been designed to support execution of multiple VMs (in independent processes) simultaneously.
The Dalvik VM is not implemented on the standard Java runtime and therefore does not inherit the licenses over it. Instead, Dalvik is a clean-room implementation published under the Apache 2.0 license.
Parrot
Another interesting open source VM project is Parrot. Parrot is another register-based VM technology that was designed to efficiently execute dynamic languages (languages that perform certain operations at run time that are commonly performed at compile time, such as altering the type system).
Parrot was originally designed as a run time for Perl6, but it is a flexible environment for execution of bytecodes for many languages (see Figure 3). Parrot supports several input forms, including the Parrot Abstract Syntax Tree (PAST), which is useful for compiler writers; the Parrot Intermediate Representation (PIR), which is a high-level representation that can be written by people or automatically by compilers; and the Parrot Assembly (PASM), which is below the intermediate representation but useful both for people and for compilers. Each form is translated and executed in Parrot bytecode on the Parrot VM.
Figure 3. Simple architecture of the Parrot VM

Parrot supports a large number of languages, but one aspect that makes it so interesting is its support for both static and dynamic languages, including specific support for functional languages. Listing 1 shows a simple use of PASM. To install Parrot with Ubuntu, simply use apt-get: sudo apt-get install parrot
Even with the high-level abstraction that PASM provides, PIR is even more comfortable to high-level programmers. Listing 2 provides an example program written in PIR and executed by the Parrot VM. This example declares a subroutine called square that squares the number and returns it. This process is called by the main subroutine (labeled with :main to tell Parrot to run it first) to print the result.
Parrot provides a rich application virtualization environment for the development of machine-independent applications that also seek high efficiency. You can find a large number of languages that support compiler front ends designed for Parrot, including C, Lua, Python, Scheme, Smalltalk, and many others.
The Future
So far, you've seen the historical uses of application virtualization, including two recent examples. Dalvik is powering application development within current handsets, and Parrot provides an efficient framework for compiler writers for static and dynamic languages. But the concept of application virtualization is being implemented in a number of other areas outside of the approaches explored thus far.
One particularly interesting use is likely running on the computer you're using right now. Systems that use the new Extensible Firmware Interface (EFI), which is a BIOS replacement, can implement firmware drivers in what's called the EFI Byte Code (EBC). The systems firmware includes an interpreter that is invoked when an EBC image is loaded. This concept was also implemented in Open Firmware by Sun Microsystems using Forth (a language that includes its own VM).
In the game world, the use of application virtualization is not new. Many modern games include scripting of nonplayer-character behaviors and other game aspects using languages that execute bytecodes (such as Lua). But the concept of application virtualization in games actually goes back much farther.
Infocom, the company that introduced text-based adventures such as Zork, saw the value in machine independence in 1979. Infocom created a VM called the Z-machine (named after Zork). The Z-machine was a VM that permitted an adventure game to be more easily ported to other architectures. Rather than having to port the entire adventure to a new system, an interpreter would be ported that represented the Z-machine. This functionality simplified the porting process to other systems that may have different language support and entirely different machine architectures. Although Infocom's goal was to ease the pain in porting between the architectures of their day, their work continues to simplify porting and results in making these games accessible to a new generation (even on mobile platforms).
Other game applications of VMs include the ScummVM (which provides a VM environment for the Script Creation Utility for Maniac Mansion (SCUMM) scripting language (created in 1987). SCUMM was developed by LucasArts to simplify development of a graphical adventure game. ScummVM is now used to play a large number of text and graphical adventure games on a variety of platforms.
Summary
There are several uses of the term “virtual machine”. In general they seem to describe a program that behaves somehow as a machine. The “Java Virtual Machine” is such a usage. I want to tell here about a narrower earlier kind of virtual machine that was once better known among programmers. (As of 2006 the original idea has become better known again.)
When IBM introduced the 360 model 67, circa 1967, it was IBM’s first major system with virtual memory. When the machine was announced a software system called TSS was promised. Perhaps this was a reaction to the earlier Multics announcement. TSS was a substantial departure from IBM’s other systems and was slow to be delivered. A team of IBM people in Cambridge MA conceived and built a program for the 67 that would provide the illusion of several standard 360’s which lacked virtual memory. This program was called CP 67. The Cambridge team also produced a simple interactive one user operating system called CMS. CMS would run happily and efficiently on one of the virtual machines provided by CP 67, or on a real 360 for that matter. Tom Van Vleck provides very interesting history and references. In fact he provides much of the information that I had intended to write here. I will repeat little of his information here.
As of several years ago, VM/370, a direct descendant of CP 67, was used about equally by users of CMS and those who needed to run various alternate operating systems for reasons such as testing.
Today a rather direct descendant of CMS runs on VM/390. IBM has had a policy for about two decades now of phasing out VM. It is yet heavily used inside and outside of IBM. Ironically the developers of competing operating system within IBM use CP/390 very heavily to test and debug their systems. IBM now (1999) recommends VM/390 for Y2K testing. Here is an interesting brochure describing IBM’s 2006 virtual offering which claims VM/370 heritage.
VMware provides a similar system for Intel 32 bit machines. Many of the points of their FAQ make sense in light of virtual machine strategies. OpenVX is an open source project. Xen from Cambridge University is a similar open source system. Intel’s Vanderpool technology should make their new hardware more adept at virtual machines.
I hope the reader can see what I tried to do here, I brought the course subject of programming and integrated with an area that I am personally interests me and the will define the future and development of more complex but and usable code and we just might get that machine to say maybe. 1

Similar Documents

Premium Essay

Principle of Programming Languauges

...Q1. Decide which of the following identifier forms is most readable, and then support that decision. SumOfSales sum_of_sales SUMOFSALES Ans: The identifier “sum_of_sales” is most readable because it is clearly identify the meaning of the variable. The underscore will separate the word which clearly define the meaning that this variable is used to store the sum vales of the sales. That’s why we will decide this identifier. Q2. Some of the programming languages are type less. What are the advantages and disadvantages of having no types in a language? Ans: Type less languages are those languages in which we don’t need to specify the type of the variables used in a program. The compiler implicitly take the type of the variable according to the value assigned to it. Advantages: * We don’t need to specify the type of variable which reduce the limitation for assigning the values. * Type less languages allow to perform the different operations, because it implicitly convert the types of variable. Disadvantages: * Sometimes we don’t want to take the variables types dynamically, we have to specify the type explicitly for our required operation * It is difficult to guess the types of variable in type less language, because it depends on the type of the value assigned to it. Q3. Consider the following Pascal program skeleton Program main var x, y, z : integer Procedure sub1; var a, y, z : integer procedure sub2; var a, b, z : integer; ...

Words: 344 - Pages: 2

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

Free Essay

Flash

...import flash.display.MovieClip; import flash.events.MouseEvent; //Declaring variables //ballMotionMc var ballMotion:MovieClip = ballMotionMc; var ballShape:MovieClip = ballMotionMc.ballShapeMc; //menuMc var menu:MovieClip = menuMc; var prevBtn:MovieClip = menuMc.prevBtnMc; var nextBtn:MovieClip = menuMc.nextBtnMc; var stopBtn:MovieClip = menuMc.stopBtnMc; var playBtn:MovieClip = menuMc.playBtnMc; var pauseBtn:MovieClip = menuMc.pauseBtnMc; //Init //ballMotionMc ballMotion.stop(); ballShape.stop(); //menuMc prevBtn.stop(); nextBtn.stop(); stopBtn.stop(); playBtn.stop(); pauseBtn.stop(); //Events playBtn.addEventListener(MouseEvent.MOUSE_OVER,playBtnOver); playBtn.addEventListener(MouseEvent.MOUSE_OUT,playBtnOut); playBtn.addEventListener(MouseEvent.MOUSE_DOWN,playBtnDown); //Functions function playBtnOver(e:MouseEvent)( playBtn.gotoAndStop(2); ) function playBtnOut (e:MouseEvent)( playBtn.gotoAndStop(1); ) function playBtnDown (e:MouseEvent)( ballMotion.play(); ballShape.play(); ) import flash.media.Sound; import flash.media.SoundChannel; import flash.display.MovieClip; stop();// Assign The URL to the mp3 to play var req:URLRequest = new URLRequest(".mp3");// Boolean value for button functions, to switch in the conditionals var isPlaying:Boolean = false;// Create the sound object var snd:Sound = new Sound(req);// Assign a var name for the sound channel var channel:SoundChannel = new SoundChannel();//...

Words: 335 - Pages: 2

Free Essay

Julia's Food Booth

...Assignment 3 Julia’s food booth A).Formulate and solve a linear programming model for Julia that will help you advise her if she should lease the booth. X1=number of cheese pizza slices X2=number of hot dogs X3=number of BBQ sandwiches Julia Food Booth | | | | | | | | | | | | | | | | Products | Pizza X1 | Hot Dog X2 | Barb Sand X3 | | | | | Profit per unit | $0.75 | $1.05 | $1.35 | Resources | Constraints |   |   |   | Avail | Usage | Left Over |   | Budget (i) | $0.75 | $0.45 | $0.90 | 1500 | 1500 | 0 |   | Oven Space (ii) | 24 | 16 | 25 | 55,296 | 50000 | 5296 |   | Demand (iii) | 1 | -1 | -1 | 0 | -2.3E-13 | 2.27E-13 |   | Demand (iv) | 0 | 1 | -2 | 0 | 1250 | -1250 |   | | | | | | |   | | | | | | | | | | Production | | | | | | | | Pizza | 1250 | | | | | | | Hotdogs | 1250 | | | | | | | Barbecue | 0 | | | | | | | Profit | 2250 | | | | | | | B). If Julia were to borrow money from a friend before the first game to purchase more ingredients, could she increase her profit? If so, how much should she borrow and how much additional profit would she make? What factor constrains her from borrowing even more money than this amount? Yes, Julia could increase her profit if she borrowed from a friend. The shadow price is 1.50 for each additional dollar that she earns. This was found by looking at the sensitivity analysis report from the computer solution output. The shadow...

Words: 685 - Pages: 3