ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015...

13
ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material developed by Professor Phillip Wong @ PSU ECE

Transcript of ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015...

Page 1: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

ECE 103 Engineering ProgrammingChapter 1

Introduction

Herbert G. Mayer, PSU CSStatus 6/19/2015

Initial content copied verbatim fromECE 103 material developed by

Professor Phillip Wong @ PSU ECE

Page 2: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

Syllabus What’s This Blue Code? Should I take this course? Specific Outcomes Course Prerequisites Course Material Other Reference Material Course Grading How Hard is This Class, really?

Page 3: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

3

What’s This Blue Code?

int main( /* no params */ )

{ // main

/* use C IO function to prrrrint

printrf( “Hello world’ );

} //end mian

Page 4: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

4

What’s This Blue Code?

This only looks like C, but is riddled with errors

1. No library was included via #include<xxx.h>

2. String literal was not terminated with a “

3. The end of output not followed by a ‘\n’

4. The assumed printf() was mis-spelled

5. The comment /* was not */ terminated

6. No main() return value was given . . . and so on

But at least you started thinking about C

Page 5: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

5

Some Better Code

#include <stdio.h>

int main( /* no params */ )

{ // main

/* use C output function */

printf( “Hello world.\n” );

return 0; // 0: no error

} //end main

Page 6: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

6

ECE 103 Engineering Programming, Summer ‘15

Instructor: Dr. Herbert G. MayerOffice: FAB 40-06Hours: Mondays, Wednesdays 16:45 – 19:05E-Mail: [email protected]: [email protected] URL: http://web.cecs.pdx.edu/~herb/ click

ECE103Term: Summer 2015Detail: Important, for you to read handout 1

Page 7: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

7

Should I take this course?

Electrical Engineering majors Yes – (ECE 102 or CS 161 equivalent), then ECE 103

Computer Engineering majors No – (ECE 102 or CS 161), then CS 162, CS 163

Computer Science majors No – Take CS 161, CS 162, CS 163

(unless you want hardware interfacing experience)

Page 8: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

8

Specific Outcomes

Students will develop the ability to: Identify and follow the software design process

Use the C programming language to solve medium complex problems in engineering, math, and physics

Apply programming skills to create control software for real-world sensors and actuators

Document a project via a technical report

Page 9: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

9

Course Prerequisites

Algebra and trigonometry (MTH 111 or equivalent) ECE 102 Engineering Computation (recommended)

Access to a C programming language environment FREE: Sign up for an MCECS Windows account

→ theCAT Help Desk: FAB 82-01 FREE: Various free C compilers

→ Download from websites

Page 10: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

10

Course Materials

C Programming – Absolute Beginner’s Guide, 3rd EditionAuthor: Greg Perry and Dean MillerPublisher: Que Publishing © 2013OPTIONAL (PSU Bookstore and other vendors)

ECE 103 Lecture Slides, REQUIRED readingPosted: http://cs.pdx.edu/~herb/ece103s15/

yes that url works as well

Page 11: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

11

Other Recommended Reference Material:(available from Powell’s Books, Amazon)

The C Programming Language, 2nd EditionAuthor: Brian Kernighan & Dennis Ritchie

Publisher: Prentice-Hall © 1988 (Intermediate)C Programming: A Modern Approach, 2nd Edition

Author: K. N. KingPublisher: W. W. Norton & Company © 2008 (Advanced)Code Complete, 2nd Edition

Author: Steve McConnellPublisher: Microsoft Press © 2004 (Advanced)

Page 12: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

12

Course Grading 40% Homework Assignments, 4 total in the summer 40% Midterm in class, open book, about week 6 20% Project; Must complete; else best grade way below A Grading scale below, with + and – at the 15%

boundary for next grade, except there is no A+

Page 13: ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.

13

How Hard is This Class, really?

Do not assume ECE 103 is easy or simple just because it is a 100-level course

You will have to spend a lot of time writing programs and learning software tools

Start your assignments today