cs 141 introduction to computer science and structured programming l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
PowerPoint Presentation
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 30

- PowerPoint PPT Presentation


  • 653 Views
  • Uploaded on

CS 141 Introduction to Computer Science and Structured Programming Dr. Randy L. Ribler Lynchburg College First Reading Assignment Read Bronson Chapter 1 Today’s Topics Studying computer science Careers in computer science CS141, and where it fits in Hints on how to succeed in this course

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '' - albert


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cs 141 introduction to computer science and structured programming

CS 141Introduction to Computer Scienceand Structured Programming

Dr. Randy L. Ribler

Lynchburg College

first reading assignment
First Reading Assignment
  • Read Bronson Chapter 1
today s topics
Today’s Topics
  • Studying computer science
  • Careers in computer science
  • CS141, and where it fits in
  • Hints on how to succeed in this course
  • Compilers and Computer Languages
what is computer science
What is Computer Science?
  • Computer science is the study of computers and computer software.
  • It is really more like an engineering discipline than it is like a science.
  • Computer science is a very new field of study, yet it already has scores of subfields
a sampling of subfields in computer science
A Sampling of Subfields in Computer Science
  • Artificial Intelligence (AI)
  • Software Engineering
  • Human-Computer Interaction (HCI)
  • Parallel Processing
  • Computer Graphics
  • Computer Aided Design (CAD)
  • Compiler Development/Tools
  • Robotics
slide6
Simulation
  • Performance Analysis
  • Operating Systems Design
  • Speech/Natural Language Recognition
  • Database Design
  • Theory of computation
  • Virtual Reality (VR)
  • Computer Architecture
  • Web-based Technologies
  • and many, many more.
what do these subfields have in common
What do these subfields have in common?
  • Programming is central to almost every one of these subfields.
good things about computer science
Good things about Computer Science
  • You might really enjoy it!
  • It is a very dynamic field
    • but the “basics” tend to stay the same
  • It is an applied “science.”
    • You should be able to apply virtually everything you learn.
  • It can provide a very good career
  • It can support work in virtually every other field
programming can be a very creative process
Programming can be a very creative process.
  • Programmers are writers and engineers.
  • There are many, many ways to accomplish the same task.
  • Computer science is very new. There are a lot of opportunities to be innovative.
  • You can build new products without investing a lot of cash.
what do cs majors do when they graduate
What do CS majors do when they graduate?
  • Most are hired to develop software (program)
    • Productivity Programs
    • Operating Systems
    • WEB Applications (e-commerce)
    • Computer Graphics
    • Artificial Intelligence
    • Medical Software (CT Scan, MRI)
    • Aerospace Applications
    • Computation Biology
    • Research
    • Embedded Systems
    • Military Applications
    • Business Applications
    • Educational Software
    • Games
    • Movies/Entertainment
what do cs majors do when they graduate11
What do CS majors do when they graduate?
  • Some work as network and system administrators
  • Some go to graduate school
  • Some get research jobs
  • Some teach
  • Some start their own companies
the outsourcing scare
The Outsourcing Scare

Media Stresses Threat

to US Jobs

national trends in computer science enrollment
National Trends in Computer Science Enrollment
  • Enrollment Trends 2000-2005
    • 50% reduction in enrollment in CS courses
    • 70% reduction in major declarations
why is cs141 important
Why is CS141 important?
  • It provides the basic tool set required in virtually every other CS class.
  • With CS141 and CS142, you can probably get a job as a programmer.
  • Without at least CS241 and CS242 (or equivalent) you probably shouldn’t be allowed to get a job as a programmer
why do many students have trouble in cs141
Why do many students have trouble in CS141?
  • It’s probably not how the course is taught.
    • Every college with a CS program has a course similar to CS141.
    • They all have relatively high numbers of students who have difficulties
  • They underestimate the amount of time they need to devote to it.
  • They get behind -- and because each concept builds on the others, it is hard to catch up.
how to succeed in cs141
How to Succeed in CS141
  • Spend time working on the programs
  • Don’t miss any classes
  • Read the textbook as assigned
  • Come to office hours
  • Ask questions in class
  • Stay with the class (Don’t get behind).
  • Start programs as soon as they’re assigned
  • Expect to encounter problems
  • Don’t get frustrated. If you keep trying, you’ll get it.
  • Understand that the programs are good teachers -- learn from each mistake.
learning to program is like learning to play tennis
Learning to program is like learning to play tennis.
  • At first, you need to master fundamentals.
  • It will get to be much more fun as you become better at it.
  • You need to practice. You can’t do all the practicing the night before the match.
  • It might be frustrating at first, but you will be rewarded if you persevere.
  • You can’t really judge how much you like it until you get to a certain level of competency.
  • Anyone can do it if they dedicate enough time to it.
a more gentle introduction is available
A more gentle introduction is available
  • CS131 (3 credits) MWF 9:30
    • Visual Basic
    • Recommended for those who have never done any programming before.
what do computers do
What do computers do?
  • They do very, very, simple things
    • basic arithmetic on values in memory
    • Input/Output
    • Comparison and Conditional Execution
      • if-statements
  • They do it very, very, fast and very, very reliably.
  • Programmers build systems to do complicated things using these simple basic capabilities.
think of a recipe
Think of a recipe.
  • We can use instructions that provide different levels of detail.
    • High Level
      • Make an apple pie
    • Lower Level
      • Slice 4 apples into one inch squares...
    • Even Lower Level
    • Pick up a knife, place the knife on the apple, apply pressure, …
cooks use a standard set of instructions
Cooks use a standard set of instructions
  • Poach
  • Blend
  • Whip
  • Fry
  • Filet

Recipes consist of a known set of instructions.

Cooks translate these higher-level actions.

computer languages
Computer Languages
  • A computer language defines the set of instructions that the programmer can use.
  • Programs are collections of these instructions.
computer hardware executes low level instructions
Computer Hardware Executes Low-level Instructions
  • Programmers typically want to write programs using higher level instructions.
  • Different computer manufactures provide different low-level instructions.
high level languages
High-level Languages
  • High-level languages allow programmers to use a more expressive set of instructions.
  • A compiler translates the high-level instructions the programmer writes to the low-level instruction set the computer understands.
  • Compilers allow programs to be portable, because the instructions are not tied to an particular instruction set.
compilers translate high level instructions to a particular machine s native instruction set
Compilers Translate High-level instructions to a particular machine’s (native) instruction set.

Program

written in

High-level

Language

Program

using

native

instruction set

Compiler

The program the programmer writes is called source code.

The program the compiler generates is called object code.

compilers translate high level instructions to a particular machine s native instruction set27
Compilers Translate High-level instructions to a particular machine’s (native) instruction set.

Object code

Source code

Program

written in

High-level

Language

Program using

Intel

instruction set

Microsoft

Compiler

Program using

Motorola

instruction set

Apple

Compiler

programming languages
Programming Languages
  • FORTRAN - Scientific/Engineering (1957)
  • COBOL - business oriented language (1959)
  • C - applications and systems, dominated much of the eighties and early nineties. (K&R published 1978)
  • C++ - applications and systems, dominated much of the late nineties. (1980-1985)
  • Java - applications and network/web-based applications, rapidly gaining popularity. (1995)
  • Lisp and Prolog - Languages for AI (1959, 1970)
  • Pascal - language used to teach programming (1971)
  • Ada - language used in military applications (1983)
  • Basic - language used to teach programming (1965)
generating a simple program
Generating a simple program
  • Write the program with a text editor or word processor.
  • Compile the program using a compiler.
  • Execute the compiled program.
example using windows
Example using Windows
  • Write a program using the “notepad” editor.
  • Compile the program using Microsoft’s Visual C++.
  • Run the resulting program