MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.

Slides:



Advertisements
Similar presentations
In Review JAVA C++ GUIs - Windows Webopedia.com.
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Chapter 1: Introduction
Lab#1 (14/3/1431h) Introduction To java programming cs425
Chapter 1 Object-Oriented System Development
got ? Research Project – April 1998 Hang Xia, Mark Wang, Richard S. Chang Updated: R Norman, August 1999.
Object Oriented System Development with VB .NET
For more Lectures and Notes Visit
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 - Java Programming Fundamentals1 Chapter 2 Java Programming Fundamentals.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Introduction to Java.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Getting Started with Java
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
CIS205 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
Chapter 1 Coding Introduction.
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
A First Program Using C#
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Microsoft Visual Basic 2005: Reloaded Second Edition
Chapter 1: Creating Java Programs
Sadegh Aliakbary Sharif University of Technology Fall 2010.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Java Lecture 16: Dolores Zage. WWW n Was a method for distributing passive information n added forms and image maps n interaction was only a new way to.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
Module Overview n Module Title: OO Programming n Module Code: MIT3446 n Module Value: 3.0 n Duration: 15 weeks n Class-Contact Hours: Lecture15 hrs n Lab/Tutor30hrs.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
Lecture :2 1.  DEFENTION : Java is a programming language expressly designed for use in the distributed environment of the Internet. It was designed.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Sharda University P. K. Mishra (Asst.Prof) Department of Computer Science & Technology Subject Name: Programming Using C Sub Code: CSE-106 Programming.
Open Source Software JAVA Sean Thompson Itec 400 4/5/07.
CT1513 Introduction To java © A.AlOsaimi.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and web applications Very rich GUI libraries Portability (machine independence) A real Object.
Application Architecture Using Java Hong Li. Introduction Developed by a team led by James Gosling at Sun Microsystem. Originally called Oak, designed.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
1 Introduction to Java. 2 * 10% Assignments/ class participation * 10% Pop Quizzes * 05% Attendance * 25% Mid Term * 50% Final Term.
Introducing Java Chapter 3 Review. Why Program in Java? Java, is an object-oriented programming language. OOP languages evolved out of the need to better.
1 Introduction Read D&D Sec 1.8; Sec 1.13 THE Java tutorial -
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
BlueJ X ICSE Syllabus. Board Pattern THEORY (100 marks) PRACTICAL (100 marks) PROJECT (50 marks) ASSIGNMENTS (50 marks)
Introduction to 1. What is Java ? Sun Microsystems Java is a programming language and computing platform first released by Sun Microsystems in The.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Introduction CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
CIS 234: Object-Oriented Programming with Java
Chapter 1 Coding Introduction.
Object Oriented Programming in
Before You Begin Nahla Abuel-ola /WIT.
GC101 Introduction to computer and program
Chapter 1 Introduction to Computers, Programs, and Java
Introduction to.
Java programming lecture one
Introduction Enosis Learning.
Introduction Enosis Learning.
Chapter 1 Coding Introduction.
Your First Java Application
Units with – James tedder
Computer Programming-1 CSC 111
Presentation transcript:

MC697 Object-Oriented Programming Using Java

In this class, we will cover: How the class will be structured Difference between object-oriented programming and procedural programming Advantages of OOP Introduction to Java Building a Java class

How the class will be structured Learn syntax before OO concepts –It's hard to learn concepts when you're struggling with the language. We will not use IDE’s in this class. For the labs, bring a laptop to class if you have one. Syllabus online at www2.bc.edu/bernier

Object-Oriented Programming (OOP) vs. Top-Down (Procedural) Programming OO approach –System is defined as a collection of objects that work together to accomplish tasks Objects carry out actions when asked Each object maintains its own data Procedural approach –System is defined as a set of procedures that interact with data Data is maintained separately from procedures

Advantages of Object-Oriented System Development Objects are more natural Reuse –Classes and objects can be invented once and used many times during analysis, design, and programming –Do not need source code for reused class, simply need to know interface

Introducing Java Released mid 1995 by Sun Microsystems Designed to be: –A powerful, full-featured, pure OO development language –Easy to learn - syntax is similar to C++ –Platform independent –Support development of applications for networked environment –Ideal for Web-based applications

Introducing Java Powerful –Class library Hundreds of prewritten classes Provide methods to accomplish various tasks OO –Implements OO concepts described in Ch. 1 –Encourages good software design Reduces debugging and maintenance

Introducing Java Simplicity –Keywords Java has 48 keywords –vs. Cobol or VB which have hundreds Have special meaning in the language Used in writing statements

Introducing Java Portability –Programs can be written and compiled once, then run on different platforms Important for internet applications (applets) –Achieved by using: Bytecode –Produced when a Java program is compiled Interpreter (Java Virtual Machine – JVM) –Execution environment for bytecode on each platform

Introducing Java Development environments –Java Development Kit Available free from Sun Web site: java.sun.com Includes: compiler JVM and prewritten classes –Integrated Development Environments (IDEs) Provide: –Sophisticated editors –Debugging tools –Graphical development tools

Building a Java Class Applets vs. Applications vs. Servlets –Applets run on the client in a browser –Applications run on the client on their own –Servlets run on the server Each source code file defines a class –Class HelloWorldWideWeb –File HelloWorldWideWeb.java

Building a Java Class Class header –Describes class contained in source code file –Keywords: public –Indicates class has public availability class –Indicates line of code is a class header

Building a Java Class Identifiers –Name of a class, method, or variable Can be any length Can include any character except a space Must begin with a letter of the alphabet, a dollar sign ($), or the underscore (_) character –Java is case sensitive Public isn’t the same as public

Building a Java Class Block of code –Used to group statements –Delineated by open curly brace ({) and closed curly brace (}) –All code in Java is enclosed in a single block of code, which can contain additional blocks

Building a Java Class Indentation –Not required  recommended Line continuation –Can extend statements over multiple lines No continuation character required

Building a Java Class Java code generally consists of: –Variable definitions –One or more methods Method header –Comments to identify method and describe some of its characteristics