This document provides an introduction and overview of Java programming concepts including:
- Java can be used to create dynamic web applications, native applications, and is not the same as JavaScript.
- The basic structure of a Java program includes object-oriented concepts like classes, objects, inheritance. Development environments like Eclipse help facilitate Java development.
- Variables represent object state and methods represent object behavior. Classes are templates that define common attributes and behaviors of objects.
- Eclipse is an integrated development environment used for Java development which allows editing, compiling and running Java programs.
This document discusses object-oriented programming (OOP) and functional programming (FP), arguing that they are not opposing paradigms and instead can complement each other. It provides history on the development of OOP and FP. Key points made include: 1) OOP principles like immutability and closure/high-order functions indicate consistency with FP; 2) Neither paradigm will solve all problems on its own and both are subject to misuse; 3) A false dichotomy exists between OOP vs FP - they can be used together; 4) Future paradigm shifts will come from better tools augmenting human intellect rather than from "normal science" improvements to languages.
This document discusses key concepts in Java including data types, variables, operators, and input/output. It covers primitive data types like integers and floating-point numbers. It also discusses initializing and naming variables, relational and boolean operators, built-in string and math methods, and using Scanner and print statements for input and output. The overall purpose is to provide an overview of fundamental Java concepts.
Java 201 Intro to Test Driven Development in Javaagorolabs
This document provides an overview and agenda for a Java 201 course on test-driven development (TDD) in Java. It introduces TDD workflows and concepts like the feedback loop and test frameworks. The agenda covers setting up an IDE, writing the first unit test, test anatomy, and concludes with a hands-on exercise to build components of a card game using TDD.
This document provides information about the CS3101-3 Programming Language - JAVA course for Fall 2004. It introduces the instructor, Ke Wang, and his contact information. It states the class will meet on Wednesdays from 11am-1pm for 6 weeks ending on October 20th. There will be 5-6 homework assignments due on Tuesdays at 11:59:59pm. Late submissions are allowed once with a 24-hour extension. The document outlines topics that will be covered in the course like Java basics, objects, classes, inheritance, and GUI programming. It provides references to online textbooks and tutorials that can be used. Finally, it encourages students to practice programming to learn the language.
This document provides information about the CS3101-3 Programming Language - JAVA course for Fall 2004. It introduces the instructor, Ke Wang, and his contact information. It states the class will meet on Wednesdays from 11am-1pm for 6 weeks ending on October 20th. There will be 5-6 homework assignments due on Tuesdays at 11:59:59pm. Late submissions are allowed once with a 24-hour extension. The document outlines topics that will be covered in the course like Java basics, objects, classes, inheritance, and GUI programming. It provides references to online textbooks and tutorials that can be used. Finally, it encourages students to practice programming to learn the language.
This document provides an overview of object-oriented programming (OOP) and Java. It defines key OOP concepts like classes, objects, methods, attributes, inheritance, encapsulation, and polymorphism. It also introduces Java, describing it as a general-purpose, object-oriented programming language that is simple, portable, reliable, secure, and multithreaded. The document notes some of Java's advantages over C++ as well as its potential disadvantage of being slower than compiled languages like C.
The document is a presentation on the Scala programming language. It introduces Scala as a scalable, statically typed language that blends object-oriented and functional programming. Some key features highlighted include running on the JVM, first-class functions, immutable data structures, pattern matching, and using an actor model for concurrency. Examples are provided to illustrate concepts like mapping, reducing, currying and actors. The presenter argues that Scala is fast, leverages Java libraries, is highly expressive yet statically typed, and facilitates concurrent programming.
Java 101 Intro to Java Programming - Exercisesagorolabs
This document outlines several hands-on exercises for learning Java fundamentals. It describes exercises to create basic Java programs, programs that take command line arguments, programs for integer operations, finding leap years, and printing powers of two. It also includes bonus exercises for random number generation, arrays of days, printing personal details, and calculating sales discounts.
This document discusses object-oriented programming (OOP) and functional programming (FP), arguing that they are not opposing paradigms and instead can complement each other. It provides history on the development of OOP and FP. Key points made include: 1) OOP principles like immutability and closure/high-order functions indicate consistency with FP; 2) Neither paradigm will solve all problems on its own and both are subject to misuse; 3) A false dichotomy exists between OOP vs FP - they can be used together; 4) Future paradigm shifts will come from better tools augmenting human intellect rather than from "normal science" improvements to languages.
This document discusses key concepts in Java including data types, variables, operators, and input/output. It covers primitive data types like integers and floating-point numbers. It also discusses initializing and naming variables, relational and boolean operators, built-in string and math methods, and using Scanner and print statements for input and output. The overall purpose is to provide an overview of fundamental Java concepts.
Java 201 Intro to Test Driven Development in Javaagorolabs
This document provides an overview and agenda for a Java 201 course on test-driven development (TDD) in Java. It introduces TDD workflows and concepts like the feedback loop and test frameworks. The agenda covers setting up an IDE, writing the first unit test, test anatomy, and concludes with a hands-on exercise to build components of a card game using TDD.
This document provides information about the CS3101-3 Programming Language - JAVA course for Fall 2004. It introduces the instructor, Ke Wang, and his contact information. It states the class will meet on Wednesdays from 11am-1pm for 6 weeks ending on October 20th. There will be 5-6 homework assignments due on Tuesdays at 11:59:59pm. Late submissions are allowed once with a 24-hour extension. The document outlines topics that will be covered in the course like Java basics, objects, classes, inheritance, and GUI programming. It provides references to online textbooks and tutorials that can be used. Finally, it encourages students to practice programming to learn the language.
This document provides information about the CS3101-3 Programming Language - JAVA course for Fall 2004. It introduces the instructor, Ke Wang, and his contact information. It states the class will meet on Wednesdays from 11am-1pm for 6 weeks ending on October 20th. There will be 5-6 homework assignments due on Tuesdays at 11:59:59pm. Late submissions are allowed once with a 24-hour extension. The document outlines topics that will be covered in the course like Java basics, objects, classes, inheritance, and GUI programming. It provides references to online textbooks and tutorials that can be used. Finally, it encourages students to practice programming to learn the language.
This document provides an overview of object-oriented programming (OOP) and Java. It defines key OOP concepts like classes, objects, methods, attributes, inheritance, encapsulation, and polymorphism. It also introduces Java, describing it as a general-purpose, object-oriented programming language that is simple, portable, reliable, secure, and multithreaded. The document notes some of Java's advantages over C++ as well as its potential disadvantage of being slower than compiled languages like C.
The document is a presentation on the Scala programming language. It introduces Scala as a scalable, statically typed language that blends object-oriented and functional programming. Some key features highlighted include running on the JVM, first-class functions, immutable data structures, pattern matching, and using an actor model for concurrency. Examples are provided to illustrate concepts like mapping, reducing, currying and actors. The presenter argues that Scala is fast, leverages Java libraries, is highly expressive yet statically typed, and facilitates concurrent programming.
Java 101 Intro to Java Programming - Exercisesagorolabs
This document outlines several hands-on exercises for learning Java fundamentals. It describes exercises to create basic Java programs, programs that take command line arguments, programs for integer operations, finding leap years, and printing powers of two. It also includes bonus exercises for random number generation, arrays of days, printing personal details, and calculating sales discounts.
Brainsmartlabs is one of the excellent online tutorials for beginners which offers the best java and core java courses online. Enroll now to learn core java programming from scratch and become an expert.
A talk presented in RubyConf India 2010 at Bangalore, India. It revisits the role of objects and classes in Ruby OOP, and encourages programmers to discover a new approach to OOP.
Object Oriented Programming in Swift Ch1 - InheritanceChihyang Li
This document discusses object-oriented programming concepts in Swift such as inheritance, encapsulation, and polymorphism. It covers inheritance relationships like "is-a" and "has-a" and how inheritance works in Swift with instance variables, methods, and constructors. The document also discusses access permissions and how private variables are inherited but not visible to subclasses.
OOPs fundamentals session for freshers in my office (Aug 5, 13)Ashoka R K T
This document provides an overview of topics that will be covered in an introduction to object-oriented programming (OOP) session. It lists key OOP concepts like classes, objects, properties, fields, methods, interfaces, constructors, destructors, access modifiers, static members, inheritance, and generics that will be explained. The document encourages attendees to access additional session materials and code samples on the speaker's website for further learning.
This document discusses object-oriented programming concepts including:
- OOP revolves around objects and classes, with classes functioning as structures and functions to define objects as instances.
- The four main OOP concepts are data abstraction, encapsulation, inheritance, and polymorphism. Data abstraction treats the class as a black box, encapsulation combines related attributes and methods together in a class, inheritance allows more generalized classes to be created from the intersection of other classes' functionality, and polymorphism allows the same name to have different functionality depending on context.
- Examples are provided of each concept to illustrate how they work in OOP.
This document discusses program development and outlines a lesson on object-oriented programming concepts. It covers the four basic activities of program development: establishing requirements, creating a design, implementing code, and testing. It then outlines topics to be covered in the lesson including method design, creating objects, loop statements, classes and objects, and more. Examples are provided of creating classes to represent dice and students. The use of for loops is demonstrated through examples printing weekdays, multiples of a number, and a triangle of asterisks.
This document provides information about a CS 213 object oriented programming course in Java. It lists the instructors, lecture times and groups, assessment model, and course outline. The outline covers an overview of Java, basic syntax including classes, objects, and methods, variables, operators, loops, strings, arrays, exceptions, inheritance, polymorphism, and more. It also includes documentation on Java identifiers, keywords, comments, modifiers, and variables.
1. The document discusses the anatomy of methods and classes in Java. It explains that a Java application consists of more than one class, with the starting class containing the main method. Other classes are used to encapsulate data and functionality.
2. It describes what a method declaration is and how method control flow works. When a method is invoked, the flow jumps to the method code and returns after completion. Methods can return values.
3. The document also covers instantiating classes to create objects. Instance methods require object creation using the new operator before being called. Instance variables store data in objects and are available throughout the class.
Java is an important skill to have as an XPages developer. This webinar will provide a foundation of the Java skills you need and explain how to best acquire them. Come see how Java is used with detailed code examples that demonstrate how to use core Java code, Java Beans, Managed Beans, and third party Java libraries in your applications. After this webinar you will know exactly how to add Java as a tool in your development toolbox.
This document discusses advanced features in JIRA and Confluence. It covers JQL (JIRA Query Language) for advanced searching in JIRA using fields, operators, values and keywords. It also discusses filters for saving queries and email reports. For Confluence, it discusses macros for expanding page capabilities and including things like attachments and code blocks. It also covers JIRA reports that can be included in Confluence pages like change logs and status reports.
Object Oriented Programming in Swift Ch0 - EncapsulationChihyang Li
This document introduces object oriented programming concepts in Swift. It discusses key OOP principles like encapsulation, inheritance and polymorphism. It also covers object oriented analysis, design and programming levels. Specific concepts explained include data abstraction, access control, class invariants, pre/postconditions and design by contract. Common programming paradigms like procedural, object oriented and spaghetti code are compared. Modularization benefits like reusability, maintainability and debugging are highlighted.
This chapter discusses software engineering principles and object-oriented programming concepts in Java. It covers the software development life cycle, algorithm analysis using Big-O notation, defining and using classes and objects in Java, UML class diagrams, constructors and destructors, and abstract data types. The chapter also provides an example programming problem on modeling a candy machine using object-oriented design principles.
JUnit 5 - from Lambda to Alpha and beyondSam Brannen
Want to know what the hype surrounding JUnit 5 is all about? Then join this talk by JUnit 5 core committer Sam Brannen to find out!
Since JUnit 4.0 was first released, a lot has happened in the world of Java. Unfortunately, JUnit 4 hasn't kept up with the times. JUnit 5 therefore aims to help shape the future of testing on the JVM, with a focus on Java 8, modularity, extensibility, and a modern programming API for authoring tests in Java.
This presentation will start off by providing attendees an overview of the inspiration for and architecture of JUnit 5, from launchers to test engines. Sam will then take the audience on an example-driven tour of the new programming model, highlighting support for dependency injection via flexible method signatures, conditional test execution, using lambda expressions and method references in assertions and assumptions, and implementing test/before/after methods via interface default methods.
To round off the discussion, Sam will present an overview of the new extension model in JUnit 5, discussing how to author and register extensions for conditional tests, method parameter resolution, lifecycle callbacks, and more.
The document provides an overview of object-oriented programming in Java. It discusses that Java was created to be portable and platform independent due to issues with C/C++. It then covers the history and evolutions of Java, the different Java editions, and defines Java as a general-purpose, object-oriented language. The document compares Java to C/C++ by outlining features removed or added in Java. It also describes characteristics of Java like being simple, robust, secure, portable, and platform independent. Finally, it discusses the Java environment, an example Hello World program, input/output in Java, and primitive data types.
Reading Notes : the practice of programmingJuggernaut Liu
This document summarizes a study group sharing on programming best practices. It discusses topics like style, design, interfaces, debugging, testing, performance, portability, and notation. The speaker, Juggernaut Liu, has 6 years of C# experience and focuses on ideas like using descriptive variable names, commenting code, designing for interfaces to hide implementations, and writing portable code to improve maintainability. Examples are provided throughout to illustrate techniques for writing clean, efficient code.
Priyanka Pradhan presents an introduction to the Java programming language. Java is an object-oriented language that is platform independent. The document discusses what Java is, the tools needed like the JDK and text editor, how to set the path and compile/run a "Hello World" program. It also covers Java concepts like classes, objects, inheritance, interfaces, and the basics of creating objects and using constructors.
The document discusses the future of development tools across various categories such as programming languages, IDEs, source control, testing, and collaboration tools. It envisions tools that better understand code semantics, support modern paradigms, provide recommendations, visualize data and threads, integrate testing into documentation, and focus on semantic differences in code reviews. Overall, the document presents an optimistic vision of tools that make development more productive by understanding user intent and automating more tasks.
This document provides an overview of topics that will be covered in a course on querying Microsoft SQL Server with Transact SQL (T-SQL). The course will consist of 14 modules covering topics such as the SELECT statement, filtering and sorting data, joins, stored procedures, triggers, and performance tuning. Each module is divided into lessons that provide more specific explanations and examples related to the module topic. The course is designed for an audience with basic to intermediate knowledge of MS SQL Server who are interested in taking the Microsoft certification exam 70-461.
The big language features for Java SE 8 are lambda expressions (a.k.a. closures) and default methods (a.k.a. virtual extension methods). Adding closures to the Java language opens up a host of new expressive opportunities for applications and libraries, but how are they implemented? You might assume that lambda expressions are simply a compact syntax for inner classes, but, in fact, the implementation of lambda expressions is substantially different and builds on the invokedynamic feature added in Java SE 7.
The document provides an introduction to the Java programming language. It discusses object-oriented programming concepts like classes, objects, encapsulation, inheritance and polymorphism. It then describes the Java programming language, how Java programs are structured using classes and methods, and how comments are used. It also discusses program development processes like compiling, interpreting and debugging programs as well as object-oriented problem solving and design.
The document provides an introduction to programming with core Java. It discusses Java terminology like the Java Virtual Machine, Java Development Kit, and Java Runtime Environment. It also covers Java variables and data types, operators, strings, arrays, classes and objects, constructors, polymorphism, keywords like static, this, abstract, super, and final. It lists features of Java 8 and some common applications developed using Java like Spotify, Twitter, and Signal. The conclusion reflects on the learning experience of working with core Java concepts.
Brainsmartlabs is one of the excellent online tutorials for beginners which offers the best java and core java courses online. Enroll now to learn core java programming from scratch and become an expert.
A talk presented in RubyConf India 2010 at Bangalore, India. It revisits the role of objects and classes in Ruby OOP, and encourages programmers to discover a new approach to OOP.
Object Oriented Programming in Swift Ch1 - InheritanceChihyang Li
This document discusses object-oriented programming concepts in Swift such as inheritance, encapsulation, and polymorphism. It covers inheritance relationships like "is-a" and "has-a" and how inheritance works in Swift with instance variables, methods, and constructors. The document also discusses access permissions and how private variables are inherited but not visible to subclasses.
OOPs fundamentals session for freshers in my office (Aug 5, 13)Ashoka R K T
This document provides an overview of topics that will be covered in an introduction to object-oriented programming (OOP) session. It lists key OOP concepts like classes, objects, properties, fields, methods, interfaces, constructors, destructors, access modifiers, static members, inheritance, and generics that will be explained. The document encourages attendees to access additional session materials and code samples on the speaker's website for further learning.
This document discusses object-oriented programming concepts including:
- OOP revolves around objects and classes, with classes functioning as structures and functions to define objects as instances.
- The four main OOP concepts are data abstraction, encapsulation, inheritance, and polymorphism. Data abstraction treats the class as a black box, encapsulation combines related attributes and methods together in a class, inheritance allows more generalized classes to be created from the intersection of other classes' functionality, and polymorphism allows the same name to have different functionality depending on context.
- Examples are provided of each concept to illustrate how they work in OOP.
This document discusses program development and outlines a lesson on object-oriented programming concepts. It covers the four basic activities of program development: establishing requirements, creating a design, implementing code, and testing. It then outlines topics to be covered in the lesson including method design, creating objects, loop statements, classes and objects, and more. Examples are provided of creating classes to represent dice and students. The use of for loops is demonstrated through examples printing weekdays, multiples of a number, and a triangle of asterisks.
This document provides information about a CS 213 object oriented programming course in Java. It lists the instructors, lecture times and groups, assessment model, and course outline. The outline covers an overview of Java, basic syntax including classes, objects, and methods, variables, operators, loops, strings, arrays, exceptions, inheritance, polymorphism, and more. It also includes documentation on Java identifiers, keywords, comments, modifiers, and variables.
1. The document discusses the anatomy of methods and classes in Java. It explains that a Java application consists of more than one class, with the starting class containing the main method. Other classes are used to encapsulate data and functionality.
2. It describes what a method declaration is and how method control flow works. When a method is invoked, the flow jumps to the method code and returns after completion. Methods can return values.
3. The document also covers instantiating classes to create objects. Instance methods require object creation using the new operator before being called. Instance variables store data in objects and are available throughout the class.
Java is an important skill to have as an XPages developer. This webinar will provide a foundation of the Java skills you need and explain how to best acquire them. Come see how Java is used with detailed code examples that demonstrate how to use core Java code, Java Beans, Managed Beans, and third party Java libraries in your applications. After this webinar you will know exactly how to add Java as a tool in your development toolbox.
This document discusses advanced features in JIRA and Confluence. It covers JQL (JIRA Query Language) for advanced searching in JIRA using fields, operators, values and keywords. It also discusses filters for saving queries and email reports. For Confluence, it discusses macros for expanding page capabilities and including things like attachments and code blocks. It also covers JIRA reports that can be included in Confluence pages like change logs and status reports.
Object Oriented Programming in Swift Ch0 - EncapsulationChihyang Li
This document introduces object oriented programming concepts in Swift. It discusses key OOP principles like encapsulation, inheritance and polymorphism. It also covers object oriented analysis, design and programming levels. Specific concepts explained include data abstraction, access control, class invariants, pre/postconditions and design by contract. Common programming paradigms like procedural, object oriented and spaghetti code are compared. Modularization benefits like reusability, maintainability and debugging are highlighted.
This chapter discusses software engineering principles and object-oriented programming concepts in Java. It covers the software development life cycle, algorithm analysis using Big-O notation, defining and using classes and objects in Java, UML class diagrams, constructors and destructors, and abstract data types. The chapter also provides an example programming problem on modeling a candy machine using object-oriented design principles.
JUnit 5 - from Lambda to Alpha and beyondSam Brannen
Want to know what the hype surrounding JUnit 5 is all about? Then join this talk by JUnit 5 core committer Sam Brannen to find out!
Since JUnit 4.0 was first released, a lot has happened in the world of Java. Unfortunately, JUnit 4 hasn't kept up with the times. JUnit 5 therefore aims to help shape the future of testing on the JVM, with a focus on Java 8, modularity, extensibility, and a modern programming API for authoring tests in Java.
This presentation will start off by providing attendees an overview of the inspiration for and architecture of JUnit 5, from launchers to test engines. Sam will then take the audience on an example-driven tour of the new programming model, highlighting support for dependency injection via flexible method signatures, conditional test execution, using lambda expressions and method references in assertions and assumptions, and implementing test/before/after methods via interface default methods.
To round off the discussion, Sam will present an overview of the new extension model in JUnit 5, discussing how to author and register extensions for conditional tests, method parameter resolution, lifecycle callbacks, and more.
The document provides an overview of object-oriented programming in Java. It discusses that Java was created to be portable and platform independent due to issues with C/C++. It then covers the history and evolutions of Java, the different Java editions, and defines Java as a general-purpose, object-oriented language. The document compares Java to C/C++ by outlining features removed or added in Java. It also describes characteristics of Java like being simple, robust, secure, portable, and platform independent. Finally, it discusses the Java environment, an example Hello World program, input/output in Java, and primitive data types.
Reading Notes : the practice of programmingJuggernaut Liu
This document summarizes a study group sharing on programming best practices. It discusses topics like style, design, interfaces, debugging, testing, performance, portability, and notation. The speaker, Juggernaut Liu, has 6 years of C# experience and focuses on ideas like using descriptive variable names, commenting code, designing for interfaces to hide implementations, and writing portable code to improve maintainability. Examples are provided throughout to illustrate techniques for writing clean, efficient code.
Priyanka Pradhan presents an introduction to the Java programming language. Java is an object-oriented language that is platform independent. The document discusses what Java is, the tools needed like the JDK and text editor, how to set the path and compile/run a "Hello World" program. It also covers Java concepts like classes, objects, inheritance, interfaces, and the basics of creating objects and using constructors.
The document discusses the future of development tools across various categories such as programming languages, IDEs, source control, testing, and collaboration tools. It envisions tools that better understand code semantics, support modern paradigms, provide recommendations, visualize data and threads, integrate testing into documentation, and focus on semantic differences in code reviews. Overall, the document presents an optimistic vision of tools that make development more productive by understanding user intent and automating more tasks.
This document provides an overview of topics that will be covered in a course on querying Microsoft SQL Server with Transact SQL (T-SQL). The course will consist of 14 modules covering topics such as the SELECT statement, filtering and sorting data, joins, stored procedures, triggers, and performance tuning. Each module is divided into lessons that provide more specific explanations and examples related to the module topic. The course is designed for an audience with basic to intermediate knowledge of MS SQL Server who are interested in taking the Microsoft certification exam 70-461.
The big language features for Java SE 8 are lambda expressions (a.k.a. closures) and default methods (a.k.a. virtual extension methods). Adding closures to the Java language opens up a host of new expressive opportunities for applications and libraries, but how are they implemented? You might assume that lambda expressions are simply a compact syntax for inner classes, but, in fact, the implementation of lambda expressions is substantially different and builds on the invokedynamic feature added in Java SE 7.
The document provides an introduction to the Java programming language. It discusses object-oriented programming concepts like classes, objects, encapsulation, inheritance and polymorphism. It then describes the Java programming language, how Java programs are structured using classes and methods, and how comments are used. It also discusses program development processes like compiling, interpreting and debugging programs as well as object-oriented problem solving and design.
The document provides an introduction to programming with core Java. It discusses Java terminology like the Java Virtual Machine, Java Development Kit, and Java Runtime Environment. It also covers Java variables and data types, operators, strings, arrays, classes and objects, constructors, polymorphism, keywords like static, this, abstract, super, and final. It lists features of Java 8 and some common applications developed using Java like Spotify, Twitter, and Signal. The conclusion reflects on the learning experience of working with core Java concepts.
This document summarizes key principles for writing clean code as outlined in the book "Clean Code" by Robert C. Martin. It discusses ideas like writing code that is easy to read and understand through use of meaningful names, small functions that do one thing well, and avoiding duplication. It also covers principles for object-oriented design like encapsulation, organization for change, and separation of concerns. Testing philosophies like test-driven development and ensuring tests are fast, independent, repeatable, self-validating, and timely are also emphasized. The overall message is that writing clean code requires attention to structure, naming, formatting and testing to produce software that is simple, well-organized and a pleasure to maintain.
Rootcon X - Reverse Engineering Swift Applicationseightbit
The document discusses challenges and techniques for reverse engineering Swift apps. It notes that class dump utilities do not work on Swift binaries due to name mangling. However, the symbol table, nm tool, and swift-demangle utility can be used to retrieve function signatures. A hacked script approximates class dump output. While stripping symbols makes analysis harder, Objective-C compatibility eases the process. Other tools like classdump-dyld and disassemblers also help. Function hooking is possible but setter methods require calling from top-level code due to inlining.
This document discusses evaluating user experience. It explains that evaluation is important to understand the value of a product from the user's perspective, identify design issues, and better understand the user experience. Evaluation can happen at different stages of development with different types of participants and study methods. It is important to evaluate both before and during usage to understand snapshots of interaction as well as long-term experience. The document covers when, where, who, what, and how to evaluate user experience.
This document discusses user experience evaluation. It explains that evaluation is needed to understand user needs, identify design issues, and improve the user experience. Different evaluation methods are appropriate at different stages of development, including early concept testing, low-fidelity prototyping, and high-fidelity testing. A variety of methods can provide both qualitative and quantitative data, including usability testing, surveys, interviews, and analytical metrics. Properly selecting evaluation techniques and planning the procedure is important to obtain high-quality feedback for optimizing the user experience.
This document discusses Edward De Bono's 6 Thinking Hats method for group discussions. It provides examples of how each "hat" or perspective could be applied when considering opening a new restaurant: the White Hat focuses on objective facts, the Yellow Hat on optimism, the Green Hat on creative ideas, the Black Hat on criticism, the Red Hat on emotions, and the Blue Hat on process and agenda. The document encourages using a maximum of 2 hats per person during a discussion and avoiding overuse of the Black Hat. It also provides guidance on using this technique for a workshop on evaluating concepts.
This document provides an outline and examples for creating objects in Java. It discusses creating object instances from classes, using constructors to initialize objects, and defining instance variables and methods. The document uses a bank account example to demonstrate how to:
- Define an Account class with fields for account number, balance, and name
- Create Account objects by calling the constructor
- Add methods like deposit(), withdraw(), and transfer() that update the object's balance field
- Create multiple Account objects to represent different bank accounts
- Use input methods and output statements when calling object methods
This document discusses comparing data types in Java, including:
1) Floating point values should not be compared directly for equality due to precision issues, instead compare that the absolute difference is less than a small tolerance value.
2) Strings and characters can be compared lexicographically based on their ordering in Unicode character sets, or using the equals() and compareTo() methods.
3) Shorter strings come before longer strings with the same prefix, and uppercase letters come before lowercase letters.
This document discusses responsive web design. It defines responsive design as designs that can adjust to different screen sizes and devices. It distinguishes between fixed, fluid, and responsive layout types. Fixed layouts have a set pixel width and do not adjust to different screens. Fluid layouts use percentages for widths to adjust to the browser window size. Responsive designs use both fixed and fluid elements along with media queries to dynamically adjust the layout. The document provides guidelines for implementing each type of layout and discusses using grids to create flexible and adaptive designs.
JavaScript is an object-oriented scripting language used to make webpages interactive. It can access and modify the content, structure, and style of an HTML document. JavaScript code can be embedded directly in HTML, or linked from external .js files. The Document Object Model (DOM) represents an HTML document as nodes that JavaScript can manipulate by accessing properties and methods. Functions are blocks of JavaScript code that perform tasks when called.
The document provides an overview of Lesson 3 which will address random and math classes, conditional statements including if, if-else, and switch statements. It discusses variables, data types, operators, and methods from classes like Random, Math, and Scanner. The document also covers formatting output, indentation, block statements, nested if statements, and the logic of if and if-else statements.
The document provides an overview of Cascading Style Sheets (CSS). CSS allows you to create rules that control the presentation of HTML elements. CSS syntax includes selectors that point to HTML elements and declaration blocks that contain properties and values to style those elements. There are different ways to insert CSS into HTML documents, including external style sheets, internal style sheets, and inline styles. CSS uses the box model to style elements, which includes properties for dimensions, padding, borders, and margins.
This document provides an overview of HTML (Hypertext Markup Language) including basic concepts, elements, and structure. It discusses HTML as a markup language interpreted by web browsers to define the structure of web pages and present content. The key elements covered include text formatting, lists, hyperlinks, images, tables, and forms. It also discusses HTML5 additions and differences between HTML and XHTML.
The document discusses building interactive systems using Xcode and Swift. It introduces key programming concepts like object-oriented programming, variables and types, functions, conditionals, and Xcode components like the interface builder, simulator, and assistant editor. It explains how to create a basic Xcode project with labels, connect the labels to code using outlets, and set label text in the viewDidLoad function. The document provides an overview of building blocks for programming interactive apps in Xcode.
1) O documento discute como cultivar interações com confiança em sistemas interativos, analisando o conceito de confiança e propondo um modelo sociotécnico de confiança.
2) O modelo identifica indicadores como expectativas, percepção racional e emocional que influenciam a predisposição para confiar e cooperar.
3) Também aborda desafios no desenvolvimento de software interativo para cultivar confiança, propondo abordagens interdisciplinares que considerem tanto aspectos técnicos como sociais.
Trust from a Human Computer Interaction perspective Sónia
Persuasion, Emotion and Trust (PET) is a design methodology that enables design more technologically engaging products. PET uses three main design values,
Persuasion – Triggers actions;
Emotion - Generate an emotional response; and
Trust – Leveraging credibility and cooperation.
This design methodology main aim is to incentives people to become more engaged and connected with a certain product or ecosystems.
Our main aim is to stress the role of trust on persuasive design.
In general, we will focus on the following aspects:
1) First we will start by creating a clear understanding on the challenges of transferring Human Computer Trust (HCT) values to influence user engagement and fostering trust-enabling interactions.
2) Then, in the second part we will learn to analyze interaction design sequences from digital products that changes human trust behaviors. As well as explore different methodologies for testing.
3) We will end by presenting and reflection on the result achieved.
For more information read my human computer trust blog https://humancomputertrust.wordpress.com
This document provides an overview and outline of a lesson on variables and types in Java. The key points covered include:
- Variables are names for locations in memory that hold values. Primitive data types include numerical, character, and boolean values. Complex objects are instances of classes.
- Variables are declared with a data type, name, and optional initial value. Primitive values can be output and converted between types through casting or automatic promotion.
- Expressions combine operators and operands to compute results. Operators have precedence that determines the order of evaluation. Assignment operators store the result of an expression into a variable.
- The lesson covers primitive data types, variables, expressions, output, conversion, and creating objects
The goal of the course is to bring particular computer and programming skills to the level required by the studies. To create opportunities for the development of Java-based applications. To introduce programming basis and object-oriented principles using Java programming language.
This course is about evaluating the User Experience. It main goal is to highlight the experiential, affective, meaningful and valuable aspects of human-computer interaction as a complement to pragmatic attributes such as utility, ease of use and efficiency of the system.
This document discusses key concepts from the Diffusion of Innovation theory, including:
- There are different types of adopters (innovators, early adopters, early majority, late majority, laggards) who adopt innovations at different rates.
- Factors like relative advantage, compatibility, complexity, trialability, and observability influence how quickly an innovation is adopted.
- The innovation adoption process involves knowledge, persuasion, decision, implementation, and confirmation stages.
- Communication channels, time, and the social system all impact the spread of new ideas through a population.
This document presents an overview of a lesson on the technology acceptance model (TAM). The objective is to introduce key concepts of TAM, have student groups design concept maps of TAM, and summarize. TAM is presented as attempting to understand technology acceptance in organizations. It includes four versions and draws from other models like the theory of reasoned action. The core idea is that two key factors, perceived usefulness and perceived ease of use, influence users' decisions about adopting technologies.
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...EduSkills OECD
Andreas Schleicher, Director of Education and Skills at the OECD presents at the launch of PISA 2022 Volume III - Creative Minds, Creative Schools on 18 June 2024.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.pptHenry Hollis
The History of NZ 1870-1900.
Making of a Nation.
From the NZ Wars to Liberals,
Richard Seddon, George Grey,
Social Laboratory, New Zealand,
Confiscations, Kotahitanga, Kingitanga, Parliament, Suffrage, Repudiation, Economic Change, Agriculture, Gold Mining, Timber, Flax, Sheep, Dairying,
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
3. Java programming language
• Dynamic Web applications
– Servlets, JSP
• Native applications
– Android and blackberry
• Java is not
– Javascript
– Native IOS
@ Sonia Sousa 32015
4. Java is…
• A complied language
– Has restrictive rules but is not difficult
• Similar languages
– C, C + +, c#, Javascript, PHP
• Although…
– You need to understand
• Rules – basic programming vocabulary
• The principles of object-oriented language
@ Sonia Sousa 42015
5. First steps on Java
• Basic Structure
– Object-oriented concepts
• Understand programming concepts like
– What is a statement
– What is a variable
– What is a function
– What is a condition
@ Sonia Sousa 52015
6. Development Environments
• Applications that support Java development:
– Eclipse SE Development Kit (JDK)
• Runtime, compiler and other tools
– NetBeans
– BlueJ
• Though the details of these environments
differ,
– the basic compilation and execution process is
essentially the same
6@ Sonia Sousa2015
7. Java Translation
• Java is an
– interpreted language
– Is portable
• The Java compiler translates into
– Java bytecode
• We will use a Java virtual machine
– Eclipse
7
Java source
code Java
bytecode
Java
compiler
@ Sonia Sousa2015
12. Object-oriented concepts
• What is an Object?
– An object-oriented -> aims to -> model real-world
objects
• examples of real-world objects: dog, desk, computer,
bicycle
– Characteristics of real-world object
• have state and behaviour
– State = name, color, breed, hungry
– Behaviour = barking, fetching, wagging tail
@ Sonia Sousa 122015
13. A bicycle modeled as a object
State
Variables (fields)
behaviours
functions (methods)
speed
Pedal cadence
gear
that allow to change the state
Function to change the gear (bicycle has 3 gears)
1. Reject values < 1
or > than 3
2. Verify what is the
current gear
3. Change the gear
@ Sonia Sousa 132015
14. What we know
• What are variables -> state
– state of an object in real-world
• What are functions (methods) -> behaviours
– Behaviour of that object in real world
• But…
– Take the bicycle example
• 1 model/brand can have similar types of bicycle
• How to represent in object-oriented terms?
– Using classes
@ Sonia Sousa 142015
15. What Is a Class?
• A Class represent 1 object (bicycle)
– or 1 or more objects (bicycles)
• Objects with similar characteristics of Object bicycle:
– Same model, same company, same set of blueprints, same
components
Instance
Of
class of objects known as bicycles
@ Sonia Sousa 152015
object
16. What Is a Inheritance?
• Represent 1 object (bicycle)
– Which shares
• general and specific characteristics
– Object bicycle:
• Shared characteristics
– class bicycles
• Specific characteristics
– superclass – MountainBike and TandemBike
– How do you represent as object term?
inherit
characteristics
class of objects known as bicycles
Superclass of objects known as specific characteristic
17. A class in java
• Java includes a library of classes
• Java program is made of an aggregation of
– 1 or + classes - package
– Most common used is
• Java.lang (Packages)
• Search on google for java 6 api docs
• We are going to use
– The System class -> belongs to Java.lang
– The out variable -> PrintStream class -> System class
– Print method - println
@ Sonia Sousa 172015
19. Java Development kit
• Includes
– Compiler - command javac
– Runtime - java
– Package - jar
– Documentation builder - javadoc
2015 @ Sonia Sousa 19
20. Java Application
• Consists
– Of many classes (.java) – command line runtime
– The packager (jar) – aggregates the many
classes
– The javadoc – the documentation builder
– The command line compiler - javac
2015 @ Sonia Sousa 20
21. First step
• Set up the workspace
• Create 1 application
– Create a project
– SRC AND BIN folders
• Every Java App Is Build Inside A Class
• Create a new class
– System.out.println(“Hello World”)
– Compile or run java application
@ Sonia Sousa 212015
23. public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello world" );
}
}
Java Program Structure
23
Hello World!
Class declaration
File name: HelloWorld.java Java is Case sensitive Language
=
Main method
Executable code
Compile results
File sources
HelloWorld.class
HelloWorld.java
Bytecode file
@ Sonia Sousa2015
24. Java syntax
The method can
be called
anywhere
A method contains
1 program statements
public class MyProgram
{
}
// comments about the class
public static void main (String[] args)
{
}
// Main method declaration
method header
method body
Don’t have to
create a
instance of a
class
Do not return
anything from
the class
@ Sonia Sousa 242015
New public
class called
MyProgram
class
body
25. The println Method
• The println method prints a character
string
• The System.out object represents a
destination (the monitor screen) to which
we can send output
25
System.out.println ("Whatever you are, be a good one.");
information provided
(arguments)
@ Sonia Sousa2015
27. Errors
• A program can have three types of errors
1) Compile-time errors
• The compiler will find syntax errors and other basic
problems
• If compile-time errors exist, an executable version of the
program is not created
2) Run-time errors
• A problem can occur during program execution, such as
– trying to divide by zero, which causes a program to terminate
abnormally
3) Logical errors
• A program may run, but produce incorrect results, perhaps
using an incorrect formula
2015 @ Sonia Sousa 27
29. Comments
• Comments should always be included
– To explain the purpose of the program; and
– Describe processing steps.
• They do not affect how a program works
• Java comments can take three forms:
29
// this comment runs to the end of the line
/* this comment runs to the terminating
symbol, even across line breaks */
/** this is a javadoc comment */
@ Sonia Sousa2015
30. Java is Case sensitive
• Java is case sensitive:
– Total, total, and TOTAL are different
identifiers
• Rules on how to…
– use different case styles for different types of
identifiers
• Class names start with upper case – MyProgram
• Variables with lower case - value
@ Sonia Sousa 302015
31. Reserved words
• Identifiers with a predefined meaning in the
language
– println
• A reserved word cannot be used in any
other way
@ Sonia Sousa 312015
32. Reserved Words
• The Java reserved words:
32
abstract
assert
boolean
break
byte
case
catch
char
class
const
continue
default
do
double
else
enum
extends
false
final
finally
float
for
goto
if
implements
import
instanceof
int
interface
long
native
new
null
package
private
protected
public
return
short
static
strictfp
super
switch
synchronized
this
throw
throws
transient
true
try
void
volatile
while
@ Sonia Sousa2015
34. Quick Check
Which of the following are valid Java identifiers?
grade
quizGrade
NetworkConnection
frame2
3rdTestScore
MAXIMUM
MIN_CAPACITY
student#
Shelves1&2
34@ Sonia Sousa2015
35. Quick Check
Which of the following are valid Java identifiers?
grade
quizGrade
NetworkConnection
frame2
3rdTestScore
MAXIMUM
MIN_CAPACITY
student#
Shelves1&2
Valid
Valid
Valid
Valid
Invalid – cannot begin with a digit
Valid
Valid
Invalid – cannot contain the '#' character
Invalid – cannot contain the '&' character
35@ Sonia Sousa2015
37. Character Strings
• A string literal is represented by putting
double quotes around the text
• Examples:
"This is a string literal."
"123 Main Street"
"X”
37@ Sonia Sousa2015
39. //********************************************************************
// Countdown.java Author: Lewis/Loftus
//
// Demonstrates the difference between print and println.
//********************************************************************
public class Countdown
{
//-----------------------------------------------------------------
// Prints two lines of output representing a rocket countdown.
//-----------------------------------------------------------------
public static void main (String[] args)
{
System.out.print ("Three... ");
System.out.print ("Two... ");
System.out.print ("One... ");
System.out.print ("Zero... ");
System.out.println ("Liftoff!"); // appears on first output line
System.out.println ("Houston, we have a problem.");
}
}
39@ Sonia Sousa2015
40. //********************************************************************
// Countdown.java Author: Lewis/Loftus
//
// Demonstrates the difference between print and println.
//********************************************************************
public class Countdown
{
//-----------------------------------------------------------------
// Prints two lines of output representing a rocket countdown.
//-----------------------------------------------------------------
public static void main (String[] args)
{
System.out.print ("Three... ");
System.out.print ("Two... ");
System.out.print ("One... ");
System.out.print ("Zero... ");
System.out.println ("Liftoff!"); // appears on first output line
System.out.println ("Houston, we have a problem.");
}
}
Output
Three... Two... One... Zero... Liftoff!
Houston, we have a problem.
40@ Sonia Sousa2015
41. String Concatenation
• The string concatenation operator (+) is
used to append one string to the end of
another
"Peanut butter " + "and jelly"
• It can also be used to append a number to
a string
• A string literal cannot be broken across
two lines in a program
41@ Sonia Sousa2015
43. //********************************************************************
// Facts.java Author: Lewis/Loftus
//
// Demonstrates the use of the string concatenation operator and the
// automatic conversion of an integer to a string.
//********************************************************************
public class Facts
{
//-----------------------------------------------------------------
// Prints various facts.
//-----------------------------------------------------------------
public static void main (String[] args)
{
// Strings can be concatenated into one long string
System.out.println ("We present the following facts for your "
+ "extracurricular edification:");
System.out.println ();
// A string can contain numeric digits
System.out.println ("Letters in the Hawaiian alphabet: 12");
continue
43@ Sonia Sousa2015
44. continue
// A numeric value can be concatenated to a string
System.out.println ("Dialing code for Antarctica: " + 672);
System.out.println ("Year in which Leonardo da Vinci invented "
+ "the parachute: " + 1515);
System.out.println ("Speed of ketchup: " + 40 + " km per year");
}
}
44@ Sonia Sousa2015
45. continue
// A numeric value can be concatenated to a string
System.out.println ("Dialing code for Antarctica: " + 672);
System.out.println ("Year in which Leonardo da Vinci invented "
+ "the parachute: " + 1515);
System.out.println ("Speed of ketchup: " + 40 + " km per year");
}
}
Output
We present the following facts for your extracurricular edification:
Letters in the Hawaiian alphabet: 12
Dialing code for Antarctica: 672
Year in which Leonardo da Vinci invented the parachute: 1515
Speed of ketchup: 40 km per year
45@ Sonia Sousa2015
46. String Concatenation
• The + operator is also used for arithmetic addition
– The function that it performs depends on the type of the
information on which it operates
• If both operands are strings, or if one is a string and one is a
number,
– it performs string concatenation
• If both operands are numeric, it adds them
• The + operator is evaluated left to right, but parentheses
can be used to force the order
46@ Sonia Sousa2015
48. //********************************************************************
// Addition.java Author: Lewis/Loftus
//
// Demonstrates the difference between the addition and string
// concatenation operators.
//********************************************************************
public class Addition
{
//-----------------------------------------------------------------
// Concatenates and adds two numbers and prints the results.
//-----------------------------------------------------------------
public static void main (String[] args)
{
System.out.println ("24 and 45 concatenated: " + 24 + 45);
System.out.println ("24 and 45 added: " + (24 + 45));
}
}
48@ Sonia Sousa2015
49. //********************************************************************
// Addition.java Author: Lewis/Loftus
//
// Demonstrates the difference between the addition and string
// concatenation operators.
//********************************************************************
public class Addition
{
//-----------------------------------------------------------------
// Concatenates and adds two numbers and prints the results.
//-----------------------------------------------------------------
public static void main (String[] args)
{
System.out.println ("24 and 45 concatenated: " + 24 + 45);
System.out.println ("24 and 45 added: " + (24 + 45));
}
}
Output
24 and 45 concatenated: 2445
24 and 45 added: 69
49@ Sonia Sousa2015
54. Quick Check
• What output is produced by the following?
54
System.out.println ("I said "Hello" to you.");
@ Sonia Sousa2015
55. Quick Check
An escape sequence begins with a backslash
character ()
System.out.println ("I said "Hello" to you.");
55
• The compiler becomes confuse
– would interpret the second quote as the end
of the string
System.out.println ("I said "Hello" to you.");
@ Sonia Sousa2015
57. Escape Sequences
• Some Java escape sequences:
57
Escape Sequence
b
t
n
r
"
'
Meaning
backspace
tab
newline
carriage return
double quote
single quote
backslash
@ Sonia Sousa2015
58. //********************************************************************
// Roses.java Author: Lewis/Loftus
//
// Demonstrates the use of escape sequences.
//********************************************************************
public class Roses
{
//-----------------------------------------------------------------
// Prints a poem (of sorts) on multiple lines.
//-----------------------------------------------------------------
public static void main (String[] args)
{
System.out.println ("Roses are red,” + “Violets are blue," +
"Sugar is sweet,ntBut I have "commitment issues",nt" +
"So I'd rather just be friendsntAt this point in our " +
"relationship.");
}
}
58@ Sonia Sousa2015
59. //********************************************************************
// Roses.java Author: Lewis/Loftus
//
// Demonstrates the use of escape sequences.
//********************************************************************
public class Roses
{
//-----------------------------------------------------------------
// Prints a poem (of sorts) on multiple lines.
//-----------------------------------------------------------------
public static void main (String[] args)
{
System.out.println ("Roses are red,ntViolets are blue,n" +
"Sugar is sweet,ntBut I have "commitment issues",nt" +
"So I'd rather just be friendsntAt this point in our " +
"relationship.");
}
}
Output
Roses are red,
Violets are blue,
Sugar is sweet,
But I have "commitment issues",
So I'd rather just be friends
At this point in our relationship.
59@ Sonia Sousa2015
61. Quick Check
• Write a single println statement that
produces the following output:
61
"Thank you all for coming to my home
tonight," he said mysteriously.
@ Sonia Sousa2015
62. • Write a single println statement that
produces the following output:
Quick Check
"Thank you all for coming to my home
tonight," he said mysteriously.
System.out.println (""Thank you all for " +
"coming to my homentonight," he said " +
"mysteriously.");
62@ Sonia Sousa2015
65. Variables
• A variable is a name for a
– location in memory that holds a value
• When you declare a variable (variable declaration)
– you need to specify
65
int total;
int count, temp, result;
Multiple variables can be created in one declaration
data type variable name
@ Sonia Sousa2015
66. Variable Initialization
• You can add a initial value to your variable
66
int sum = 0;
int base = 32, max = 149;
data type variable name variable value = 0
@ Sonia Sousa2015
68. //********************************************************************
// PianoKeys.java Author: Lewis/Loftus
//
// Demonstrates the declaration, initialization, and use of an
// integer variable.
//********************************************************************
public class PianoKeys
{
//-----------------------------------------------------------------
// Prints the number of keys on a piano.
//-----------------------------------------------------------------
public static void main (String[] args)
{
int keys = 88;
System.out.println ("A piano has " + keys + " keys.");
}
}
68@ Sonia Sousa2015
69. //********************************************************************
// PianoKeys.java Author: Lewis/Loftus
//
// Demonstrates the declaration, initialization, and use of an
// integer variable.
//********************************************************************
public class PianoKeys
{
//-----------------------------------------------------------------
// Prints the number of keys on a piano.
//-----------------------------------------------------------------
public static void main (String[] args)
{
int keys = 88;
System.out.println ("A piano has " + keys + " keys.");
}
}
Output
A piano has 88 keys.
69@ Sonia Sousa2015
70. Assignment
• An assignment statement
– Changes the value of a variable
• What happens?
• The value that was in total is overwritten
• You need to assign a value to a variable = variable's declared type
• Int , byte, short, long, float, double, boolean, char
• See more about primitive Data types
70
total = 55;
Assignment operator
@ Sonia Sousa2015
72. //********************************************************************
// Geometry.java Author: Lewis/Loftus
//
// Demonstrates the use of an assignment statement to change the
// value stored in a variable.
//********************************************************************
public class Geometry
{
//-----------------------------------------------------------------
// Prints the number of sides of several geometric shapes.
//-----------------------------------------------------------------
public static void main (String[] args)
{
int sides = 7; // declaration with initialization
System.out.println ("A heptagon has " + sides + " sides.");
sides = 10; // assignment statement
System.out.println ("A decagon has " + sides + " sides.");
sides = 12;
System.out.println ("A dodecagon has " + sides + " sides.");
}
}
72@ Sonia Sousa2015
73. //********************************************************************
// Geometry.java Author: Lewis/Loftus
//
// Demonstrates the use of an assignment statement to change the
// value stored in a variable.
//********************************************************************
public class Geometry
{
//-----------------------------------------------------------------
// Prints the number of sides of several geometric shapes.
//-----------------------------------------------------------------
public static void main (String[] args)
{
int sides = 7; // declaration with initialization
System.out.println ("A heptagon has " + sides + " sides.");
sides = 10; // assignment statement
System.out.println ("A decagon has " + sides + " sides.");
sides = 12;
System.out.println ("A dodecagon has " + sides + " sides.");
}
}
Output
A heptagon has 7 sides.
A decagon has 10 sides.
a dodecagon has 12 sides.
73@ Sonia Sousa2015
74. Constants
• A constant is an identifier
– that is similar to a variable except that it holds the
same value during its entire existence
• As the name implies, it is constant, not variable
• The compiler will issue an error if you try to
change the value of a constant
• In Java, we use the final modifier to declare a
constant
final int MIN_HEIGHT = 69;
74@ Sonia Sousa2015
75. Constants
• Constants are useful for three important reasons
1) First, they give meaning to otherwise unclear literal
values
• Example: MIN_HEIGHT means more than the literal 69
2) Second, they facilitate program maintenance
• If a constant is used in multiple places, its value need only be
set in one place
3) Third, they formally establish that a value should not
change,
• Avoiding inadvertent errors by other programmers
2015 @ Sonia Sousa 75
77. Primitive Data
• There are eight primitive data types in Java
• Four of them represent integers:
– byte, short, int, long
• Two of them represent floating point numbers:
– float, double
• One of them represents characters:
– char
• And one of them represents boolean values:
– boolean
2015 @ Sonia Sousa 77
78. Most common Types
• int
– integer (most common. no decimal)
• long
– holds a really big integer
• float
– accurate up to 7 decimal places
• double
– accurate up to 15 decimal places I do believe (at work and don't have a book)
• boolean
– false or true (also 1 = true, 0 = false)
• string
– anything from numbers to letters to whole sentences. It will take the input
literately.
• char
– character, such as f or 6 or
2015 @ Sonia Sousa 78
79. Numeric Primitive Data
• The difference between the numeric
primitive types is their size and the values
they can store:
2015 @ Sonia Sousa 79
Type
byte
short
int
long
float
double
Storage
8 bits
16 bits
32 bits
64 bits
32 bits
64 bits
Min Value
-128
-32,768
-2,147,483,648
< -9 x 1018
- 3.4 x 1038 3.4 x 1038
- 1.7 x 10308 1.7 x 10308
Max Value
127
32,767
2,147,483,647
> 9 x 1018
80. Characters
• A char variable stores a single character
• Character literals are delimited by single quotes:
'a' 'X' '7' '$' ',' 'n'
• Example declarations:
char topGrade = 'A';
char terminator = ';', separator = ' ';
• Note the difference between
– a primitive character variable, which holds only one
character, and
– a String object, which can hold multiple characters
2015 @ Sonia Sousa 80
81. Character Sets
• A character set is an ordered list of characters,
with each character corresponding to a unique
number
• A char variable in Java can store any character
from the Unicode character set
• The Unicode character set uses sixteen bits per
character, allowing for 65,536 unique characters
• It is an international character set, containing
symbols and characters from many world
languages
2015 @ Sonia Sousa 81
82. Characters
• The ASCII character set is older and smaller
than Unicode, but is still quite popular
• The ASCII characters are a subset of the
Unicode character set, including:
2015 @ Sonia Sousa 82
uppercase letters
lowercase letters
punctuation
digits
special symbols
control characters
A, B, C, …
a, b, c, …
period, semi-colon, …
0, 1, 2, …
&, |, , …
carriage return, tab, ...
83. Boolean
• A boolean value represents a true or false
condition
• The reserved words true and false are
the only valid values for a boolean type
boolean done = false;
• A boolean variable can also be used to
represent any two states, such as a light bulb
being on or off
2015 @ Sonia Sousa 83
Editor's Notes
Java development environment are cross-platform they work on all operative systems
Main method = lower case
Java look for it to execute
Main method must receive an argument = array of String[]