...COMPUTER GRAPHICS Using Java CS 171G Outline • Terminology • Java Graphics Coordinate System • Java Applets • Drawing a Line • Changing the Color • Designing Your Own Colors • Drawing other shapes: rectangles, ovals, arcs, and polygons 1 Terminology: pixel • A pixel is the smallest visual element on a computer screen. Essentially, it’s a dot. • The image shown here is the letter S drawn in an area of 20 X 20 square pixels • The more pixels in an image, the smoother the image will appear. Terminology: resolution • Resolution: the number of pixels that can be displayed on a computer monitor. • When the resolution of a monitor is increased, pixels are smaller and closer together, so images appear smaller. • Typical computer monitor and HD television screen resolutions these days are • 720p: means 1366 pixels across by 768 pixels down • 900p: means 1600 pixels across by 900 pixels down • 1080p: means 1920 pixels across by 1080 pixels down All of the above are used in HDTVs and newer LCD displays (computer screens). 2 Resolution: Example of 900p 1600 pixels 900 pixels This screen has a total of 1,440,000 pixels Cartesian Coordinates • In math class, you learned about the Cartesian coordinate system. – Uses X (horizontal) and Y (vertical) axes – (0, 0) is at the center (also called the origin) – An increase in X means moving to the right – An increase in Y means moving up. – The Cartesian coordinate system has both positive and negative...
Words: 1930 - Pages: 8
...different interface than our caller. Alternative 1: Re-write the caller o Ugly, messy, error-prone (Equivalent to changing the power cable in our electrical plug when we go abroad) Alternative 2: Re-write the called libraries/classes o May not have the source code o As ugly and error-prone as Alternative 1 Alternative 3: Write an adapter The adapter converts all requests to a language the adaptee understands See http://mypages.valdosta.edu/dgibson/courses/cs4322/Lessons/Adap ter/AdapterNotes.pdf Another example Client class programmed against a Vendor class. Thus, the Client is strongly coupled with the Vendor class. Later, it is decided to change vendors. Vendor2 is selected which has different method names. Example (cont’d) The Client must be modified in order to adapt to the new vendor. What was the problem? The Client class encapsulates some portion of application logic, which is intertwined with the Vendor class. This causes the strong coupling/ dependence. Thus, modifying the Client code to adapt to the new vendor could result in errors being injected into the application logic. How do we mitigate this situation where we have a Client coded against a Vendor, where the Vendor will change? Two helpful design principles • Identify the aspects of your application that vary and separate them from what stays the same. • Program to an interface, not an implementation. • The first principle suggests that we separate the application logic from...
Words: 1481 - Pages: 6
...1 Learn Java/J2EE core concepts and key areas With Java/J2EE Job Interview Companion By K.Arulkumaran & A.Sivayini Technical Reviewers Craig Malone Stuart Watson Arulazi Dhesiaseelan Lara D’Albreo Cover Design, Layout, & Editing A.Sivayini Acknowledgements A. Sivayini Mr. & Mrs. R. Kumaraswamipillai 2 Java/J2EE Job Interview Companion Copy Right 2005-2007 ISBN 978-1-4116-6824-9 The author has made every effort in the preparation of this book to ensure the accuracy of the information. However, information in this book is sold without warranty either expressed or implied. The author will not be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Please e-mail feedback & corrections (technical, grammatical and/or spelling) to java-interview@hotmail.com First Edition (220+ Q&A): Dec 2005 Second Edition (400+ Q&A): March 2007 3 Outline SECTION DESCRIPTION What this book will do for you? Motivation for this book Key Areas index SECTION 1 Interview questions and answers on: Java Fundamentals Swing Applet Performance and Memory issues Personal and Behavioral/Situational Behaving right in an interview Key Points SECTION 2 Interview questions and answers on: Enterprise Java J2EE Overview Servlet JSP JDBC / JTA JNDI / LDAP RMI EJB JMS XML SQL, Database, and O/R mapping RUP & UML Struts Web and Application servers. Best practices and performance considerations. Testing and deployment. Personal and...
Words: 23255 - Pages: 94
...qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdf ghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxc vbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwer tyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmrtyuiopasdfg hjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcv bnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwert yuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwe rtyuiopasdfghjklzxcvbnmrtyuiopasdfghjklzxcvbnmqwertyuiopasdf ghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxc vbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwer tyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopas dfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklz xcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmrt yuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwe rtyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopa sdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjkl ...
Words: 2057 - Pages: 9
...Comparing the Programming Stack of Windows Phone 7 with Android 7 Summary 11 Related Resources 11 Chapter 2: User Interface Guidelines 12 Designing the Application Interface 13 Application User Interface Design 14 Comparing Windows Phone 7 and Android Navigation 18 Windows Phone 7 Frame and Page Structure 19 Application Templates 21 Summary 21 Related Resources 21 Chapter 3: The Developer and Designer Tools 23 A Comparison of Android and Windows Phone 7 Tools 23 Development Life Cycle and Windows Phone 7 Developer Tools 24 The UI Design Tools 26 Building Applications 33 Debugging 34 Summary 38 Chapter 4: C# programming 39 Managed Programming 40 A Comparison between C# Features and Java Classes 41 A Comparison of Important Class Libraries 51 The New features of C# 54 Comparing API Documentation Tools 58 NDoc 58 NDocs vs. Javadoc 61 Summary 61 Related Resources 62 Chapter 5: A Comparison of Application Life Cycles in Windows Phone 7 and Android 63 Multitasking in Android and Windows Phone 7 63 Tombstoning of Applications in Windows Phone 7 64 Life Cycle of a Windows Phone 7 Application 64 Role of Handlers in an Application’s Life Cycle 66 Comparing Life-cycle Methods 68 Tombstoning and Windows Phone 7 Life Cycle 69 Summary 74 Related Resources 74 Chapter 6: Storing Data and Preferences 75 Isolated Storage in Windows Phone 7 75 Use Cases 78 Managing the IsolatedStorage Space 79 Why Windows Phone 7 Does...
Words: 19181 - Pages: 77
...1970’s CLU is a programming language created at MIT by Barbara Liskov and her students between 1974 and 1975. It was notable for its use of constructors for abstract data types that included the code that operated on them, a key step in the direction of object-oriented programming (OOP). Euclid is an imperative programming language for writing verifiable programs. It was designed by Butler Lampson and associates at the Xerox PARC lab in the mid-1970s. The implementation was led by Ric Holt at the University of Toronto and James Cordy was the principal programmer for the first implementation of the compiler. It was originally designed for the Motorola 6809 microprocessor. Forth is an imperative stack-based computer programming language and programming environment. Language features include structured programming, reflection (the ability to modify the program structure during program execution), concatenative programming (functions are composed with juxtaposition) and extensibility (the programmer can create new commands). Although not an acronym, the language's name is sometimes spelled with all capital letters as FORTH, following the customary usage during its earlier years. Forth was designed by Charles H. Moore and appeared in the 1970’s. GRASS is the original version of GRASS was developed by Tom DeFanti for his 1974 Ohio State University Ph.D. thesis. It was developed on a PDP-11/45 driving a Vector General 3DR display, and as the name implies, this was a purely vector...
Words: 1885 - Pages: 8
...My name is Milan Acharya. I am the eldest son of Radha Krishna Acharya and Yam Kumari Acharya. I was born in 28th June 1991 at Phidim, Panchthar Nepal. At present, I am temporarily residing at Maitidevi, Kathmandu and my permanent address is Chula-Chuli-1, Illam Nepal. My interest on computer studies started from primary level. I was fascinated about computers since class 6 because we used to have computer class once a week and we used to play games, especially Sky Road. But I actually got to know about the benefit of computers when I reached class 8. I used to go to the cyber and make friends in Hi5 and Yahoo. I always wanted to learn more about computers. I was one of the best students in my computer class. My teachers suggested that I should choose computers for further study and I decided to involve in the field of computer science....
Words: 946 - Pages: 4
...1. ABSTRACT Application is a full-featured mapping program, designed to create a digital mind that can help you visually organize almost any sort of process or project as a dynamic, interconnected system of Thoughts. Application gives you a fairly intuitive interface for collecting, organizing, viewing, and navigating ideas, tasks, Web sites, related documents, and more. For example an organization if receives a project that is of large maintenance that is a project which requires a duration of five to six years then the maintenance of that project would be almost impossible for one’s behalf to maintain in a simple way of management in paper and pen. There comes the implementation of the application where not only these large projects can be maintained easily but also liability in terms of work breakdown structure and also in terms of scheduling can be maintained easily and efficiently. Whether you're building a complex Web site or conducting academic research, this app can help you build searchable networks of information with tools for taking notes, creating shortcuts, zooming out to get a higher-level view and even generating reports. Application publishing lets you sync a projection between multiple machines, or upload a version for fellow collaborators to see. A new transparent mode also lets you view a design directly on top of any other application without obscuring it. Application also has extras features like a system of tags and types, a calendar that can sync with...
Words: 12277 - Pages: 50
...TOUCH SCREEN PHONE AS A VIRTUAL KEYBOARD AND TRACKPAD TABLE OF CONTENTS Topic Page No. Table of Contents List of Figures i iii 1. Introduction 1.1 Abstract 1.2 Introduction and Motivation 1.3 Problem Statement 1.4 Scope of the Project 1.5 Organization of Project Report 2. Review of Literature 2.1 Domain Explanation 1 1 1 2 2 3 5 5 2.2 State of the current Methodology and Technology used 6 2.3 Methodology and Technology used 2.3.1 Android 2.3.2 Java 2.3.3 Eclipse 2.3.4 ADT Plugin 2.4 Project Overview 3. Analysis and Design 3.1 Requirement Analysis 3.1.1 Functional Requirements 3.1.2 Non-Functional Requirements 3.1.3 Hardware Requirements 3.1.4 Software Requirements 3.2 Project Design 3.2.1 Architecture diagram 3.2.2 Use Case diagram 3.2.3 Activity diagram 9 9 11 12 13 13 14 14 14 14 15 15 16 16 19 20 i 3.2.4 Sequence diagram 3.2.5 State Chart diagram 4. Implementation and Results 4.1 Implementation Details 4.2 Results 5. Testing 5.1 Test Cases 6. Conclusion and Further Work 6.1 Conclusion 6.2 Further Work References Acknowledgements Summary 21 22 23 23 25 29 29 31 31 31 ii LIST OF FIGURES Fig No. Label Page No. 2.1 3.1 3.2 3.3 3.4 3.5 4.1 4.2 4.3 4.4 4.5 Android Architecture Architecture Diagram Showing Components and Connectors Use Case Diagram Activity Diagram for Cursor Positioning Sequence Diagram for Text Input State Chart Diagram of Touch Screen Connection Screen Screen for cursor positioning and object selection Screen for text input...
Words: 6366 - Pages: 26
...this tutorial may not be redistributed or reproduced in any way, shape, or form without the written permission of tutorialspoint.com.Failure to do so is a violation of copyright laws. This tutorial may contain inaccuracies or errors andtutorialspointprovidesno guarantee regarding the accuracy of the site or its contents including this tutorial. If you discover that the tutorialspoint.com site or this tutorial content contains some errors, please contact us at webmaster@tutorialspoint.com ii ABOUT THE TUTORIAL GWT Tutorial Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google AdWords and Orkut. GWT is open source, completely free, and used by thousands of developers around the world. It is licensed under the Apache License version 2.0. This tutorial will give you great understanding on GWT concepts needed to get a web application up and running. Audience This tutorial is designed for Software Professionals who are willing to learn GWT Programming in simple and easy steps. This tutorial will give you great understanding on GWT Programming concepts and after completing this tutorial you will be at intermediate level of experties from where you can take yourself at higher level of expertise. Prerequisites Before proceeding with this tutorial you should have a basic understanding of Java programming language, text editor and execution of programs etc...
Words: 14136 - Pages: 57
...1.1 Introduction Object-Oriented Strategies Object-oriented programming embodies in software structures a number of powerful design strategies that are based on practical and proven software engineering techniques. By incorporating support for these strategies in software structures, object-oriented programming enables the manageable construction of more complex systems of software than was previously possible. The nature of these software structures has been shaped by decades of software engineering experience. The basic design strategies that are embodied in object-oriented programming are presented in the Table 1.1. The design strategies evolved as techniques for dealing with complex natural and man-made system. Because these strategies are so fundamental, they are encountered in other contexts and in other programming language forms. What is stressed here is the relationship of these strategies to the design and construction of object-oriented software. These strategies are widely supported by existing object-oriented languages though different languages may present them in different ways and some languages may support other variations of each one. For example, some object-oriented languages have additional ways of supporting generalization. The design strategies in object-oriented programming are effective for constructing software models of entities in the problem domain. In fact, some have argued that software design is largely about constructing a software model of the...
Words: 16718 - Pages: 67
...Release Team[oR] 2001 [x] java Java 2: The Complete Reference by Patrick Naughton and Herbert Schildt Osborne/McGraw-Hill © 1999, 1108 pages ISBN: 0072119764 This thorough reference reads like a helpful friend. Includes servlets, Swing, and more. Table of Contents Back Cover Synopsis by Rebecca Rohan Java 2: The Complete Reference blends the expertise found in Java 1: The Complete Reference with Java 2 topics such as "servlets" and "Swing." As before, there's help with Java Beans and migrating from C++ to Java. A special chapter gives networking basics and breaks out networking-related classes. This book helps you master techniques by doing as well as reading. Projects include a multi-player word game with attention paid to network security. The book is updated where appropriate throughout, and the rhythm of text, code, tables, and illustrations is superb. It's a valuable resource for the developer who is elbow-deep in demanding projects. Table of Contents Java 2 Preface - 7 Part l The Java Language - The Complete Reference - 4 Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 hapter 10 - The Genesis of Java - 9 - An Overview of Java - 20 - Data Types, Variables, and Arrays - 36 - Operators - 57 - Control Statements - 75 - Introducing Classes - 94 - A Closer Look at Methods and Classes - 111 - Inheritance - 134 - Packages and Interfaces - 156 - Exception Handling - 174 Chapter 11 - Multithreaded Programming...
Words: 78285 - Pages: 314
...Research on Mobile Location Service Design Based on Android Xianhua Shu, Zhenjun Du, Rong Chen School of Information Science and Technology Dalian Maritime University Dalian, China xiansimba@163.com Abstract—Android platform is a new generation of smart mobile phone platform launched by Google. Android provides the support of mobile map and location service, which is probably a concern of vast numbers of developers. So far, the development of mobile map and location applications is complex and difficult, and is often required to pay high copyright fees to map makers. Android is free and open, providing an easy-to-use development kit containing flexible map display and control functions. This paper introduces the architecture and component models of Android, and analyzes the anatomy of an Android application including the functions of Activity, Intent Receiver, Service, Content Provider, and etc. Based on Android, the design method of a location-based mobile service is then presented. The design example shows that it’s so easy to implement self-location, to draw the driving trace, to perform query and to flexibly control the real-time map on Android. Keywords-Android; location based service; driving trace enable developers to form their mobile systems with unique characteristics. The architecture of Android framework and the anatomy of an Android application are addressed in section II and section III. Based on the analyses, the design of a location-based mobile service on...
Words: 2601 - Pages: 11
...Programming Languages/Java ™ Jumpin’ Java! The bestselling Java beginner’s book is now fully updated for Java 7! Open the book and find: ava J • Definitions of the many terms you’ll encounter ® • The grammar of Java • How to save time by reusing code • All about if, for, switch, and while statements • An overview of object-oriented programming • Building blocks — learn to work with Java classes and methods and add comments • Hints about handling exceptions • How to write Java applets ® • The Java scoop — get an overview of Java, the enhancements in Java 7, and the software tools you need • Get loopy — understand the value of variables and learn to control program flow with loops or decision-making statements 5th Edition 5th Edition Java Java, the object-oriented programming language that works on almost any computer, is what powers many of those cool multimedia applications. Thousands have learned Java programming from previous editions of this book — now it’s your turn! Whether you’re new to programming or already know a little Visual Basic or C++, you’ll be doing Java in a jiffy. g Easier! Making Everythin • Ten ways to avoid mistakes • Class it up — explore classes and objects, constructors, and subclasses, and see how to reuse your code • A click ahead — experiment with variables and methods, use arrays and collections to juggle values, and create programs that respond to mouse clicks Learn...
Words: 34460 - Pages: 138
...Current Systems The current system that St John’s University has implemented caters to everyone in the college community. Their system covers from admissions through graduation and everything in between. One accesses their university information system through what they call St. John’s Central (stjohns.edu, 2013). Through the university’s website, St Johns Central provides internet access to manage many facets of one’s college career. According to StJohn.edu (2013), the University possesses a wide variety of technology systems, places, and services including: * Electronic Mail (E-mail) * Some helpful places to bookmark * Some important places for learning * Computing devices * Communication via the Network * Software * Collaboration and Storage Places * Student Support and Technical Consultation St John’s University provides access to e-mail by way of Microsoft Live 365’s system. Their e-mail can be accessed through their network on campus, but they also provide access to their e-mail system through mobile devices (tablets, smartphones), which eases the burden of communication between teachers and students and amongst other students in an effort of collaboration, so that one doesn’t have to be physically in school to log in to one of the university’s pc’s to view e-mails or to work on projects or other assignments. In today’s digital age, Cloud computing provides ease of access to the university’s network by, according to Laudon & Laudon(2012)...
Words: 2162 - Pages: 9