Welcome to CSSE 220. We are excited that you are here:

Similar documents
1.00 Lecture 2. What s an IDE?

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

Tips from the experts: How to waste a lot of time on this assignment

Implement an ADT while using Subversion

Java Programming Constructs Java Programming 2 Lesson 1

Java with Eclipse: Setup & Getting Started

Lec 3. Compilers, Debugging, Hello World, and Variables

Java using LEGO Mindstorms and LeJOS. University of Idaho

POOSL IDE Installation Manual

CompSci 125 Lecture 02

5/3/2006. Today! HelloWorld in BlueJ. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont.

For live Java EE training, please see training courses at

Developing Android applications in Windows

Getting Started with Eclipse/Java

SVN_Eclipse_at_home. 1. Download Eclipse. a. Go to: and select Eclipse IDE for Java Developers

SECTION 1: CODE REASONING + VERSION CONTROL + ECLIPSE

Introduction to Computation and Problem Solving

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

Mehran Sahami Handout #5 CS 106A September 27, 2017 Downloading Eclipse

Instructions PLEASE READ (notice bold and underlined phrases)

Exceptions and Design

Session 5 Exercises: - Installing Subclipse - Checking out code using Subclipse - Basic object-oriented programming in Java

16.410: Jump Starting With Java

How to make a "hello world" program in Java with Eclipse *

Tips from the experts: How to waste a lot of time on this assignment

COMP-202: Foundations of Programming. Lecture 2: Java basics and our first Java program! Jackie Cheung, Winter 2015

Chapter Two Bonus Lesson: JavaDoc

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5.

Chapter 1 - Introduction. Copyright 2014 by John Wiley & Sons. All rights reserved. 1

CS 201 Software Development Methods Spring Tutorial #1. Eclipse

Getting Started (1.8.7) 9/2/2009

ICOM 4015 Advanced Programming Laboratory. Chapter 1 Introduction to Eclipse, Java and JUnit

CSCI 161: Introduction to Programming I Lab 1b: Hello, World (Eclipse, Java)

Outline. CIS 110: Introduction to Computer Programming. What is Computer Science? What is computer programming? What is computer science?

Enter the site Title: Student Name s eportfolio Choose your Website Domain: Use a Subdomain of Weebly.com

Lecture Notes CPSC 224 (Spring 2012) Today... Java basics. S. Bowers 1 of 8

CS 106A, Lecture 25 Life After CS 106A, Part 1

COMP 110/401 APPENDIX: INSTALLING AND USING ECLIPSE. Instructor: Prasun Dewan (FB 150,

CHAPTER INTRODUCTION. Final Draft Oct. 15, Slides by Donald W. Smith TechNeTrain.com. Copyright 2013 by John Wiley & Sons. All rights reserved.

Chapter Goals. Contents. 1.1 Computer Programs

PART 1. Eclipse IDE Tutorial. 1. What is Eclipse? Eclipse Java IDE

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

Setup and Getting Startedt Customized Java EE Training:

1. Go to the URL Click on JDK download option

ELET4133: Embedded Systems. Topic 3 Eclipse Tour & Building a First App

Chapter Goals. Contents INTRODUCTION

Mehran Sahami Handout #5 CS 106A September 26, 2018 Downloading Eclipse

Our second exam is Thursday, November 10. Note that it will not be possible to get all the homework submissions graded before the exam.

Introduction to Eclipse

St. Edmund Preparatory High School Brooklyn, NY

COMP-202: Foundations of Programming. Lecture 2: Java basics and our first Java program! Jackie Cheung, Winter 2016

Object Oriented Programming and Design in Java. Session 2 Instructor: Bert Huang

Packaging Your Program into a Distributable JAR File

Compiling SA_MESH (r965)

S8352: Java From the Very Beginning Part I - Exercises

IQTIDAR ALI Lecturer IBMS Agriculture University Peshawar

Java Program Structure and Eclipse. Overview. Eclipse Projects and Project Structure. COMP 210: Object-Oriented Programming Lecture Notes 1

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

Announcements. 1. Forms to return today after class:

Software Tools Subversion

3 CREATING YOUR FIRST JAVA APPLICATION (USING WINDOWS)

Math Modeling in Java: An S-I Compartment Model

Lesson 10: Quiz #1 and Getting User Input (W03D2)

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction

CS 152: Data Structures with Java Hello World with the IntelliJ IDE

Week 2: Data and Output

Lecture 1 - Introduction (Class Notes)

Summer Assignment for the School Year

Welcome to our Moodle site! What is Moodle?

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I

Get JAVA. I will just tell you what I did (on January 10, 2017). I went to:

Eclipse. JVM, main method and using Eclipse. Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics

Eclipse Environment Setup

ICOM 4015: Advanced Programming

TDDC88 Lab 4 Software Configuration Management

Certified Core Java Developer VS-1036

Chapter Goals. Chapter One: Introduction. Prerequisites. What Is Programming?

Getting Started in Your Blackboard 5 Course

CS 268 Lab 6 Eclipse Test Server and JSPs

Mobile App:IT. Methods & Classes

Using Eclipse Europa - A Tutorial

Programming for Engineers in Python

CSSE 220 Day 3. Check out UnitTesting and WordGames from SVN

Moodle Student Manual

CompClass Solo User Guide for Instructors

Even though we created a folder for the workspace, we still have to let JCreator do the same. So click File, New, and then Blank Workspace.

You should now start on Chapter 4. Chapter 4 introduces the following concepts

Sonatype CLM - IDE User Guide. Sonatype CLM - IDE User Guide

If you don t have the JDK, you will need to install it. 1. Go to

PROGRAMMING STYLE. Fundamentals of Computer Science I

CSC116: Introduction to Computing - Java

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG

Eng. Mohammed S. Abdualal

Declaring and ini,alizing 2D arrays

Assignment 1. Application Development

Summer Assignment for AP Computer Science. Room 302

Annotation Hammer Venkat Subramaniam (Also published at

Check out FilesAndExceptions from SVN. Exam 2 Review File I/O, Exceptions Vector Graphics Project

CS 351: Design of Large Programs.

Module 3: Working with C/C++

Transcription:

Welcome to CSSE 220 We are excited that you are here: Start your computer Do NOT start Eclipse Follow the instructions in the email, if you haven t already Pick up a quiz from the back table Answer the first two questions

Course Introduction, Starting with Java CSSE 220 Object-Oriented Software Development Rose-Hulman Institute of Technology

Agenda Instructor intro A few administrative details Verify Eclipse and Subclipse configuration Java vs. Python Examine and modify simple Java programs

Daily Quizzes I expect you to answer every question. Including the last two, at least put N/A Stop me if I don t cover a question! Q1-2

A Tour of the On-line Course Materials Moodle Piazza Syllabus Schedule Q3 7

Programming is not a spectator sport And neither is this course Ask, evaluate, respond, comment! Interrupt me! Even with statements like, I have no idea what you were just talking about. I do not intend for classroom discussions to go over your head. Don't let them!

Ok, let s write our first Java program! Hello world 7

Check the Repository Folder Click Start Computer Double-Click Local Disk (C:) Double-Click EclipseWorkspaces If it doesn t exist, create it Verify that you have a folder named csse220 If it doesn t exist, create it If you have taken the course before: Rename the existing folder to csse220-old Create a new folder named csse220

Start Eclipse Opening Eclipse Go to C:\Program Files\eclipse Double-click eclipse.exe When prompted for the workspace, enter: C:\EclipseWorkspaces\csse220 If not prompted for the workspace, after Eclipse loads: Click File Switch Workspaces Other Enter path above

Select Perspective Look at the top-right corner of Eclipse If Java is selected, do nothing and wait for next slide Otherwise: Click Window Perspective Other Select Java Click OK

Set Compiler Version Open Eclipse Select Window -> Preferences Expand Java in the left menu Click Compiler Select compiler compliance level of 1.7 and check "Use default compliance settings" if it isn't already selected. Click OK

Get SVN Menu If SVN menu not shown at the top of the screen: Click Window Perspective Customize Perspective Click Command Groups Availability OR Action Set Availability Scroll down and check SVN Click OK

SVN Repositories Window You can also display the SVN Repositories Window by doing the following: Click Window Show View Other Expand SVN Select SVN Repositories Click OK

Add Your Repository Click SVN Checkout projects from SVN Select Create a new repository location Click Next Type the following URL, replace the user in blue with your username: http://svn.csse.rose-hulman.edu/repos/csse220-201620-user Mine would be: http://svn.csse.rose-hulman.edu/repos/csse220-201620-stouder Click Next

Checkout Project for Today If you received an error at the end of the last slide, let myself or a TA know immediately Otherwise, expand your repository and select HW1 Click Finish

Show Package Explorer If HW1 did not show up in the Package Explorer (defaults to the left): Click Window Show View Package Explorer

HelloPrinter.java To run a Java program: Right-click the.java file in Package Explorer view Choose Run As Java Application Change the program to say hello to a person next to you Introduce an error in the program See if you can come up with a different error than the person next to you Fix the error that the person next to you introduced

A First Java Program In Java, all variable and function definitions are inside class definitions main is where we start public class HelloPrinter { public static void main(string[] args) { System.out.println("Hello, World!"); } } System.out is Java's standard output stream. This is the variable called out in the System class. System.out is an object from the PrintStream class. PrintStream has a method called println( ). Q8

Introduction to Java

Things Java Has in Common with Python Classes and objects Lists (but no special language syntax for them like Python) Standard ways of doing graphics and GUIs A huge library of classes/functions that make many tasks easier Nice integration with the Eclipse IDE

Why Java? Widely used in industry for large projects From cell phones including smart phones Android platform To global medical records Highlights essential topic of the class Object Orientation Similar to other popular languages C#, Objective-C Less complex than C++ Most popular language according to the TIOBE Programming Community Index [November 2015] http://www.tiobe.com/index.php/content/paperinfo/t pci/index.html Guess what language is #2 Q9

Interlude: JavaScript and Java Java is to Javascript as Ham is to Hamster From Wikipedia (edited, bullets added to enhance PowerPoint readability): The change of name to JavaScript roughly coincided with Netscape adding support for Java technology in its web browser. The name caused confusion, giving the impression that JavaScript was a spin-off of Java. The choice has been characterized by many as a marketing ploy by Netscape to give JavaScript the cachet of what was then the hot new web-programming language. It has also been claimed that the language's name is the result of a comarketing deal between Netscape and Sun, in exchange for Netscape bundling Sun's Java runtime with its then-dominant browser.

Basic Java Functions and Conditionals Let s go through the ConditionalExamples.java file 23

/** * Has a static method for computing n! * (n factorial) and a main method that * computes n! for n up to Factorial.MAX. * * @author Mike Hewner & Delvin Defoe */ public class Factorial { /** * Biggest factorial to compute. */ public static final int MAX = 17; } /** * Computes n! for the given n. * * @param n * @return n! for the given n. */ public static int factorial (int n) {... }... Javadoc comments We left out something important on the previous slide comments! Java provides Javadoc comments (they begin with /**) for both: Internal documentation for when someone reads the code itself External documentation for when someone re-uses the code Comment your own code now, as indicated by this example. Don t forget the @author tag in HelloPrinter.

Writing Javadocs Written in special comments: /** */ Can come before: Class declarations Field declarations Constructor declarations Method declarations Eclipse is your friend! It will generate Javadoc comments automatically It will notice when you start typing a Javadoc comment

In all your code: Write appropriate comments: Javadoc comments for public fields and methods. Explanations of anything else that is not obvious. Give self-documenting variable and method names: Use name completion in Eclipse, Ctrl-Space, to keep typing cost low and readability high Use Ctrl-Shift-F in Eclipse to format your code. Take care of all auto-generated TODO s. Then delete the TODO comment. Correct ALL compiler warnings. Quick Fix is your friend! Q10-11

HW1 DUE BEFORE NEXT SESSION IT S ON THE SCHEDULE PAGE. (IT IS YOUR RESPONSIBILITY TO KEEP UP WITH THE SCHEDULE PAGE) AS ALWAYS, POST ON PIAZZA (OR EMAIL ME) IF YOU HAVE ANY QUESTIONS 27