Fundamentals of Software Development 1Slide 1 Why start with WordGames? You wrote your first lines of code in this course in WordGames.You wrote your first.

Slides:



Advertisements
Similar presentations
JAVA BASICS SYNTAX, ERRORS, AND DEBUGGING. OBJECTIVES FOR THIS UNIT Upon completion of this unit, you should be able to: Explain the Java virtual machine.
Advertisements

JAVA BASICS SYNTAX, ERRORS, AND DEBUGGING. GCOC – A.P. Computer Science A College Board Computer Science A Topics Covered Program Design - Read and understand.
Fundamentals of Software Development 1Slide 1 Review: Why start with WordGames? You wrote your first lines of code in this course in WordGames.You wrote.
Chapter 1 These slides for CSE 110 Sections are based in part on the textbook-authors’ slides, which are copyright by the authors. The authors state that.
Fundamentals of Software Development 1Slide 1 Today’s Summary Hello World concepts – –main, static, console Programming patterns involving assignment and.
Fundamentals of Software Development 1Slide 1 Why have interfaces? A Java interface is the “face” that one class shows othersA Java interface is the “face”
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
©2004 Brooks/Cole Chapter 1: Getting Started Sections Covered: 1.1Introduction to Programming 1.2Constructing a Java Program 1.3The print() and println()
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
Java Intro. A First Java Program //The Hello, World! program in Java public class Hello { public static void main(String[] args) { System.out.println("Hello,
Fundamentals of Software Development 1Slide 1 Interfaces Outline:Outline: –Generic interface versus Java interface –What a (Java) interface is: Its syntaxIts.
Slide 1 of 40. Lecture A The Java Programming Language Invented 1995 by James Gosling at Sun Microsystems. Based on previous languages: C, C++, Objective-C,
COMP 14: Primitive Data and Objects May 24, 2000 Nick Vallidis.
Java CourseWinter 2009/10. Introduction Object oriented, imperative programming language. Developed: Inspired by C++ programming language.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
1 SD1042: Introduction to Software Development SD1042 Introduction to Software Development SCHOOL OF COMPUTING AND TECHNOLOGY Getting Started MODULE TEAM.
Unit 2: Java Introduction to Programming 2.1 Initial Example.
+ 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.
Ch 1. Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2012.
Hello AP Computer Science!. What are some of the things that you have used computers for?
2.2 Information on Program Appearance and Printing.
 Java Programming Environment  Creating Simple Java Application  Lexical Issues  Java Class Library.
Fundamentals of Software Development 1Slide 1 Recap: “From scratch” projects Today’s software engineering is almost NEVER “from scratch”Today’s software.
CompSci 42.1Intro to Java Anatomy of a Class & Terminology Running and Modifying a Program.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
Java Classes Using Java Classes Introduction to UML.
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.
Chapter 1 CSIS-120: Java Intro. What is Programming?  A: It is what makes computer so useful.  The flexibility of a computer is amazing  Write a term.
Java Spring PImage Let’s look at the PImage class in ProcessingPImage –What are the fields (i.e., variables)? –What methods are available? –What.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Programming Concept Chapter I Introduction to Java Programming.
The scope of local variables. Murphy's Law The famous Murphy's Law says: Anything that can possibly go wrong, does. (Wikipedia page on Murphy's Law:
Fall 2006Slides adapted from Java Concepts companion slides1 Introduction Advanced Programming ICOM 4015 Lecture 1 Reading: Java Concepts Chapter 1.
Output in Java Hello World!. Structure of a Java Program  All Java files in ICS3U1 have the following structure: class HelloWorld { }  Notice the open.
Jens Dalsgaard Nielsen Jan Dimon Bendtsen Dept. of Electronic Systems Basic Programming INS-basis GF, PDP and HST.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
Anatomy.1 Anatomy of a Class & Terminology. Anatomy.2 The Plan Go over MoveTest.java from Big Java Basic coding conventions Review with GreeterTest.java.
JAVA Practical Creating our first program 2. Source code file 3. Class file 4. Understanding the different parts of our program 5. Escape characters.
Getting Started.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Hello Computer Science!. Below is an example of a Hello World program in JAVA. While it is only three lines of code, there are many things that are happening.
Lab 01-2 Objectives:  Writing a Java program.  How to send output to the command line console.  Learn about escape sequences.  Learn how to compile,
CSI 3125, Preliminaries, page 1 Compiling the Program.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.3 Write Your First Java Program Produced by Harvey.
OOP Basics Classes & Methods (c) IDMS/SQL News
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.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Programming – Lecture 15 Going Beyond the ACM Library.
Computer Science I Lab 1 ISMAIL ABUMUHFOUZ | CS 180.
Learning Plan 6 Java Programming Intro to Object Oriented Programming.
Programs and Models Almost all computer programs model some artifact – Artifact: product of civilization, either concrete or abstract, simple or complex.
Introduction to java (class and object). Programming languages: –Easier to understand than CPU instructions –Needs to be translated for the CPU to understand.
Introduction to programming in java
Object-Oriented programming for Beginners LEAPS Computing 2015
The eclipse IDE IDE = “Integrated Development Environment”
Exercise Java programming
Ch 1. A Python Q&A Session Bernard Chen 2007.
CompSci 230 Software Construction
Getting Started ARCS Lab..
Tonga Institute of Higher Education
Java Intro.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
A Java Application public class Hello { public static void main(String [] args) { System.out.println("Hello, World!"); } } public class.
Fundamentals of Software Development 1
Chap 4. Programming Fundamentals
How to Run a Java Program
Presentation transcript:

Fundamentals of Software Development 1Slide 1 Why start with WordGames? You wrote your first lines of code in this course in WordGames.You wrote your first lines of code in this course in WordGames. Why start with such a complex project?Why start with such a complex project? Answer:Answer: –It is practical to do so, by using an interface to connect your code to ours –It makes the point that most software engineers modify/extend existing programs rather than creating their own “from scratch” See next slides for details on these two points

Fundamentals of Software Development 1Slide 2 UML class diagram for WordGames CapitalizerNameDropperxxx … StringTransformable transform(String) : String All our stuff The StringTransformable interface is how our code knows how to “connect” to your code Questions on this important idea?

Fundamentals of Software Development 1Slide 3 “From scratch” projects Today’s software engineering is almost NEVER “from scratch”Today’s software engineering is almost NEVER “from scratch” –Compilers translate from high-level language to machine code –We use libraries for printing and (in Java) much more –We reuse existing code During a 20 year career, a typical software engineer might:During a 20 year career, a typical software engineer might: –Work on about 20 projects –Be involved with the creation of only 1 or 2 projects from scratch For all the other projects, she modifies/extends existing projectsFor all the other projects, she modifies/extends existing projects We’ll do a “from scratch” project today called HelloWorldWe’ll do a “from scratch” project today called HelloWorld –So that you can see what one is like –And so that you can see “under the hood” of some of the concepts that you have been studying

Fundamentals of Software Development 1Slide 4 Hello World concepts – outline The next slide shows the entire HelloWorld programThe next slide shows the entire HelloWorld program –It illustrates the following concepts: The main methodThe main method Static methodsStatic methods Console projectsConsole projects How to use System.out.println to print a String to the consoleHow to use System.out.println to print a String to the console –You will experience these same concepts in your own HelloWorld project immediately afterwards So pay attention and ask questions!So pay attention and ask questions!

Fundamentals of Software Development 1Slide 5 Hello World – the complete program public class HelloWorld { public static void main(String[] args) { System.out.println("Hello world"); } main is the name of the special method at which any Java application begins A static method is a method that “belongs” to the class instead of to each instance of the class. The static method cannot refer to the class’ non-static fields. The special main method is, by definition, static. System is a class that has “system” stuff System has a public static field called out that is a PrintStream – a thing that can print to the console main has command-line arguments sent as a String array println is a PrintStream method that prints its argument on a line Instructor: run this zipped HelloWorld project HelloWorld project

Fundamentals of Software Development 1Slide 6 Hello World – the complete program public class HelloWorld { public static void main(String[] args) { System.out.println("Hello world"); } What is special about the main method? The main method is static. What does that mean? Is System a class, method or field? How can you tell? Is out a method or field? How can you tell? Is println a method or field? What does println do? Find a partner with whom you would like to do the HelloWorld project. With that partner, answer the questions below. Ask for help as needed from your instructor or assistants! Once you are satisfied that you understand the HelloWorld program shown below, do the HelloWorld, Part 1 project with your partner.HelloWorld, Part 1