Introduction to Java. Java  An Object-Oriented, platform-neutral, secure language.  Object Oriented – software development method – a program is thought.

Slides:



Advertisements
Similar presentations
Chapter 1 OO using C++. Abstract Data Types Before we begin we should know how to accomplish the goal of the program We should know all the input and.
Advertisements

Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
Chapter 1 Object-Oriented System Development
Object Oriented System Development with VB .NET
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Basic OOP Concepts and Terms
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Computers: Tools for an Information Age
Principles of Object-oriented Programming Programming Language Paradigms August 26, 2002.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Introduction to Alice Basics : What is Alice? Object Oriented Definitions What Does it Look Like? Where Can I Use it?
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
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.
An Introduction to Programming with C++ Fifth Edition Chapter 1 An Introduction to Programming.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
Distribution of Marks Internal Sessional Evaluation Assignments – 10 Quizzes – 10 Class Participation Attendence – 5 Mid – Term Test – 25 External Evaluation.
Object Oriented Programming
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
A First Program Using C#
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to Classes, Objects, Methods and Attributes Lecture # 2.
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to Object-oriented programming and software development Lecture 1.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 8: More About OOP and GUIs.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
BCS 2143 Introduction to Object Oriented and Software Development.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
Unified Modeling Language, Version 2.0
Lecture 1 Introduction to Java MIT-AITI Ethiopia 2004.
Object Oriented Programming Examples: C++, Java Advantages: 1. reusibility of code 2. ability to adapt (extend) previously written code.
Computer Concepts 2014 Chapter 12 Computer Programming.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Chapter 3: Computer Software. Stored Program Concept v The concept of preparing a precise list of exactly what the computer is to do (this list is called.
An Object-Oriented Approach to Programming Logic and Design Chapter 1 An Overview of Computers and Logic.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Software Development Programming & Languages. Programming: A Five-Step Procedure Define the problem Design a solution Code the program Test the program.
Learners Support Publications Object Oriented Programming.
Object Oriented Programming A new way of thinking.
1.
: Maha Sabri Altememe Lecturer : Maha Sabri Altememe Lecture :1 1.
CSC1200 INTRODUCTION TO PROGRAMMING Dr. Maureen Markel
1 Unified Modeling Language, Version 2.0 Chapter 2.
Overview.ppt Overview-An Overview of Visual Basic.NET An Overview of Visual Basic.NET.
What is Java? Object Oriented Programming Language Sun Microsystems “Write Once, Run Everywhere” Bytecode and Virtual Machine Java Platform (Java VM and.
Next Back MAP MAP F-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
CSCI 171 Presentation 15 Introduction to Object–Oriented Programming (OOP) in C++
Chapter 1: Introduction to Computers and Programming.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Introduction to Java Chapter 1 - Introduction to Java1 Chapter 1 Introduction to Java.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Object-Orientated Programming
Chapter 8: More About OOP and GUIs
Sections Basic Concepts of Programming
Lecture 1: Introduction to JAVA
Computer Programming.
Extended Learning Module G
Presentation transcript:

Introduction to Java

Java  An Object-Oriented, platform-neutral, secure language.  Object Oriented – software development method – a program is thought of as a group of objects that work together.  Objects are created from templates called classes  Platform neutrality – a program’s ability to run without modification in different computing environments.  As long as a platform has a java virtual machine, it can run the code.  Java has automatic memory management, making it secure.

Object-oriented v. Procedural Programming  In this class, in addition to learning the java language, you will learn object- oriented programming.  The two go together;  Object-oriented – an approach to building programs that mimic how objects are assembled in the physical world.  We will give some examples initially, then move to some basic programming concepts, and at the end of the class revisit the creation of objects.

Procedural v. Object-Oriented  Procedural – instructions carried out step-by-step. Example – BASIC language.  Object-oriented looks at a program from a different angle, focusing on the task the program was created to perform.  Concept – a set of objects that work together to accomplish a task.  Each object is a part, interacting with the others in a controlled way.  Real World Example – Stereo System – many objects hooked together  Speaker components play mid-range and high-frequency  Subwoofer plays low bass  Tuner – radio signals  CD or MP3 player  Turntable – vinyl’s coming back!  Designed to interact using standard input and output connectors

Stereo Example  Object-oriented works under the same principle – you put together a program by creating new objects and then connecting them to each other and to existing objects.  These objects are combined in a standard way  Each object plays a specific role in the larger program.

Objects and Classes  Object = self-contained element of a computer program that represents a related group of features, designed to accomplish specific tasks.  Class – a template used to create an object  Every object created from the same class has similar features.  The process of creating an object from a class is called instantiation, which is why objects are called instances  Think back to Alice – when you put an object into a world, you instantiated an object.  Objects were in classes – people, school, environment, etc.

Example – Creating a class to represent command buttons  All buttons have attributes (Variables)  Have text displayed  Are a specific size  Have a specific appearance, 3D, shadow, etc.  Command buttons also have behaviors: (Methods)  Whether it requires a single- or a double-click  What it does when clicked  Whether it should ignore mouse clicks.  So, you would create a command button “CLASS”, and then make command button objects.

Organizing Classes and Class Behavior  Inheritance – allows one class to inherit behaviors and attributes of another class.  All classes are arranged in a hierarchy  A class can only have one superclass, unlimited subclasses  Designing an effective hierarchy requires planning  It allows you to reduce the number of repetitive features and redundant code.

 Things the Class Knows – Instance Variables  Things the class does - Methods