Catie Welsh January 19, 2008 1.  Office Hours ◦ After Class Today ◦ Come if you don’t have Eclipse working 2.

Slides:



Advertisements
Similar presentations
CS107 Introduction to Computer Science Lecture 2.
Advertisements

CS107: Introduction to Computer Science Lecture 2 Jan 29th.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
How to make a peanut butter and jelly sandwich
* Programming is the activity of creating a set of detailed instructions (program) that when carried out on a consistent set of inputs will result in.
COP 2800 Lake Sumter State College Mark Wilson, Instructor.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Introduction to Computers and Java Module 1. Objectives overview computer hardware and software introduce program design and object-oriented programming.
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
By Droids Robotics Good Coding Practices: Start with Pseudocode BEGINNER EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 4/1/
Introduction to Computers and Java Recitation - 01/11/2008 CS 180 Department of Computer Science, Purdue University.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Chapter 11 Introduction to Computers and Java Chapter 1.
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank M. Carrano. ISBN © 2009 Pearson Education, Inc.,
CS107 Introduction to Computer Science Lecture 2.
Slides prepared by Rose Williams, Binghamton University Chapter 3 Flow of Control Loops in Java.
COMP 110 Designing Programs Tabitha Peck M.S. January 16, 2008 MWF 3-3:50 pm Philips
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 2: Developing a Program Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
By: Rachel Kenney. First Step Get a plate and bread out.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Intro to CS – Honors I Programming Basics GEORGIOS PORTOKALIDIS
A First Program Using C#
Copyright © 2002, Systems and Computer Engineering, Carleton University Intro.ppt * Object-Oriented Software Development Unit 1 Course.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Developing a Program.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
How to make a Peanut Butter and Jelly Sandwich!
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank M. Carrano. ISBN © 2007 Pearson Education, Inc.,
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
CHAPTER 1: INTRODUCTION TO COMPUTER SCIENCE Introduction to Computer Science Using Ruby (c) 2012 Ophir Frieder et al.
JAVA: An Introduction to Problem Solving & Programming, 7 th Ed. By Walter Savitch ISBN © 2015 Pearson Education, Inc., Upper Saddle River,
Object Oriented Programming Computer Engineering Department JAVA Programming Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2014.
Computer Concepts 2014 Chapter 12 Computer Programming.
Chapter 11 Introduction to Computers and Java Chapter 1.
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
Introduction to Computers and Java Module 1. Objectives overview computer hardware and software introduce program design and object-oriented programming.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
Defining Classes and Methods Chapter 4. Object-Oriented Programming Our world consists of objects (people, trees, cars, cities, airline reservations,
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
Presented by: Mr. Pugh’s Class 2011 Ingredients Peanut Butter Jelly Two Slices of Bread.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Catie Welsh January 31,  Project 1 Due Wednesday  Lab 1 Grades are posted 2.
Chapter 2 Principles of Programming and Software Engineering.
Chapter 1: Introduction to Computers and Programming.
OOP - Object Oriented Programming
Mobile Development Workshop
Principles of Programming I (CIE 105)
INTRODUCTION TO OOP Objective:
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Introduction to Computers and Java
BEGINNER PROGRAMMING LESSON
Computer Programming.
Introduction to Computers and Java
The procedure.
Object-Oriented Programming
How to make a peanut butter & jelly sandwich
Object-Oriented Programming
BEGINNER PROGRAMMING LESSON
Object-Oriented Programming
BEGINNER PROGRAMMING LESSON
Object-Oriented Programming
Developing A Good Procedure
Presentation transcript:

Catie Welsh January 19,

 Office Hours ◦ After Class Today ◦ Come if you don’t have Eclipse working 2

 Is Java a high-level language or a low-level language?  What does the following Java statement display onto the screen? System.out.println(“Java is great!”);

 Object-Oriented Programming  Encapsulation, polymorphism, and inheritance  Writing Algorithms in pseudocode  Variables, arguments, statements, and syntax 4

 Our world consists of objects (people, trees, cars, cities, airline reservations, etc.).  Objects can perform actions which affect themselves and other objects in the world.  Object-oriented programming (OOP) treats a program as a collection of objects that interact by means of actions.

 Objects, appropriately, are called objects.  Actions are called methods.  Objects of the same kind have the same type and belong to the same class. ◦ Objects within a class have a common set of methods and the same kinds of data ◦ but each object can have it’s own data values.

 OOP adheres to three primary design principles: ◦ Encapsulation ◦ Polymorphism ◦ Inheritance

 packing things up, only seeing part of what is going on  Encapsulation provides a means of using the class, but it omits the details of how the class works.  Encapsulation often is called information hiding. 8

 An automobile consists of several parts and pieces and is capable of doing many useful things. ◦ Awareness of the accelerator pedal, the brake pedal, and the steering wheel is important to the driver. ◦ Awareness of the fuel injectors, the automatic braking control system, and the power steering pump is not important to the driver.

 “many forms”  Same instruction to mean same thing in different contexts. ◦ Example: “Go play your favorite sport.”  I’d go play lacrosse.  Others of you would play baseball instead.  In programming, this means that the same method name can cause different actions depending on what object it is applied to.  More on this in Chapter 8. 10

 way of organizing classes.  At each level classification becomes more specialized. 11

 Classes can be organized using inheritance.  A class at lower levels inherits all the characteristics of classes above it in the hierarchy.  At each level, classifications become more specialized by adding other characteristics.  Higher classes are more inclusive; lower classes are less inclusive.

 A set of instructions for solving a problem  By designing methods, programmers provide actions for objects to perform.  An algorithm describes a means of performing an action.  Once an algorithm is defined, expressing it in Java (or in another programming language) usually is easy. 13

 Get slice of bread from loaf and put on plate  Repeat until enough peanut butter ◦ Put knife into peanut butter jar and get peanut butter ◦ Transfer peanut butter from knife to slice of bread  Transfer other slice of bread from loaf to plate  Repeat until enough jelly ◦ Put knife into jelly jar and get jelly ◦ Transfer jelly from knife to other slice of bread  Put slice of bread (pb side down) on other slice of bread  Enjoy!

 combination of code and English used to express an algorithm before writing algorithm into code 15

 Variables - store a piece of data  Statements - instructions to the computer  Syntax - grammar rules for a language  Arguments - information methods need to carry out its action

 Program 1 is on the web page  We will look at code in recitation that will help you

 Recitation (bring charged laptop)  Lab 1  Programming help for Program 1 18