11
Lecture 1: Course Introduction Overview of Computers and their Applications in MAE BJ Furman 01SEP2012

Lecture 1: Course Introduction - GradeBuddy

Embed Size (px)

Citation preview

Lecture 1: Course IntroductionOverview of Computers and their Applications in MAE

BJ Furman

01SEP2012

The Plan for Today

Welcome to ME 30 Learning objectives Roll call Highlights from the syllabus (aka, ‘greensheet’) Overview of computers and their applications in

MAE Introduce structured programming, algorithms,

pseudocode, and flowcharts Form of a C program Data types and variables

Learning Objectives

By the end of the lecture you should be able to:

Explain the focus of the course

Describe where and how computers are used by mechanical and aerospace engineers (MAEs)

List some of the software commonly used by MAEs

Describe what the major elements of a computer are and what they do conceptually

Explain what is meant by ‘structured programming’

Describe the structure of a C program

List and describe the important data types

Declare a variable

Roll Call

Back

Operating System (OS)

A program that: Acts as an intermediary between

hardware and application software

Provides a consistent, stable way for applications to interact with hardware APIs, so you don’t have to do it all

yourself

Examples: Windows XP/Vista Linux OS X

http://en.wikipedia.org/wiki/File:Operating_system_placement.svg

Not correct

Correct

Create/Editsource files(your program!)

Program Developmentfrom Figure 1.11, p. 32 in HK

note additions!

Compilesource files

Linkcompiled files

Loadexecutable file

Runyour program!

TestRepeat process

Review

# include (pre-processor directive)

Includes a library file for ‘standard io’ functions for things like printing, etc.

Full program

main() function

Full program

Your program needs a main() function Statements go between

the braces { } main() ends with the return keyword and usually the value zero

If main() runs successfully, it returns a value of zero

Declare and initialize variables

Variables must be declared before you can use them

Full program

while() Repetition Structure

Full program

while (condition)repeat statements between { }