introduction

13
Introduction Agenda a + b = c Installation Completed Create a new project

Upload: theodore-estes

Post on 31-Dec-2015

19 views

Category:

Documents


0 download

DESCRIPTION

Introduction. Agenda a + b = c Installation Completed Create a new project. Computer – A Dummy Machine. Program. Translate. Computer (Charles Babbage). Result. Programming Languages. How do we categorize programming languages? - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction

Introduction

Agendaa + b = c

Installation CompletedCreate a new project

Page 2: Introduction

Computer – A Dummy Machine

Result

Computer(Charles Babbage)

Program

Translate

Page 3: Introduction

Programming LanguagesHow do we categorize programming languages?a. Machine, b. Assembly, c. Functional, d. Procedural, e. Object Oriented

Machine – Writing code in Binary format – ARM, DEC-PDP, Intel 8080, 8085 etc.

Assembly – Use Mnemonics to represent a operation – FAP, HLA, MACRO(series) etc.

Functional – Use to evaluate mathematical functions – LISP, XSLT etc.

Procedural/Imperative – Uses Procedures/Subroutines to carry out a series of steps – C, Cobol, Fortran, Basic etc.

Object Oriented – Uses classes and objects. Reusability/Inheritance and soon are supported – C#, Java, C++ etc.

Page 4: Introduction

Java James Gosling at Sun Microsystems. Object Oriented Language Platform Independent

Versions – JDK 1.0 to Java SE 7Java EE (Enterprise) , Java ME (Micro), Java SE (Standard Edition)Java Is a free/open source software

JRE - Java API + JVM (End Users to execute java programs)JDK – Java Complier + JRE + Dev Tools (E.g. Javadoc)JVM -

Java Code

Byte Code

M/C Code

Phones, Microwave, Game Consoles, Laptops, Super Computers etc.

Page 5: Introduction

Did you Know – JavaFamous Applications that are written using JavaAndroid, Ebay.com etc.

Well Known Companies that use JavaGoogle, Amazon, Oracle etc.

When to Use JavaYour applications can run on cross platforms, Networking, Security etc.

When not to Use JavaRich/Complex UI Applications, Operating Systems, Multimedia software etc.

Statistics1.1 billion desktops run Java930 million Java Runtime Environment downloads each year3 billion mobile phones run Java31 times more Java phones ship every year than Apple and Android combined100% of all Blu-ray players run Java1.4 billion Java Cards are manufactured each yearJava powers set-top boxes, printers, Web cams, games, car navigation systems, lottery terminals, medical devices, parking payment stations, and more.

Page 6: Introduction

Simplifying a Problem• Algorithm – Step by step instructions to solve a problem.• Pseudo code – Steps of algorithm written in a natural language.• Flow Chart – A graphical tool that shows a sequence of steps via symbols.

Write a Algorithm to add two numbers?

Start

Print Hello World

Stop

Page 7: Introduction

Eclipse IDEWhy Eclipse?• Open Source application platform, that enables Software Developers write

code in a easy way.

Common Terms• IDE (Integrated Development Environment) – Provides easy to find errors,

debug and fix them. They also include source control, object browser and soon ..

Where Eclipse?• Write Application specific code.• Write Unit tests.• Write Automated GUI/Web Service Tests.

Page 8: Introduction

Program AnatomyWant to eat something,What is the name of the dish? How do we instruct it to waiter?How does the cook prepares the dish?How does the dish is being served to you?How do we feel after eating the dish?

Want to write a program,Name of a Program Class Name class abc {Instructions to a Program Variables int a, b;Program Logic Program Body int c = a + bProgram Execution Main Method static void main (string[] args) {Output of a Program Print the O/P print (c); } }

Page 9: Introduction

Introduction to SVNSVN – Version Control System?We write programs and run it. But essentially in the real world same project file is being used by many developers ..Scenario - When two developers open a common file and start modifying it ** Developer A changes file and then Developer B – What Happens?How to Avoid this?** Lock – Modify – Unlock (Developer A Locks the file, Changes it and then release the lock ; Same is done by Developer B) – Disadvantages?** Copy – Modify – Merge (Developer A Modifies the File and Checks In, Developer B Modifies same file and gets a conflict when checking In, So he merges previous changes and then checks In with his changes) – SubversionCommonly Used Terms – Check In (Publish – so everybody can access), Check Out (To Edit – Local copy of file in repository), Repository (Central Database which has full source code), Trunk (Most Recent Working Code), Tags (tag a version – read only for reference) and Branches (All development work done here)

Page 10: Introduction

Resources• Algorithm and Flowchart :http://www.slideshare.net/lizcelaler/algorithm-and-flowcharthttp://lectnote.blogspot.in/2011/03/algorithms-and-flow-charts.html

• Computer and Programming Fundamentals :http://www.youtube.com/watch?v=c_sDgHgNR6w

• Java Downloads :http://java.com/en/download/index.jsphttp://www.roseindia.net/java/use-java/uses-of-java.shtml

• Eclipse :http://help.eclipse.orghttp://www.eclipse.org/downloads/

• SVN :http://www.javalinux.it/wordpress/2008/05/19/subversion-branching-in-my-experience/

Page 11: Introduction

Where to write a Program?Create a Java Project :

Name, Environment, Saving copy on local etc.

Configuring Build Path : • Associating Java File with the Project (Build Path – Add to Build Path)• Adding Jar (Java Archive – Classes/Resource to expose inbuilt functionality) files, Libraries etc.

Tips and Tricks :

• Preferences – Java – Installed JRE’s – (Select JRE / JDK and see the difference)• General – Workspace – Build Automatically option

Eclipse Commonly used terms :• Workspace (Work is stored) - Workbench (Welcome/Java Workbench) – Perspective (Editors – To Edit/Browse, Views – To Navigate)

Play Around Eclipse :

• Shortcuts – Adding/Removing Comments, Run, Debug, Tabbing between Editors, Search• Different ways of creating a project, Search• Export and Import features, Copy/Paste/Rename/Delete• Using External Editor (Try adding a Document, Excel or a Image – anything that uses external editor)

Page 12: Introduction

Debugging and More ..Eclipse makes your life easy

a. To spot errors as you type (Java – Editor)

b. Debugging

• F5 – Step Into• F6 – Step Over• F7 – Step Return

c. Content Assist - With use of JDK in the workspace, you will get suggestions as you type

d. Code Templates – Type the Keyword and then Ctrl + Space

e. Extract Method – Refactor – Extract Method

Page 13: Introduction

SVN Commands and Tools

Analogy – Solving a Math’s Problem. Repository is like answer sheet, you check out from your memory (Local Copy), add/update and then finally publish (SVN Client) back to your answer sheet.Commands Status (Committed Revision for file and repository, Owner, Path name etc.) Checkout (Create a local copy to edit an existing file) Add (Add a new file to the repository – Marked with label A) Update (Update all folders/files to the current revision) Commit (Commit/Publish the changes to the repository) Diff (See the difference of the Modified file with the one published) Undo (Revert changes to a committed file or the one modified and not yet published) Log (History of Project as seen in the repository, including revisions, commit owner, path, file etc) Delete (Delete a file from the repository)

Project/Repository(Assembla)

Local Copy(CheckOut)

SVN ClientAdd, Update, Commit

(Tortoise)