Advanced Java

Total Page:16

File Type:pdf, Size:1020Kb

Advanced Java Advanced Java Sudhanshu Maurya, Published by - Jharkhand Rai University Subject: ADVANCED JAVA Credits: 4 SYLLABUS Overview Of Java Brief history of Java, Java and the web, Java architecture, Basics of a typical Java environment, Java applicationsvs. Java applets, Java Development Kit (JDK) Java and other High level Languages: Comparison of Java with other high level languages, Importance and limitations of Java. Object-oriented Programming Classes and objects, class variables and methods, writing classes, subclasses, files Object-Oriented concepts in Java: Classes in Java, Encapsulation, Polymorphism, Constructors, Garbage collection. Java Programming Design Java’s built-in data types, Java’s inner classes, Operators. Flow-Control Statements Conditional statements, Loop statements, Flow-breaking statements. Reusing Classes Composition syntax, Inheritance syntax, Combining Composition and inheritance, Protected, Incremental development, Initializing and class loading. Introduction to objects The progress of abstraction, Inheritance: reusing the interface, Interchangeable objects with polymorphism, Multithreading, Persistence. Exception Handling And Threading In Java Why use exception handling, Hierarchy of exception classes, Exception handling constructs, Methods available to exceptions, Creating own exception classes Threading: Creating and running a thread, Thread- control methods, Thread life cycle, Thread groups, Thread synchronization, Inter-thread communications, Priorities and scheduling, thread local variables, Daemon threads. Event Handling Ignoring the event, Handling the component in the originating component, Delegating the event Java’s Event Types: Adjustment events, Ancestor events, Component events, Container events, Focus events, Input method events, Internal frame events, Item events, Key events, menu events, Mouse events, Paint events, Pop-up menu events, Text events, Window events. Windows Toolkit Java abstract windowing toolkit, Networking, Modifiers, Packages and interfaces. Suggested Reading: Gosling, James, A brief history of the Green project. Java.net, no date Gosling, James, A brief history of the Green project. anonymous-insider.net, no date Gosling, James; Joy, Bill; Steele, Guy L., Jr.; Bracha, Gilad . Lindholm, Tim; Yellin, Frank Patrick Naughton: Java Was Strongly Influenced by Objective-C David Bank: The Java Saga. Patrick Naughton: The Long Strange Trip to Java is-research GmbH: List of programming languages for a Java Virtual Machine How Java's Floating-Point Hurts Everyone Everywhere ADV ANCED JA V A ADVANCED JAVA SEM-III COURSE OVERVIEW Accurate programming is the primary need of any Computer subject introduces the student to the concepts in the study of Science application. Software Engineering techniques provide Object oriented programming using classes, It familiarizes the one such means of estimating almost accurately the estimated students with the various methods for handling events time required for writing accurate codes and testing data. occurring from users use of keyboard keys and mouse Analysis of such a user data and his requirements present the movements. Also the student understands Exception Handling usefulness of the information. The techniques thus form the methods. basis of all engineering designs and is one singular most The students on completion of the course shall develop the important subject of study for all Computer Software Special- following skills and competencies: ists. It develops an understanding of the built-in errors of a. Basics of Java Programming. common nature. b. Use of Objects and classes. The aim of this subject is to develop students’ understanding c. Graphical user Interface. of the concepts of Java Programming. In particular the subject d. Event and Exception Handling.. is designed to develop the underpinning knowledge and skills e. File I/O handling. required to write complex programs and test procedures. This f. Database connectivity. i ADVANCED JAVA CONTENT ADV ANCED JA V A . Lesson No. Topic Page No. Lesson Plan ii Object Oriented Programming - Concepts Lesson 1 Overview of Java 1 Lesson 2 Basic of Java Programming 3 Lesson 3 Describing objects & classes 8 Lesson 4 Java Programming Constructs 16 Working with Java Programs Lesson 5 Examples and Excercises 23 Lesson 6 Working with Objects and Classes 25 Lesson 7 Conditionals and storing values 32 Lesson 8 Looping techniques 36 Advanced Applications in Java – Advanced Lesson 9 Creating Classes and Applications in Java 40 Lesson 10 More About Methods 46 Lesson 11 Working with Applets 55 Using advanced Graphical interface Lesson 12 Graphics and Fonts 62 Lesson 13 Using Fonts and Color Objects 68 Lesson 14 Simple Animation and Threads 72 Lesson 15 Reducing Animation Screen Flickers 76 Lesson 16 More Animation, Images, and Sound 82 Lesson 17 Retrieving and Using Sounds 90 Lesson 18 Creating Animation 93 Throwing Exceptions in Java Lesson 19 Catching Exceptions 98 iii ADV ANCED JA ADVANCED JAVA V A CONTENT . Lesson No. Topic Page No. Threading in Java Lesson 20 Multithreading 104 Events Management Lesson 21 Interpreting Events and performing actions 111 Lesson 22 Handling UI Actions and Events 120 Windows Toolkit Lesson 23 The Java Abstract Windowing Toolkit 129 Lesson 24 Networking 136 Lesson 25 Using AWT Windows in Stand-Alone Applications 140 Lesson 26 Modifiers 146 Lesson 27 Packages and Interfaces 152 Reading And Writing Files Lesson 28 Streaming - Input 159 Lesson 29 Streaming - Output 166 Database Connectivity Lesson 30 Maintaining Safety 172 Lesson 31 JDBC – Examples & Exercises 176 Database Connectivity Lesson 32 Built in Optimizations 180 Lesson 33 The Java Virtual Machine 186 Lesson 34 The Garbage Collector 192 Lesson 35 The Java Class Hierarchy 200 L* = Lecture Hours (1.5 hours per lecture) iv UNIT-I LESSON-1 CHAPTER-1 OVERVIEW OF JAVA OBJECT ORIENTED PROGRAMMING CONCEPTS Introduction you can install by downloading the file and clicking the file’s icon ADV . This version is the easiest to set up. The other version can be Before you can start writing Java programs, you need acquire downloaded as a series of smaller files that must be assembled ANCED JA and set up some kind of Java programming software. after all files have been received. Although several different products are available for the development of Java programs, including many terrific once To download the Kit from Sun, visit the World Wide Web page that make programming much easier, the starting place for the http:// java. Sun . com / j2se / 1.3 /. V A most new Java programmers is the Software Development Kit, Although Sun Microsystems has not announced plans to make a set of tools for writing, debugging , and running Java version 1.3 of the Kit available for other systems , other programs. All of the examples in this lesson use the Kit, and companies have created implementation of the Java language you are encouraged to look at all other Java programming tools and development software that supports Java details about as you go through the remaining lessons. The material will these implementations are provided in the “Products and make more sense to programmers using the Kit , and it builds APLs” section of Sun “s official Java site, which is available at experience that will be beneficial no matter which http://java .sun.com . development software you use later on. If your system can run the Software Development Kit, Objective download it from Sun”s web site and save it your system in a The objective of this overview is to help you in downloading temporary folder. The file is more than 25 megabytes in size, so the software from the Sun Micro Systems for the kind of you “ll have time during the download to make coffee, knit a Operating System you are using. Here also you will learn the cardigan, or gnaw your foot off to escape any bear traps it might installation and testing procedure of Java. be caught in. Lesson in detail Workshop; installing the Kit The Software Development Kit is also referred to as the SDK. After the Software Development Kit has been downloaded to a Whenever Sun releases a new version of Java, the first tool that temporary folder ,you” re ready to install it . Sun’s own supports it is the Kit. installation documentation supplements the information To create all of the programs in this lesson , you must either provided during the hour, so be sure to consult it if you have use Software Development Kit 1.3 or another Java program- any questions about how the installation should be handled. ming tool that fully supports all of version 1.3 features . Window Installation There many different software packages that offer the capability Window version of the Kit can be installed in three steps; to create Java programs, but all of these are not created equally 1. Download the installation file from Sun , saving it in when language support is concerned . Some of these program- temporary folder on your system. ming tools only support Java 1.0 the initial version of the language , which was released by Sun Microsystems in late 2. Open the folder the contains the file. 1995. Other tools support Java 1.1, which was released in mid- 3. Double click the file’s icon and dialog box will open 1997. or version 1.2 from 1998. indicating that the Kit’s files are being unpacked and Can you tell , on which Operating systems installation will being. is Java available ? The Kit will be installed in a folder, with a name based on the version you ‘re downloading , such as \ jdk.3 Click the browse At the time of this writing , the Java Software Development button to select a different folder. Kit 1.3 was available directly from Sun Microsystems for the following systems; After choosing a folder , the Select Components dialog box will ask you to choose which components of the Kit to install. You • Microsoft Windows 95, 98 Me NT, and 2000 systems only need the Program files components accomplish the • Linux systems running on Intel Pentium machines with workshops and tutorial programs in this Course Pack , but you Linux kernel version 2.2.12 and glibc version 2.1.2 may also find the Demos useful if you can spare the hard disk • Solaris SPARC and solaris Intel systems space.
Recommended publications
  • COMPUTER CHAPTER 4- INTRODUCING JAVA Introduction
    CLASS-11 SUBJECT – COMPUTER CHAPTER 4- INTRODUCING JAVA Introduction to Java programming JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code. Bytecode javac compiler of JDK compiles the java source code into bytecode so that it can be executed by JVM. The bytecode is saved in a .class file by compiler. Java Virtual Machine (JVM) This is generally referred as JVM. Before, we discuss about JVM lets see the phases of program execution. Phases are as follows: we write the program, then we compile the program and at last we run the program. 1) Writing of the program is of course done by java programmer. 2) Compilation of program is done by javac compiler, javac is the primary java compiler included in java development kit (JDK). It takes java program as input and generates java bytecode as output. 3) In third phase, JVM executes the bytecode generated by compiler. This is called program run phase. So, now that we understood that the primary function of JVM is to execute the bytecode produced by compiler. Characteristics of Java Simple Java is very easy to learn, and its syntax is simple, clean and easy to understand. Multi-threaded Multithreading capabilities come built right into the Java language. This means it is possible to build highly interactive and responsive apps with a number of concurrent threads of activity.
    [Show full text]
  • IITM GROUP of INSTITUTIONS, MURTHAL SONIPAT What Is Java
    IITM GROUP OF INSTITUTIONS, MURTHAL SONIPAT DEPARTMENT: COMPUTER SCIENCE AND ENGG. SUBJECT: ADVANCE JAVA CSE-306B UNIT : 1 JAVA LANGUAGE BASICS JAVA: Java is a general-purpose, concurrent, object-oriented, class-based, and the runtime environment(JRE) which consists of JVM which is the cornerstone of the Java platform. This blog on What is Java will clear all your doubts about why to learn java, features and how it works. In this What is Java blog, I would be covering following topics: What is Java used for? History of Java What is Java? Features of Java Components in Java What is Java used for? Before I answer the question, what is Java used for, let me brief you about why you should choose Java. Java is highly popular and has dominated this field from early 2000‘s till the present 2018. Java has been used in different domains. Some of them are listed below: Banking: To deal with transaction management. Retail: Billing applications that you see in a store/restaurant are completely written in Java. Information Technology: Java is designed to solve implementation dependencies. Android: Applications are either written in Java or use Java API. Financial services: It is used in server-side applications. Stock market: To write algorithms as to which company they should invest in. Big Data: Hadoop MapReduce framework is written using Java. Scientific and Research Community: To deal with huge amount of data. Wait! Java can do more. 1 Let‘s see how some of the technologies make use of Java as an essential core of their functionalities.
    [Show full text]
  • Programming in Java Learning Objectives
    Programming in Java Learning objectives After undergoing the subject, students will be able to Understand the history of Java. Explain how Java programs are compiled, interpreted and executed in java environment. Explain how Java is used to develop different types of application Explain the concept of Packages and their uses Explain the concept of multithreading. Explain how we can build application with JDK. 1. History of Java Java Programming Language was written by James Gosling along with two other person ‘Mike Sheridan‘ and ‘Patrick Naughton‘, while they were working at Sun Microsystems. Initially it was named oak Programming Language. 1.1.Releases of Java Initial Java Versions 1.0 and 1.1 was released in the year 1996 for Linux, Solaris, Mac and Windows. Java version 1.2 (Commonly called as java 2) was released in the year 1998. Java Version 1.3 codename Kestrel was released in the year 2000. Java Version 1.4 codename Merlin was released in the year 2002. Java Version 1.5/Java SE 5 codename ‘Tiger’ was released in the year 2004. Java Version 1.6/Java SE 6 Codename ‘Mustang’ was released in the year 2006. Java Version 1.7/Java SE 7 Codename ‘Dolphin’ was released in the year 2011. Java Version 1.8 is the current stable release which was released this year (2015). 1.2. Five Goals which were taken into consideration while developing Java: Keep it simple, familiar and object oriented. Keep it Robust and Secure. Keep it architecture-neural and portable. Executable with High Performance. Interpreted, threaded and dynamic.
    [Show full text]
  • SUBJECT-COMPUTER CLASS-12 CHAPTER 9 – Compiling and Running Java Programs
    SUBJECT-COMPUTER CLASS-12 CHAPTER 9 – Compiling and Running Java Programs Introduction to Java programming JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code. Bytecode javac compiler of JDK compiles the java source code into bytecode so that it can be executed by JVM. The bytecode is saved in a .class file by compiler. Java Virtual Machine (JVM) This is generally referred as JVM. Before, we discuss about JVM lets see the phases of program execution. Phases are as follows: we write the program, then we compile the program and at last we run the program. 1) Writing of the program is of course done by java programmer. 2) Compilation of program is done by javac compiler, javac is the primary java compiler included in java development kit (JDK). It takes java program as input and generates java bytecode as output. 3) In third phase, JVM executes the bytecode generated by compiler. This is called program run phase. So, now that we understood that the primary function of JVM is to execute the bytecode produced by compiler. Characteristics of Java Simple Java is very easy to learn, and its syntax is simple, clean and easy to understand. Multi-threaded Multithreading capabilities come built right into the Java language. This means it is possible to build highly interactive and responsive apps with a number of concurrent threads of activity.
    [Show full text]
  • Programming in Java Unit-I an Overview Of
    PROGRAMMING IN JAVA UNIT-I AN OVERVIEW OF JAVA: James Gosling, Patrick Naughton, Chris Worth, ED Frank and Mike Sheridan conceived Java at Sun Microsystems, Inc in 1991. It took 18 months to develop the first Working version. This language was initially called ‘OAK’ but was renamed “JAVA” in 1995. The primary motivation was the need for a platform-independent (i.e. architecture- neutral) language that could be used to create software to be embedded in various consumer electronic devices such as microwave oven and remote controls. As you can probably guess, many different types of CPU’s are used as controllers. The trouble with C and C++ (and most other languages) is that they are designed to be compiled for a specific target. Although it is possible to compile a C++ program for just about any type of CPU, to do so requires a full C++ compiler together for that CPU. The problems are that compilers are expensive and time consuming to create. An easier- more cost efficient solution was needed. In an attempt to find such a solution, Gosling and others began work on a portable, platform-independent language that could be used to produce code that would run on a variety of CPU’s under different environments. This effort ultimately led to the creation of Java. In 1993, the World Wide Web (WWW) appeared on the Internet and transformed the text-based Internet into a graphical rich environment. The project team came up with the idea of developing web applets (tiny programs) using the new language that could run on all types of computers connected to the Internet.
    [Show full text]
  • The Coffee Machine Potent Mercantile Metaphors of the Programming Language JAVA «
    Media Culture and Cultural Techniques Working Papers N°003 2020 » The Coffee Machine Potent Mercantile Metaphors of the Programming Language JAVA « Markus Krajewski Department Arts, Media, Philosophy N° 2020.003 »The Coffee Machine: Potent Mercantile Metaphors of the Programming Language JAVA« Markus Krajewski DOI: 10.5451/unibas-ep78171 Media Culture and Cultural Techniques working papers BMCCT veröffentlicht Arbeitspapiere im Forschungsbereich des Basler Seminars für Medienwissenschaft. Die Arbeitspapiere erscheinen in unregelmässigen Abständen in deutscher und englischer Sprache. BMCCT publishes working papers in the research area of the Basel Seminar for Media Studies. The working papers appear at irregular intervals in German and English. Cite this item: The »Basel Media Culture and Cultural Concept and design: Markus Krajewski, »The Coffee Machine Techniques Working Papers« (BMCCT Mario Wimmer Potent Mercantile Metaphors of the working papers) are published by Programming Language JAVA«, BMCCT Hosted by University of Basel library’s working papers, (August 2020) No.3 Seminar für Medienwissenschaft eterna server (DOI: 10.5451/unibas-ep78171). Universität Basel Holbeinstrasse 12 4051 Basel medienwissenschaft.philhist.unibas.ch [email protected] under the creative commons licence Department https://creativecommons.org/licenses/by/ Arts, Media, Philosophy 4.0/ ISSN 2673-5792 . The Coffee Machine Potent Mercantile Metaphors of the Programming Language JAVA . Markus Krajewski Department Arts, Media, Philosophy, University of Basel, [email protected] DOI:10.5451/unibas-ep78171 »Te best Java is a very excellent coffee« (Ralph Holt Cheney, 1925) 1. Prologue The Program of History In the beginning was Green, and Green was with Sun. »And the light shines on in the darkness, but the darkness has not mastered it« (NET Bible, John 1:5).
    [Show full text]
  • History of Java the History of Java Is Very Interesting. Java Was Originally Designed for Interactive Television, but It Was
    History of Java The history of Java is very interesting. Java was originally designed for interactive television, but it was too advanced technology for the digital cable television industry at the time. The history of java starts with Green Team. Java team members (also known as Green Team), initiated this project to develop a language for digital devices such as set-top boxes, televisions, etc. However, it was suited for internet programming. Later, Java technology was incorporated by Netscape. The principles for creating Java programming were "Simple, Robust, Portable, Platform-independent, Secured, High Performance, Multithreaded, Architecture Neutral, Object-Oriented, Interpreted and Dynamic". Currently, Java is used in internet programming, mobile devices, games, e-business solutions, etc. There are given the significant points that describe the history of Java. 1) James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. The small team of sun engineers called Green Team. 2) Originally designed for small, embedded systems in electronic appliances like set-top boxes. 3) Firstly, it was called "Greentalk" by James Gosling, and file extension was .gt. 4) After that, it was called Oak and was developed as a part of the Green project. Why Java named "Oak"? 5) Why Oak? Oak is a symbol of strength and chosen as a national tree of many countries like U.S.A., France, Germany, Romania, etc. 6) In 1995, Oak was renamed as "Java" because it was already a trademark by Oak Technologies. Why Java Programming named "Java"? 7) Why had they chosen java name for java language? The team gathered to choose a new name.
    [Show full text]
  • Pipenightdreams Osgcal-Doc Mumudvb Mpg123-Alsa Tbb
    pipenightdreams osgcal-doc mumudvb mpg123-alsa tbb-examples libgammu4-dbg gcc-4.1-doc snort-rules-default davical cutmp3 libevolution5.0-cil aspell-am python-gobject-doc openoffice.org-l10n-mn libc6-xen xserver-xorg trophy-data t38modem pioneers-console libnb-platform10-java libgtkglext1-ruby libboost-wave1.39-dev drgenius bfbtester libchromexvmcpro1 isdnutils-xtools ubuntuone-client openoffice.org2-math openoffice.org-l10n-lt lsb-cxx-ia32 kdeartwork-emoticons-kde4 wmpuzzle trafshow python-plplot lx-gdb link-monitor-applet libscm-dev liblog-agent-logger-perl libccrtp-doc libclass-throwable-perl kde-i18n-csb jack-jconv hamradio-menus coinor-libvol-doc msx-emulator bitbake nabi language-pack-gnome-zh libpaperg popularity-contest xracer-tools xfont-nexus opendrim-lmp-baseserver libvorbisfile-ruby liblinebreak-doc libgfcui-2.0-0c2a-dbg libblacs-mpi-dev dict-freedict-spa-eng blender-ogrexml aspell-da x11-apps openoffice.org-l10n-lv openoffice.org-l10n-nl pnmtopng libodbcinstq1 libhsqldb-java-doc libmono-addins-gui0.2-cil sg3-utils linux-backports-modules-alsa-2.6.31-19-generic yorick-yeti-gsl python-pymssql plasma-widget-cpuload mcpp gpsim-lcd cl-csv libhtml-clean-perl asterisk-dbg apt-dater-dbg libgnome-mag1-dev language-pack-gnome-yo python-crypto svn-autoreleasedeb sugar-terminal-activity mii-diag maria-doc libplexus-component-api-java-doc libhugs-hgl-bundled libchipcard-libgwenhywfar47-plugins libghc6-random-dev freefem3d ezmlm cakephp-scripts aspell-ar ara-byte not+sparc openoffice.org-l10n-nn linux-backports-modules-karmic-generic-pae
    [Show full text]
  • Richfaces Developer Guide
    RichFaces Developer Guide RichFaces framework with a huge library of rich components and skinnability support RichFaces Developer Guide 1. Introduction ................................................................................................................... 1 2. Technical Requirements ................................................................................................. 3 2.1. Supported Java Versions .................................................................................... 3 2.2. Supported JavaServer Faces Implementations and Frameworks ............................ 3 2.3. Supported Servers .............................................................................................. 3 2.4. Supported Browsers ............................................................................................ 4 3. Getting Started with RichFaces ...................................................................................... 5 3.1. Downloading the RichFaces ................................................................................ 5 3.2. Simple JSF application with RichFaces ................................................................ 5 3.2.1. Adding RichFaces libraries into the project ................................................ 5 3.2.2. Registering RichFaces in web.xml ............................................................. 6 3.2.3. Managed bean ......................................................................................... 8 3.2.4. Registering bean in faces-cofig.xml ..........................................................
    [Show full text]
  • Handout 13 Introduction to Object-Oriented Programming in Python
    Handout 13 CS602 – Data-Driven Development with –Fall’20 Page 1 of 5 Handout 13 Introduction to Object-Oriented Programming in Python • Object-oriented programming (OOP) involves programming using objects. • An object represents an entity important for an application; similar objects share the same structure (data/properties/variables) and behavior (functions/methods) • Objects are defined using Class definitions. The concept of ‘Class’ is synonymous with ‘type’. • Each object is an instance of a class. Instance variables are tied to specific objects. Each object has its own instance variables. • In addition, there are class variables, associated with the class and shared by all objects of that class. A Python class uses variables to store data fields and defines methods to perform actions. Additionally, a class provides a special type method, __init__(), known as initializer, which is invoked to initialize the data components of a newly created object. An initializer can perform any action, but initializer is designed to perform initializing actions, such as creating the instance variables (a.k.a. data fields) of an object. EXAMPLE Let’s create a class definition for object type Review. Each review should have a numeric rating, a maximum possible rating and review text. Since these values are going to be different for different Review objects, they define properties of each individual object, thus are called instance variables rating, maxrating and reviewText '''Version 1 of the Review class; includes the __init__ method. Demonstrates instance variables and parameter 'self' - the obligatory reference to the calling object.''' class Review: # Method __init__ is called automatically during class instantiation (a.k.a.
    [Show full text]
  • The Objective-C Programming Language
    Inside Mac OS X The Objective-C Programming Language February 2003 Apple Computer, Inc. Even though Apple has reviewed this © 2002 Apple Computer, Inc. manual, APPLE MAKES NO All rights reserved. WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH No part of this publication may be RESPECT TO THIS MANUAL, ITS reproduced, stored in a retrieval QUALITY, ACCURACY, system, or transmitted, in any form or MERCHANTABILITY, OR FITNESS by any means, mechanical, electronic, FOR A PARTICULAR PURPOSE. AS A photocopying, recording, or RESULT, THIS MANUAL IS SOLD “AS otherwise, without prior written IS,” AND YOU, THE PURCHASER, ARE permission of Apple Computer, Inc., ASSUMING THE ENTIRE RISK AS TO with the following exceptions: Any ITS QUALITY AND ACCURACY. person is hereby authorized to store documentation on a single computer IN NO EVENT WILL APPLE BE LIABLE for personal use only and to print FOR DIRECT, INDIRECT, SPECIAL, copies of documentation for personal INCIDENTAL, OR CONSEQUENTIAL use provided that the documentation DAMAGES RESULTING FROM ANY contains Apple’s copyright notice. DEFECT OR INACCURACY IN THIS The Apple logo is a trademark of MANUAL, even if advised of the Apple Computer, Inc. possibility of such damages. Use of the “keyboard” Apple logo THE WARRANTY AND REMEDIES SET (Option-Shift-K) for commercial FORTH ABOVE ARE EXCLUSIVE AND purposes without the prior written IN LIEU OF ALL OTHERS, ORAL OR consent of Apple may constitute WRITTEN, EXPRESS OR IMPLIED. No trademark infringement and unfair Apple dealer, agent, or employee is competition in violation of federal authorized to make any modification, and state laws.
    [Show full text]
  • Dissertation Submitted to the Graduate Faculty of Auburn University in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy
    Repatterning: Improving the Reliability of Android Applications with an Adaptation of Refactoring by Bradley Christian Dennis A dissertation submitted to the Graduate Faculty of Auburn University in partial fulfillment of the requirements for the Degree of Doctor of Philosophy Auburn, Alabama August 2, 2014 Keywords:Refactoring, Code Smells, Patterns, Non-functional Requirements, Verification Copyright 2014 by Bradley Christian Dennis Committee: David Umphress, Chair, Associate Professor of Computer Science and Software Engineering James Cross, Professor of Computer Science and Software Engineering Dean Hendrix, Associate Professor of Computer Science and Software Engineering Jeffrey Overbey, Assistant Research Professor of Computer Science and Software Engineering Abstract Studies of Android applications show that NullPointerException, OutofMemoryError, and BadTokenException account for a majority of errors observed in the real world. The technical debt being born by Android developers from these systemic errors appears to be due to insufficient, or erroneous, guidance, practices, or tools. This dissertation proposes a re- engineering adaptation of refactoring, called repatterning, and pays down some of this debt. We investigated 323 Android applications for code smells, corrective patterns, or enhancement patterns related to the three exceptions. I then applied the discovered patterns to the locations suggested by the code smells in fifteen randomly selected applications. I measured the before and after reliability of the applications and observed a statistically significant improvement in reliability for two of the three exceptions. I found repatterning had a positive effect on the reliability of Android applications. This research demonstrates how refactoring can be generalized and used as a model to affect non-functional qualities other than the restructuring related attributes of maintainability and adaptability.
    [Show full text]