New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Comp Apps for Business Exam 2

by: Misha Patel

Comp Apps for Business Exam 2 01:198:170

Marketplace > Rutgers University > Computer Programming > 01:198:170 > Comp Apps for Business Exam 2
Misha Patel

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

This includes information from the textbook on mostly Chapters 9, 17, and 18. Some on Chapters 19 and 20. This is for Exam 2
Computer Applications for Business
Professor Stoll
Study Guide
computers, business, Computer Applications
50 ?




Popular in Computer Applications for Business

Popular in Computer Programming

This 13 page Study Guide was uploaded by Misha Patel on Wednesday April 6, 2016. The Study Guide belongs to 01:198:170 at Rutgers University taught by Professor Stoll in Winter 2016. Since its upload, it has received 37 views. For similar materials see Computer Applications for Business in Computer Programming at Rutgers University.

Similar to 01:198:170 at Rutgers

Popular in Computer Programming


Reviews for Comp Apps for Business Exam 2


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 04/06/16
Chapter 9: Principles of Computer Operations THERE’S AN APP FOR THAT  We are continually using computation The Usual Suspects The Processor: the device that does the actual computing  Other terms – computer, microprocessor, central processor, CPU, core  The processor does the work; that is, it follows the program’s instructions The Operating System: the software that makes the computer into a useful device  Performs operations common to all apps o Loading programs, sharing memory with multiple apps, locating files The Software  The “magic” of computing is revealed in apps (programs) for our devices  The hardware simply follows the program’s instructions so someone (the programmers) must write the instructions Instructions: very simple The Fetch/Execute Cycle: process of executing an instruction (doing what the instruction specifies)  Instruction execution is the proper term for what processors do Memory  Bits are a universal medium for information, and they are commonly referred to as 0 and 1  The memory stores the billions of 0s and 1s. Both programs and data are encoded in bits. As it is computing, the Fetch/Execute Cycle gets program and data bits from the memory, and puts data bits back into the memory Component Hardware  The most fundamental hardware are the transistors and the silicon chips that implement them SOFTWARE ISN’T SO HARD  When you get a new app, you get an extremely long sequence of bits— millions and millions of them  Splash screen: an image that displays before an application starts running, and this one fades in, fades out, and then goes on to the actual application  Although it doesn’t take much to type these “few” symbols, they are very, very specific. You cannot even make one typo or it will not work Deciding On What to Do  In the example, these instructions (fadeIn and fadeout) will be reused every few milliseconds, so the image fades in, becomes completely opaque, and then fades out  This is how programmers make computers test data, and based on the outcome, follow one of two alternate sets of instructions Software Layers  Millions and millions of other instructions will execute to make the app’s image fade in and out  The “layers” are only a conceptual grouping of software that performs similar activities. Because a given layer is built with code from the levels below, they are organized from more primitive (lower levels) to more general and sophisticated (upper levels)  Lists help the system find items or whole layers from the software stack  The splash screen illustrates two powerful ideas that explain why software keeps getting better and better: Shared Effort  By sharing libraries of programs that implement commonly needed operations, programmers can dramatically reduce their effort and leverage other programmers’ knowledge o These existing programs allow programmers to focus on their new and interesting apps rather than repeatedly writing the same code someone else has already written when they need to do the same operation Wide Use and Consistency  Software available in the stack can have wide dissemination  Users see it working the same way in each app because it’s the same code. If there is a bug in the code, or an improvement to be made, updating that single instance allows all apps to benefit at once INSTRUCTION EXECUTION ENGINE The Fetch/Execute Cycle  Instruction Fetch – IF  Instruction Decode – ID  Data Fetch – DF  Instruction Execute – EX  Result Return – RR Anatomy of a Computer  All computers, regardless of their implementing technology, have five basic parts or subsystems: the memory, the control unit, arithmetic/logic unit (ALU), input unit and output unit Memory: stores both the program while it is running and the data on which the program operates  Discrete locations: Memory is organized as a sequence of discrete locations, like apartment building mailboxes. In modern memory, each location is composed of 1 byte ( a sequence of 8 bits)  Addresses: every memory location has an address, like a mailbox, although computer memory address are whole numbers starting at 0  Values: Memory locations record or store values, like a mailbox holds a letter  Finite capacity: Memory locations have a finite capacity (limited size), so programmers must keep in mind that the data may not “fit” in the memory location Byte-Size Memory Location  The 1-byte size of a memory location is enough to store one ASCII character (letter, numeral, or punctuation symbol), or a whole number less than 256 Random Access Memory  “random access”  computer can refer to the memory locations in any order  RAM is measured in megabytes (MB) or gigabytes (GB)  Memory is like a sequence of labeled containers known as locations: The address is the location’s number in the sequence; the value or in the information stored at the location is the container’s contents; and only so much can fit in each container Control Unit  The hardware unit of a computer is the hardware implementation of the Fetch/Execute Cycle o Its circuitry fetches an instruction from memory and performs the other operations of the cycle on it Arithmetic/Logic Unit (ALU)  Does the “math”  The part of the computer that generally does the actual computation during the Instruction Execute step of the F/E Cycle Input Unit and Output Unit  Inverses of each other  The wires and circuits through which information moves into and out of a processor The Peripherals  Connect to the processor’s input/output (I/O) ports, providing it with input or receiving its output o Not considered part of the processor o They are specialized gadgets that encode or decode information between the processor and the physical world  Wires or a cable from the peripheral to the processor connects to the input unit or the output unit o These units handle the communication protocol with the peripherals. o As a general rule, think of the input unit as moving information from the peripheral into the memory, and the output unit as moving information from the memory and delivering it to the device Portable Memory, Hard Drives, Networking  Memory units (like USB flash drives) can both receive information from the processor and send information to it A Device Driver for Every Peripheral  Most peripheral devices are “dumb” because they provide only basic physical translation to or from binary signals. They rely on the computer for further processing, which is almost always required to make the peripheral operate in an “intelligent way”  Added processing by a piece of software called a device driver gives the keyboard its standard meaning and behavior Machine Instructions  Computer instructions are much more primitive than the commands Taylor gives the computer when he or she programs  Concept: computers encode the memory addresses of the numbers to be added(or subtracted or whatever), not the numbers themselves, and so they refer to the values indirectly o The indirection means that a single instruction can combine any two numbers simply by placing them in the referenced memory locations o Indirect reference: referring to a value by referring to the address in memory where it is stored—is fundamental to a computer’s versatility THE PROGRAM COUNTER: THE PC’s PC Address of the Next Instruction  Computers keep track of which instruction to execute next by its address. This address, stored in the control part of the computer, should probably be called the next instruction address, but for historic reasons it is actually known by the curious term program counter, abbreviated PC Branch and Jump Instructions Chapter 17: Fundamental Concepts Expressed in JavaScript OVERVIEW: PROGRAMMING CONCEPTS Programming: the act of formulating an algorithm or program  It entails developing a systematic means of solving a problem so that an agent—someone other than the programmer and usually a computer—can follow the instructions and produce the intended result for every input, every time. The agent must also be able to perform or execute the program without any intervention from the programmer. This means that all steps must be spelled out precisely and effectively, and all contingencies must be planned for JavaScript: a modern programming language that is especially effective for Web applications NAMES, VALUES, AND VARIABLES  Everyday life vs. Code Names Have Changing Values  Names and values are separable in programming o The best way to think of names and values in programming is to think of names as if they were offices or titles, or other designations purposely selected to have changing values  A program is a fixed description of a process o As the process evolves and the program transforms data to produce new values, the old names must refer to these new values, that is, the names change values. This is a natural result of the fixed description of the process Names in a Program Are Called Variables  Variables: a term that reminds us that their values vary  The most commonly used programming language operation is the command to change the value of a variable o Command = assignment Identifiers and Their Rules  Identifier: the letter sequence that makes up a variable’s name A Variable Declaration Statement  Programs are usually written “starting from scratch”  Declaring variables  command = declaration o var The Statement Terminator  A program is simply a list of statements  ; - semicolon o just like terminating sentences in English with a period, question mark, or exclamation point Rules for Declaring Variables  Every variable used in a program must be declared!!  Usually declare variables first Undefined Values  The name is declared but there is no value assigned yet  the value is undefined Initializing a Declaration  Often we know an initial value for the identifier we declare. So JavaScript allows us to set the initial value as a part of the declaration, that is, to initialize the variable  Don’t have to declare and initialize just 1 variable at a time in the var statement, you can do multiple at a time by separating them with commas THREE BASIC DATA TYPES OF JAVASCRIPT 1. Numbers 2. Strings 3. Booleans Rules for Writing Numbers  One “unusual” aspect of numbers In programming is that there are not “units” Strings  Most common kind of data  Strings: sequences of keyboard characters o always surrounded by single (‘) or doube (“) quotes Strings Can Initialize a Declaration  We need strings when manipulating text, as when we’re building Web pages, for example Rules for Writing Strings in JavaScript 1. Strings must be surrounded within quotes, either single (‘) or double (“), which are not curly 2. Most characters are allowed within quotes except the return character (Enter), backspace character, tab character, \, and two others (little used) 3. Double quoted strings can contain single quotes, and vice versa 4. The apostrophe (‘) is the same as the single quote 5. Any number of characters is allowed in a string 6. The minimum number of characters in a string is zero(“”), which is called the empty string Literals  the numbers and strings discussed are known as literals  The term literal conveys the idea that the characters are typed literally in the program o Rules about how to write these values explicitly in a computation o However, when literals become the values of variables and are stored in the computer, the representation changes slightly, especially for strings String Literals Stored in the Computer  First, because the surrounding quotes or double quotes are used only to delimit the string literal, they are removed when the literal is stored in the computer o That’s why the empty string “” has a length of 0, rather than 2  Second, any character can be stored in the computer’s memory o Specifically, although a prohibited character such as a tab character cannot be typed in as a literal, it can be the value of a string in the computer. To do this we used the “escape” mechanism, as follows  Escape symbol - \  The escape sequences are converted to the single characters they represent when they are stored in the computer’s memory Boolean Values  Unlike numbers and strings, there are only two Boolean values: true and false  Data types/Value types: The different kinds of values of a programming language THE ASSIGNMENT STATEMENT  If variables are to change values in an algorithm or program, there should be a command to do so. The assignment statement changes a variable’s value; it is the workhorse of programming o Has three parts that always occur in this order <variable> <assignment symbol> <expression>; example: week = days/7 Assignment Symbol  Most common symbols for indicating an assignment o equal sign = o colon ; o equal sign pair := Interpreting an Assignment Statement  To understand how assignment works, you must think of a value flowing from the right side (expression side) of the assignment symbol to the left side (variable side) o Assignment symbol should be read as “is assigned” or “becomes” or “gets”  In an assignment statement, the expression is computed or evaluated first o If there are any variables used in the expression, their current values are used o This evaluation produces a value that then becomes the new value of the variable named on the left side Three Key Points About Assignment 1. All three of the components must be given; if anything is missing, the statement is meaningless 2. The flow of the value to the name is always right to left. Thus the two variable names in the assignment statement variable_receiving_new_value = newly_computed_value; 3. The values of any variables used in the expression are their values before the start of execution of the assignment AN EXPRESSION AND ITS SYNTAX  Expressions describe the means of performing the actual computation  Expressions are built out of variables and operators o Operator: standard arithmetic operators  Addition (+), Subtraction (-), multiplication (x), division(/)  Ones that one would find on a calculator o Symbols of basic arithmetic = arithmetic operators Arithmetic Operators  Multiplication * asterisk  Multiplication and division have higher precedence than addition and subtraction  Expressions must be typed on a single line so superscripts are prohibited o Some languages have an operator for exponents or power, but JavaScript does not  Operators like + and * are called binary operators because they operate on two values o The values they operate on are called operands o There are also unary operators, like negate (-), which have only one operand  Language parsers—the part of a compiler that “diagrams” programs so a computer can understand them—can easily figure out whether the minus means negate or subtract  One very useful operator  modulus (mod) operation (%) o It divides two integers and returns the remainder Relational Operators  Relational operators are used to make comparisons between numerical values—that is, to test the relationship between two numbers o The outcome of the comparison is a Boolean value, either true or false a < b  less than a <= b  less than or equal to a == b  equal a != b  not equal a >=  greater than or equal to a > b  greater Logical Operators  It is common to test two or more relationships together, requiring that relational expression results be combined Logical and  &&  logical and operator, playing the same role that AND plays in query expressions  The operands for relational expressions must be numeric, but the operands for logical expressions must be Boolean Logical or  ||  logical or operator Logical not  (!)  logical not operator is a unary operator—it takes a single operand—and its outcome is the opposite of the value of its operand Operator Overload  operator overload  “use of an operator with different data types” Concatenation  When we use + with strings, it joins the strings by the operation of concatenation A CONDITIONAL STATEMENT  A specific statement type, called a conditional statement or a conditional, has been invented to make testing numbers and strings simpler. The conditional statement of JavaScript, which differs from the IF() function of spreadsheets, has the form If (<Boolean expression >) <then-statement>;  The Boolean expression is any expression evaluating to a Boolean true or false outcome, such as relational expressions, and the <then- statement> is any JavaScript statement, such as an assignment statement if Statements and Their Flow of Control  In a conditional, the <Boolean expression>, called a predicate, is evaluated, producing a true or false outcome o If the outcome is true, the <then-statement> is performed o If the outcome is false, the <then-statement> is skipped Compound Statements  Compound statement  group the statements by surrounding them with “curly braces”, which collects them to become a single statement  The “exception proving the rule” that every statement must be terminated by a semicolon is the compound statement. The closing curly brace should not be followed by a semicolon if/else Statements if (<Boolean expression>) <then-statement>; else <else-statement>;  The <Boolean expression> is evaluated first o If the outcome is true, the <then-statement> is executed and the <else-statement> is skipped o If the <Boolean expression>’s outcome is false, the <then- statement> is skipped and the <else-statement> is executed Nested if/else Statements  The <then-statement> and the <else-statement> can contain an if/else, but you have to be careful, because it can be ambiguous which if an else goes with. The rule in JavaScript and most other programming language is that the else associates with the (immediately) preceding if Chapter 18: A JavaScript Program BACKGROUND FOR THE UI Interacting with a UI  The input facilities like buttons and check boxes are known as elements of forms Forms  <form name=”unique_name”> Events and Event Handlers  When the UI inputs are used, such as clicking a button, they cause an event to occur. In case of a button, the event is called a “click event” o An event is an indication from the computer (operating system) that something just happened  We want our JavaScript program to respond to that click—that is, perform the operation corresponding to the button command. When JavaScript finds out about the event, the program that performs the operation that responds to an event. o An event handler is the program that performs the operation that responds to an event Three Input Elements  Text Box 1. Can be used to input or output numbers or words 2. General form: <input type=”text” id=”ref_name” value=”displayed_text” size=”n” onchange=”event_handler”/>  Radio Button 1. Give a selection of preprogrammed settings 2. General form: <input type=”radio” name=”identifier” onclick=”event_handler” />label text  Button 1. Form: <input type=”button” value=”label” onclick=”event_handler”/> Chapter 19: Programming Functions Functions are packages for algorithms  3 parts 1. Name 2. Parameters 3. Definition Call a Function – Ask the computer to run or execute the statements of the function to produce the answer Pseudo-random numbers: an invention of computer science in which an algorithm produces a sequence of numbers that passes the statistical tests for randomness The scale variable, having been declared outside of any function or form, is a global variable Chapter 20: Iteration Principles Iteration: looping through a series of statements to repeat them The initialization sets the iteration variable’s value for the first (if any) iteration of the loop Indexing is the process of creating a sequence of names by associating a base name (“Apollo”) with a number (“13”) Element – base-named sequence Array reference: consists of the array name together with an index DOM – Document Object Model: browser’s representation for the page


Buy Material

Are you sure you want to buy this material for

50 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.