introduction to programming with java, for beginners welcome
Post on 21-Dec-2015
236 views
TRANSCRIPT
2
Course Information Instructor:
Diana Palsetia ([email protected])
Teaching Assistants: Junshi Lu ([email protected]) Yu Tazawa ([email protected]) Andrew Xue ([email protected])
Meeting Times: MWTR: 1-2 pm in Moore 207 TR: 10-12 pm in Moore 207 F: 2-4pm in Moore 204 (Robotics/Engineering Lab)
3
Our Web Site
This site is our primary communication vehicle:
http://www.seas.upenn.edu/~pfpcse
Become familiar with it! :) Visit the Resources page
For homework/lab work submission (BlackBoard)
https://courseweb.library.upenn.edu
4
Logistics
Attendance Required: daily lecture/lab Optional: office hours, quiz review sessions
Grades Attendance and participation: 10% Labwork: 20% Homework:30% Quizzes: 40% (2-3 quizzes)
Late Policy for labwork and homework: 20% off up to 24 hrs.
No makeup quizzes are scheduled. Conflict? Schedule in advance
5
Computer Science (CS) Computer Programming is sub-field of Computer
Science
It involves learning how to translate a complex problem/simulation/game in to a computing solution
6
Computing Examples
Information SecurityUser informationAssurance
Digital Special Effects
Databases
High Performance Simulation
7
Computing Formal Definition:
The use of a computer process data or perform calculations
Early computers were people
Advancement in electronics enabled computing devices that were faster than man
Copyright:
http://cannon.sfsu.edu/~gmarcy/cswa/history/pick.html
8
CS in General
Computer Science is the study of What we can do with computers?
Automate a known solution How we can best do it Investigate things we don’t know
Example: The Blue Brain Project by EPFL & IBM started in July 2005
• Understand the brain function and dysfunction to solve intractable problems in mental health and neurological disease.
9
Three themes in Computing Modularity
Break big problems into simpler sub-problems Solve big problems by composing the solutions of
the sub-problems
Algorithmically Having a finite list of well-defined instructions for
accomplishing some task
Abstraction Find common features and express solutions in
terms of those features
10
How does CS fit with Engineering?
Computer Science partners well with many fields: finance, engineering, graphics, linguistics, genetics, multimedia, etc.
Its theoretical foundation lies in mathematics Discrete math, probability, and statistics and logic
Another foundational in electrical engineering Building block is electronic hardware (computer
architecture)
11
Computer Programming & Programming Languages
Computer Programming Is telling the computer how to do something Wikipedia Definition: Applies specific programming
languages to solve specific computational problems with solutions
Programming Languages Unlike human languages
Designed for instructing computers to solve problemsThe listener (the compiler) is exacting &
unforgiving (grr!)
Like human languagesThey have a grammar that has evolved
12
Programming Language Syntax
Syntax is the grammar of the language The Listener a.k.a Compiler will point out
every syntax errorE.g. Baking Cake Recipe: Preheat Oven
missing temperature
Error messages may be helpfulOften, they are notYou gain experience with error messages after a
while
13
Program When you write a computational solution in a
programming language it is known as Writing a program E.g. Directions from point A to point B
When you ask the computer to carry out your solution it is known as Running or Executing a program E.g. Actually traveling from point A to point B
Computer Software Is made of one or more programs
14
Semantics Semantics is the meaning of the program
We learn the semantics after we run or execute the program Basically we observe the output
After the executing program, the semantics of the program may or may be correct
Semantic errors cause your answers to be wrong E.g. Baking a Cake Recipe: Add the juice of three onions
Compiler does not find anything wrong with the above statement
You may or may not get error messages E.g. Error Message – Dividing a number by zero
If your program is not doing what you want it to do, though it runs, the error is semantic
15
Programming -The Craft People have different tastes in programming, but
many values are held in common
Programming is an art as well as a craft
There are concepts fundamental to all programming languages We will practice the fundamentals using Programming
Language called Java Java also has additional feature called Object Oriented
Programming (OOP) model Design problems/programs such that they
correspond to real world entities