240 likes | 360 Views
Introduction to CSIS. Our Faculty Some of our students!. Department of Computer Science & Information Systems Faculty. Introduction to Problem Solving Lecture. CSC 145 Dr. Brenda Wilson. Problem Solving. Algorithm - set of instructions for accomplishing a task
E N D
Introduction to CSIS • Our Faculty • Some of our students!
Department of Computer Science & Information Systems Faculty
Introduction to Problem SolvingLecture CSC 145 Dr. Brenda Wilson
Problem Solving • Algorithm - set of instructions for accomplishing a task • unambiguous (“A little salt”) • effective (correct answer?) • finite (except for continuous processing) • Computer Program - algorithm suitable for execution on a computer
ANSI says you are a device that can perform substantial ... . What am I? Definition A machine that can accept data, process the data, at high speeds , and give the results in an acceptable form with option of saving data & results.
Does not compute!! Figure the deductions Then tell me... What we have here is a failure to communicate...
What does a computer understand??? 110001001110 Machine Language
Compiler/ Interpreter Assembler Needs Translation!! • High-Level Languages • Pascal, C++, Ada, Java • VisualBasic, Cobol, Fortran,etc. • Assembly Language • Machine Language
Interpreter Vs. Compiler • Interpreter • translates & executes one line at a time • Compiler • translates entire program & then executes
Executing a Compiled Program High Level Language Compile Object Module Build Load Module Execute (Run)
Terms used to describe High Level Languages • Structured – vs. spaghetti code • Procedural – programmer/task driven • Event-Driven • Object-Oriented – class,attributes, etc.
Beginning: Do You Understand? • How problem is presented: • Required Results • Given Info • Process • How Program is written: • Given Info • Perform Processing • Req.Results • Input-Process-Output
Tools Used for Algorithm Development • I/O Chart -- to analyze input & output • I O Gross Pay Deductions Net Pay Names Hrly Rates Hours Wrkd
Tools Used for Algorithm Development Structure Chart- to show major tasks & subtasks
Module In Out Tools Used for Algorithm Development • Top Down Design: Use pseudocode or flowchart (to show how each module works) • Module Interface Table : to show how each module shares data with other modules in the program
Sender (Programmer) good overall picture good generalizing terrible at details slow!!! Receiver (Computer) good at details fast!!! terrible at overall picture terrible at new situations & inference Programming Language : set of notations & rules for combining notations to communicate algorithms
Programming Languages • Syntax - set of formal rules determining valid constructions • Semantics - rules determining precise meaning of valid constructions in the language • “Bug”
Proper Grammar Whoops!! Should be a quotation not apostrophe! (Ada) Put (“Enter the radius..’); Get(radius) Uh Oh!! Left off the semicolon! SYNTAX...
What is meant?? The chicken is ready to eat. SEMANTICS...
Computer Operations • Perform arithmetic • Compare 2 pieces of information & take alternative actions • Receive & give out information • Repeat any group of these operations • Save any information for later use
5 Operations of the Computer…examples in different languages
Repetition Branching Loops Fundamental Control Structures In Programming
Homework / Quiz “heads up” • Read chapter 0 in text. Answer #6 in the exercises. • Suggestion: Use a google search on computer jargon to find a site to look up the words. • Be prepared for a quiz!!