Data Structure: Java Programming 1 Min Chen School of Computer Science and Engineering Seoul National University.

Slides:



Advertisements
Similar presentations
Object Oriented Programming in Java George Mason University Fall 2011
Advertisements

Brief Introduction to Java and C# Dahai Guo Oracle Certified Java Programmer (SCJP) Associate Professor and Program Director Software Engineering Program.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Data Structure: Java Programming 1 Min Chen School of Computer Science and Engineering Seoul National University.
Introduction to Java Programming, 4E
Introduction to Java Lab CS110A – Lab Section 004 Instructor: Duo Wei.
For more Lectures and Notes Visit
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
A Short Introduction to JAVA
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
Introduction to Java Tonga Institute of Higher Education.
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
Introduction to Java Programming with JBuilder 4
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
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.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Computers,
CPCS  Problem Solving in Everyday Life  Types of Problems  Problem Solving with Computers  Difficulties with Problem Solving 0-3.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Programs,
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
1.  At the end of this slide, student can:  Explore tools, features, properties and interface of the Textpad.  Creating a new project.  Open and run.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
Introduction to Computers & Java CSS 161: Fundamentals of Computing Joe McCarthy 1.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Введение в JAVA. Java Java – язык программирования: объектно-ориентированный кроссплатформенный строго-типизированный.
Java Environment CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Java and C# [this is a bonus – it is not a required lesson] ACO101: Introduction to Computer Science.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Programs.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Introduction to Java Programming with Forte Y. Daniel Liang.
Clement Allen, PhD Florida A&M University SUMMER 2006.
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
Java Programming Presented by Daniel Rosenthal Friday, November 30 th, 2007.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
Introduction to Eclipse. What is Eclipse? An Integrated Development Environment Provides many features to ease C++ programming (and others, e.g. C/Java)
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Preliminaries CS 310: Object-oriented Programming Java API.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
 Instructor: Dr. Jason Nichols –  Office Hours: – 9:30-10:30 M/W/F or by appointment – Business Building.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
How to Install Eclipse Click hereClick here to download Eclipse.
Application Architecture Using Java Hong Li. Introduction Developed by a team led by James Gosling at Sun Microsystem. Originally called Oak, designed.
CSc 201 Introduction to Java George Wells Room 007, Hamilton Building
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Introduction to Java Programming. 2 Chapter 1 Introduction to Java and Forte F What Is Java? F Getting Started With Java Programming –Create, Compile.
©2016 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. CSC 110 – INTRO TO COMPUTING - PROGRAMMING Overview of Programming.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
ITP 109 Week 2 Trina Gregory Introduction to Java.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Computer Science I Lab 1 ISMAIL ABUMUHFOUZ | CS 180.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction.
Learning Plan 6 Java Programming Intro to Object Oriented Programming.
Introduction to Java Programming, 4E Y. Daniel Liang.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
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.
Chapter 1 Introduction to Computers, Programs, and Java
Chapter No. : 1 Introduction to Java.
1. Environment Setting Minhaeng Lee.
Introduction to Java Dept. Business Computing University of Winnipeg
Getting Started ARCS Lab..
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Data Structure: Java Programming 1 Min Chen School of Computer Science and Engineering Seoul National University

Content  Overview of Java  Integrated Development Environment (IDE)  Install Java SE  Introduction to Eclipse  Setup your IDE in Windows  Start a new Java Project  Object-Oriented Programming  Concept of Class  Method in Class  Class in Java Programming

Overview of Java  Began as an internal project in 1990  Named “Oak” first  Sun Microsystem  Providing an alternative to the C++/C  Re-target Java to Internet in 1994  Versions  Java Card  Java ME (Micro Edition)  Java SE (Standard Edition)  Java EE (Enterprise Edition)

Features of Java  Object-Oriented Programming Language  Write Once, Run Anywhere  Java Virtual Machine (VM) Machine Code Java VM Java Binary Files (.class) Java Code (.java) Compiler Runtime Interpreting

Install Java SE JDK  Website: 

IDE: Eclipse  A powerful IDE for Java development  As Microsoft Visual C++ for C++/C Development  Totally Free of Use !!!  A large number of Plug-in  Enable C++ development  Enable Website Design  … … Integrated Development Environment

Eclipse: Download  Website: 

Start Eclipse  Steps 1. Extract the zip file into your hard disk 2. Double click to run “eclipse.exe” 3. Select your workspace directory

Start a new Java Project

Writing Code for HelloWorld public static void main(String args[]) { System.out.print("Hello World in Java!"); } public static void main(String args[]) { System.out.print("Hello World in Java!"); }

HelloWorld: Result

Object-Oriented Programming  Process-Oriented Programming  Focus on a flow process  Separates the concerns of data structures and the concurrent processes that act upon them  Object-Oriented Programming  Uses "objects" – data structures consisting of datafields and methods together with their interactions – to design applications  Feature  Information hiding, Data abstraction, Encapsulation, Modularity, Polymorphism, Inheritance

Object-Oriented Programming  Example: Gobang Game (five-in-a-row) Start Black Turn Draw chessboard Black Win ? End White Turn Draw chessboard White Win ? Y N Y N Process-Oriented Programming: Object-Oriented Programming: Chessboard System Judgment System White Player Black Player

Concept of Class  Example 1 Name:Bill Gates Gender:Male Age:54 Born:U.S. Company:Microsoft Products:Windows, Office… Name:Steve Jobs Gender:Male Age:54 Born:U.S. Company:Apple Inc. Products:Mac, iPod, iPhone… CEO Name Gender Age Place of Birth Company Products

Concept of Class (cont.)  Example 2 Name: 박지성 Gender:Male Age:28 Born:Korea Employer:Man. United Sports:Football League:Premier Name:Yao Ming Gender:Male Age:29 Born:China Employer:Rockets Sports:Basketball League:NBA Sportsman Name Gender Age Place of Birth Employer Sports League

Inheritance of Class  Higher Abstract CEO Name Gender Age Place of Birth Company Products Sportsman Name Gender Age Place of Birth Employer Sports League Name Gender Age Place of Birth People Sportsman Employer Sports League CEO Company Products

Method in Class  A class is not just a collection of data (we call it attribute), but also a collection of methods  Method  As the function in C++/C  Define procedure with input and output  Example:  People  Think()  Eat()  Sleep()

Summary of Class  Consist of Attributes and Methods  Represents a collection of data and functions which have relationship to each other  Other features  Information hiding  Data abstraction  Encapsulation  Modularity  Polymorphism  Inheritance

Class in Java Programming  Personally, I classify the Classes in Java Programming into two types:  Entrance Class (Project Class)  With main method in the Class  The entrance and control center of the whole program  Accessories Class  Provide functional part  Call in the main function to create instance HelloWorld.java is an Entrance Class The method in Accessories Class being called should be public!

Example  CEO Class Constructed Function: Run when the object is initiated Define the attributes for Class CEO Set to be public so that the function in CEO can be called in other Class

Example (cont.)  HelloWorld Class Create an instance (steve) of Class CEO Reset the name of the instance by the method setName in Class CEO Get the name of the instance by the method getName in Class CEO

Example Result  The system print out: Hello World in Java! My name is Steve Jobs

Thank you