Textbook Notes (368,440)
Canada (161,878)
ITM 200 (25)
Vikirmin (2)
Chapter 2

Chapter 2.docx

6 Pages
Unlock Document

Information Technology Management
ITM 200

Chapter 2: Algorithms and Computers Inputs: Integers (whole numbers) Floating point numbers (with decimal points) Characters (letters, example A) Strings of Characters (Hello welcome to the show) Process: list of instructions which if carried out will achieve the desired result Output: There is an output from the execution of the algorithm; it might be numbers or strings as above Subprograms: the processor is being asked to stop executing the algorithm currently being followed, remembering where it is up to in the algorithm, and start executing the same algorithm again. Parameters: by parameterising, the same algorithm instructions may be told to operate on different data, making the algorithm much more general, versatile and useful. API: Applications Programming Interface; a library of prewritten subprogram algorithms Steps to Solving Problem 1) Understand the problem 2) Work out a plan 3) Sort out the details 4) Test & Evaluate Import.java.lang.System; in java there is lang; in lang there is System public static void main(String args[]){ } - JVM can access the main method, without creating an instance of the class and returns no data when the method ends - String args[] within round brackets means the main method accepts String values and the square brackets represents an array value - The curly brackets represents code block for both “class” and “method” All programs have in common: • Take data and manipulate it to produce a result Input – Process – Output  Input – from files, the keyboard, or other input device  Process – apply logic and or protocols through the processor  Output – to the monitor, printer, file, or other output device An algorithm is a set of instructions for solving a problem; it consists of the actions to do and in order which to do them. They should be:  Complete: cover all the parts; it shouldn’t be possible to get into a situation where the algorithm does not tell you what to do  Unambiguous: there is no doubt about what it does  Deterministic: only one possible result  Finite: it should finish, you should eventually finish and not end up following instruction s forever  Three tools are used to convert algorithms into computer programs: – Flowchart - Graphically depicts the logical steps to carry out a task and shows how the steps relate to each other. – Pseudocode - Uses English-like phrases with some Java terms to outline the program – Hierarchy chart - Shows how the different parts of a program relate to each other Flow ChartPseudo Code  Uses English-like phrases Example Determine the proper number of stamps for a letter – Read Sheets (input) – Set the number of stamps to Sheets / 5 (processing) – Round the number of stamps up to the next whole number (processing) – Display the number of stamps (output)  Sequence: a sequence of instructions which are intended to be carried out by the processor one by one in the order in which they appear (it’s the most basic structured programming construct).  Repetition: a while loop means WHILE onion does not sizzle Wait 30 seconds -The is a boolean expression which can have only two possible values, true or false -The is actually one or more instructions -If the test is false, then go on to the instruction following the while loop (do not do the ) -If the test is true, do the instruc
More Less

Related notes for ITM 200

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.