Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 103 Introductory Programming for Engineers and Scientists

Similar presentations


Presentation on theme: "CS 103 Introductory Programming for Engineers and Scientists"— Presentation transcript:

1 CS 103 Introductory Programming for Engineers and Scientists
J. Michael Fitzpatrick John D. Crocetti 134 Jacobs Hall

2 Contact Information John Crocetti Office: 381 Jacobs Hall Phone: Office Hours: MW 2:30 – 4:00pm or by appointment J. Michael Fitzpatrick Office: 363 Jacobs Hall Phone: Office Hours: Thurs 1-4pm or by appointment

3 Class Website

4 What is Computer Science?
Computer Science is a discipline that seeks to build a scientific foundation for a variety of topics, including computer design, computer programming, information processing, and problem solving. Computer science provides the underpinnings for today’s computer applications and future development.

5 Major Fields in Computer Science
Computer Architecture (hardware) Computer Programming (software) Information Processing & Storage Algorithmic Problem Solving In this class, we will largely focus on programming and algorithmic problem solving

6 Philosophy or Science? CS is as much a philosophy as it is a science
CS forces you to think about problems and solutions in new ways You will learn problem solving techniques, such as stepwise refinement, that will teach you to break down problems into small parts. Problem solving, however, is an individual process. There is more than one “right” way. You will have to develop your own personal problem solving methodology. Sometimes, you have to think “outside the box”

7 Example Problem 1 Joe has been charged with the task of determining the ages of Sally’s three children. (Assume the ages are integers) Sally tells Joe the product of their ages is 36. Joe decides that isn’t enough information. Sally tells Joe the sum of the childrens’ ages. Joe determines that he needs more information. Sally tells Joe that her oldest child plays the piano. Joe is now able to tell Sally the ages of her children. What are their ages?

8 Problem Solution Triples whose product is 36
(1, 1, 36) (1, 2, 18) (1, 3, 12) (1, 4, 9) (1, 6, 6) (2, 2, 9) (2, 3, 6) (3, 3, 4) Sums of triples from above 1+1+36= = = =14 1+6+6= = = =10 We know that knowing the sum of the triple isn’t enough to solve the problem…therefore, the sum must appear twice….meaning the sum must be 13. Since we know that there is an oldest child, the only remaining triple is 2, 2, 9.

9 Example Problem 2 Big nails cost $3 per pound
Small nails cost $2 per pound Sam bought 34 pounds of nails and paid $80 How many pounds of each did he buy?

10 Problem Solution Let b = the number of big nails
Let s = the number of small nails b + s = 34 (pounds) 3b + 2s = 80 (dollars) Find b & s that solves both problems simultaneously. Matlab’s solution:

11 Developing Algorithms
An algorithm is a set of instructions that directs the execution of a task. Technically speaking, an algorithm is a finite sequence of unambiguous, executable steps that ultimately terminate if followed.

12 Syntax vs. Semantics Syntax = representation
Semantics = the concept represented For example, the syntactic structure of the word “air” is merely a collection of three letters. But the object represented, the semantics, is a gaseous substance surrounding the entire world.

13 Bridging the Gap From Semantics to Syntax
A major goal of algorithm representation is ensuring that the syntax accurately reflects the intended semantics. For example, what does the following phrase mean? “Visiting grandchildren can be nerve-racking.”

14 Why is Computer Science so hard?
In broad terms, you have three challenges: Learning how to develop algorithms to solve problems Understanding the syntax and semantics of a programming language named Matlab Writing Matlab programs to implement your algorithms Students often focus or get frustrated with their program, when their problem is oftentimes with the algorithm

15 CS103 is NOT a “weed out” course
Contrary to popular opinion, this class is not designed to “weed” you out. In reality, we’re going to great lengths to ensure you succeed: online homework solutions, sample exams, regular help sessions, etc. Students, however, often make poor choices that cause them to underperform

16 How to Succeed in CS103 Stay on schedule – DO NOT FALL BEHIND!
Do your reading before coming to class Use the online material provided to you Take advantage of the help sessions and your TAs’ & instructor’s office hours Form a good study group


Download ppt "CS 103 Introductory Programming for Engineers and Scientists"

Similar presentations


Ads by Google