CIS 3020 Part 1

From In The Wings
Jump to navigation Jump to search

Introduction to CIS

Introduction to:

  • The art and science of programming
  • The fundamentals of computer science
  • The basic concepts of Object Orientation:
    • Abstraction - representing the key features
    • Polymorphism - "many forms"
    • Inheritance - reuse of existing code from ancestors
    • Encapsulation - containing and controlling access to

What this course entails

  • This course is not a Java programming course
  • "Introduction" does not mean "easy"
  • Prior programming experience is strongly recommended
    • in none, take CIS 3022/3023
  • This course moves quickly, so attempt assignments early
  • Don't get discouraged if you feel confused after one week of class. You hopefull will feel more comfortable by the 3rd week.

Philosophy

  • Goal is to learn fundamental principles of programming and obtain an overview of the field of computer science.
  • This goal is independant of any language
  • Java is used to make these principles concrete but "learning Java" is not the primary goal of the course.
  • We will not cover most or all of Java.
  • We will teach the basics with emphasis on thinking and analysis.

Class Web Page

WebCT/Vista
Douglas Denkel's Homepage

  • Announcements, homework assignments, etc. will be posted here.
  • You are responsible to be aware of what information is there.
  • Check it frequently -- no less than every other day!

Lecture Notes

  • Copies of the lecture slides are available in the Lectures folder in WebCT/Vista
  • These slides do NOT contain everything on my slides to encourage you to come to class.
  • You are strongly encouraged to print a copy of these notes.
  • Having a copy will make taking notes significantly easier!

Grading

Option 1
15%
20%
30%
-
20%
15%

Option 2
15%
15%
15%
20%
20%
15%


Examination 1
Examination 2
Examination 3
Final
Pop quizzes and in class exercises
Group/Ind Homework Assignments

What to Expect

  • Difficulty: This course has had a drop rate as high as 33%
  • Effort Required: Expect to spend a minimum of 10 hours/week
  • Intended for: Those needing a firm foundation in CS principles (majors)
  • Education Value: Understanding the vocabulary of CS and concepts of OOP (Object-Oriented Programming)

Necessary Skills

  • Helpful to know Java, but not a requirement
  • Prior programming experience is helpful
  • Willingness to work outside of class
  • Willingness to work in groups
  • Self discipline
  • Ability to tolerate frustration
  • Ability to switch between high and low level views
  • Ability to think abstractly
  • Ability to see what is actually there:
       This is the
       the answer
    • The computer executes exactly what you give it
    • The ability to see the duplicate "the" can greatly help in debugging code

Self Test

  1. If (a<b) then x=a & y=b otherwise x=b & y=a
  2. z=0
  3. if (x<=0) goto step 7
  4. z=z+y
  5. x=x-1
  6. goto step 3
  7. print z
  • What did the author of this algorithm intend for it to do?
  • For what values of a & b does the algorithm work as intended?
  • How many times is step 3 executed?

Should I stay?

  • If you found the self test to be easy or not difficult in spite of no prior programming experience, then this course should not be too difficult for you.

What is Computer Science?

"...the science of abstraction - creating the right model for a problem and devising the appropriate mechanizable techniques to solve it"
       - Aho and Ullman
  • Not the "science of computers"
  • The study of computation:
    • Systems that produce the solutions
    • Methods used to develop solution strategies for these systems to follow
    • Application areas in which automated problem solving is useful

Foundations (COT 3100)

  • Formal mathematical structures forming the basis of Computer Science
  • Questions:
    • What types of problems can be solved.
    • What syntax and semantics
    • Meaure complexity -- How?
    • How to verify correctness

Algorithms & Data (COP 3530)

  • Structures for representing data
    • Space complexity
  • Fundamental and basic algorithms for manipulating these structures
    • Time complexity
  • Advantages and disadvantages of representations
  • Tradeoffs between space and time

Systems

  • Architecture (CDA 3101)
    • Organization and structure of hardware
    • Design of computing hardware
  • Operating Systems (COP 4600)
    • Design of resource management software
    • Management of disks, memory, processors...
  • Networking (COP 4500C)
    • Connecting machines together to share resources
    • Highly related to operating systems

Applications

  • Artificial Intelligence (CAP 4621)
    • Attacking problems viewed as requiring "human intelligence"
  • Database Management (COP 4720)
    • Organizing large quantities of data so items can be easily extracted
  • Graphics (CAP 4730)
    • Rendering

Methods

Design and assessment of techniques and software tools for creating solutions

  • What is required within a programming language? (COP 4620 - Translators)
  • What methods are required for producing and evaluating software? (CEN 3031 - Introduction to Software Engineering)

Changing Face of Computer Science

Through the years, computer science has seen many changes:

  • 1950's: Expensive hardware, programming in machine and assembly language.
  • 1960's: Development of imperative languages
  • 1970's: Decreasing hardware cost, microprocessors, introduction of software engineering, and rising programming costs.
  • 1980's: Personal computers, object oriented programming.
  • 1990's: Visual languages.

Hardware vs Software Costs

Shift in Emphasis

  • 1950's: How computers are designed
  • 1970's: Higher level languages
  • 1990's: Problem modeling

What is a computer?

Types of Computers

  • Representation of information: Digital or analog
  • Execution: Synchronous or asynchronous
  • Composition: Biological, electronic, optical, quantum

What is a computer?

  • CPU: Where all the calculation are performed
  • I/O: Allow communication with outside world
  • Memory: Stores program and data

Numbering system

Decimal Numbers
  • We use base 10
  • 10 unique glyphs - digits 0 through 9
  • Meaning of a number is based on the symbols used and their position
    • 123 = 1x10^2 + 2x10^1 + 3x10^0
Binary Numbers
  • Computers use Base 2
  • 2 unique glyphs - 0 and 1
  • Meaning of a number is based on the symbols used and their position
    • 1011 = 1x2^3 + 0x2^2 + 1x2^1 + 1x2^0
  • A single digit binary number is called a bit
  • 8 bits = byte and 4 bits = nibble
  • Number of bits determines how many symbols can be represented
  • These symbols might represent numbers, letters, instructions, etc.
    • ASCII (American Standard Code for Information Exchange) uses 7 bits
    • Unicode uses 16 bits

Units of Storage

Unit

Byte
Kilobyte
Megabyte
Gigabyte
Terabyte

Symbol


KB
MB
GB
TB

Size

8 bits
2^10 = 1024 bytes
2^20 = 1048576 bytes
2^30 = 1,073,741,824 bytes
2^40 bytes

Main Memory

Series of memory locations. In each location is data, instructions or garbage. Somve values are stored in consecutive locations. Can be read (non-destructive) or writte (destructive).

CPU Components (Simplified)

  • ALU (Arithmatic and Logic Unit) - Performs specified operations on information stored in the registers
  • Control Unit
    • Determines what operations should be performed
    • Controls transfer of information between the ALU and registers
  • Registers
    • Program Counter: Holds address of next instruction
    • Instruction Register: Holds current instruction
    • General Purpose Registers: Store results of arithmatic calculations

Fetch-Decode-Execute Cycle

  1. Fetch: Get instruction at address in Program Counter (PC). Load it into Instruction Register (IR).
  2. Increment: Increment the program counter.
  3. Decode: Decode the instruction.
  4. Execute: Activate the circuitry in ALU to perform instruction.
  5. Repeat.