Premium Essay

Java Ii

In: Computers and Technology

Submitted By itismygame
Words 590
Pages 3
/* * * Java II PRG 421 * June 20, 2011 * Week 4 Assignment * */ package javaapplication46;

//import utilities import java.text.NumberFormat; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; import java.awt.*;

public class JavaApplication46 extends JFrame implements ActionListener {

//Arrays declared int loanTermsYears[] = {7, 15, 30}; double annualRatesPercentage[] = {5.35, 5.5, 5.75};

public class JTabbedPane {

JPanel mainSettings = new JPanel(); JTabbedPane tabs = new JTabbedPane(); } //Labels declared JLabel AmountLabel = new JLabel("Loan Amount:$ "); JLabel PaymentLabel = new JLabel("Monthly Payment: "); JLabel InterestLabel = new JLabel("Interest Rate %: "); JLabel TermLabel = new JLabel("Loan Term"); //Text Fields declared JTextField mortgageAmount = new JTextField(7); JTextField Payment = new JTextField(7); JTextField InterestRate = new JTextField(3); JTextField Term = new JTextField(3); //Buttons declared JButton Loan7yrs = new JButton("7 years @ 5.35%"); JButton Loan15yrs = new JButton("15 years @ 5.50%"); JButton Loan30yrs = new JButton("30 years @ 5.75%"); JButton ExitButton = new JButton("Exit"); JButton ClearButton = new JButton("Reset"); JButton CalculateButton = new JButton("Calculate"); // Text Area and ScrollPane declared JTextArea LoanPayments = new JTextArea(30, 50); JTextArea GraphArea = new JTextArea(30, 50); JScrollPane scroll = new JScrollPane(LoanPayments); MenuContainer termrate = new JComboBox();

public JavaApplication46() {

//Set up Frame, Panel, and Layout super("Scott's Mortgage Calculator"); setSize(600, 300); setLocation(200, 200);

Similar Documents

Premium Essay

My It Report

...MICHAEL OKPARA UNIVERSITY OF AGRICULTURE, UMUDIKE P.M.B 7267, UMUAHIA, ABIA STATE. A TECHNICAL REPORT ON A SIX MONTHS STUDENT INDUSTRIAL WORK EXPERIENCE CARRIED OUT AT ASHPOT MICROSYSTEMS LIMITED, 142 MARKET ROAD ABA. BY ELEANYA IFEANYICHI FAVOUR MOUAU/BSC/10/11/2222 SUBMITTED TO THE DEPARTMENT OF COMPUTER SCIENCE IN PARTIAL FULFILMENT FOR THE AWARD OF BACHELOR OF SCIENCE (BSc) DEGREE IN COMPUTER SCIENCE. DECEMBER 2013 DECLARATION I ELEANYA IFEANYICHI FAVOUR with the matriculation number MOUAU/BSc/10/11/2222, hereby declare that I underwent six months of industrial training at ASHPOT MICROSYSTEMS LIMITED, 142 market road Aba and that this report is written by me to the best of practical knowledge acquired during the course of the training program. DEDICATION This report is dedicated to God almighty for his grace upon my life and for seeing me through in the course of my industrial training, and to my wonderful family for their tireless support, love, and advice up to this point of academic pursuit. CERTIFICATION We the undersigned hereby certified that ELEANYA IFEANYICHI FAVOUR with the registration number MOUAU/BSC/10/2222, has duly completed her six months Industrial Training at Ashpot Microsystem Limited Aba, in partial fulfillment of the requirements for the award of Bachelor of Science (B.Sc...

Words: 1843 - Pages: 8

Free Essay

Test Bank Data Structure and Java

...Test Bank for Data Structures with Java John R. Hubbard Anita Huray University of Richmond Chapter 1 Object-Oriented Programming Answer “True” or “False”: 1. An analysis of the profitability of a software solution would be done as part of the feasibility study for the project. 2. The best time to write a user manual for a software solution is during its maintenance stage. 3. The requirements analysis of a software project determines what individual components (classes) will be written. 4. In a large software project it is preferable to have the same engineers write the code as did the design. 5. In the context of software development, “implementation” refers to the actual writing of the code, using the design provided. 6. Software engineers use “OOP” as an acronym for “organized operational programming”. 7. The term “Javadoc” refers to the process of “doctoring” Java code so that it runs more efficiently. 8. Software engineers use “UML” as an acronym for “Unified Modeling Language”. 9. UML diagrams are used to represent classes and the relationships among them. 10. The “is-a” relationship between classes is called composition. 11. The “contains-a” relationship between classes is called aggregation. 12. The “has-a” relationship between classes is called inheritance. 1 Test Bank 2 13. A “mutable” class is one whose objects can be modified by the objects of other classes. 14...

Words: 1904 - Pages: 8

Premium Essay

Java for Dummies

...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

Premium Essay

Asdsada

...CAPITOL UNIVERSITY College of Computer Studies Introduction to Programming Activity Book Compiled by: Mark Godfrey D. Torres 2012 Introduction to Programming ii Table of Contents Weeks 1 to 3 – Creating Your First Java Classes ....................................................................................... 1 Objectives ........................................................................................................................................... 1 Summary ............................................................................................................................................ 1 The Don’ts........................................................................................................................................... 2 Key Terms ........................................................................................................................................... 3 Seatwork............................................................................................................................................. 6 Where to Save Your Files ................................................................................................................. 6 Configuring Windows to Work with the Java SE Development Kit................................................... 6 Your First Application ........................................................................................................................

Words: 4647 - Pages: 19

Free Essay

Pt1420 Programming Unit 1 Research Assignment

...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

Free Essay

Master

...Automated Inventory Management Project Report Chao Li Spring 2006 Abstract With rapid growth of human-computer interaction, more and more useful software are replacing human efforts. The system we propose in this report integrates the idea to automated , instead of manually, manage inventory of a restaurant’s liquor, meanwhile it can generate sales report, inventory report, etc, which all require human efforts previously. As a result, this new system can reduce possible human errors and provide accurate information of inventory at any point. Introduction Nowadays, more and more companies tend to use any available software to maintain information over a long term. We design the Automated Inventory Management System to approach this goal with features that help improve data consistency, maintain necessary inventory level. With these goals in mind, we decide to incorporate design philosophy as well as user friendly interface into the system, meanwhile to have powerful functions that manifest all the users’ requirements and needs. One concern is how to reflect inventory level as quick as possible, since the sales of liquor occupy a large proportion compared with the daily transactions of the entire restaurant. Therefore, liquor’s inventory level changes constantly. In order to monitor these changes over periods, the Automated Inventory Management System can efficiently and accurately accomplish it while provides other...

Words: 2794 - Pages: 12

Free Essay

Dnfkdsfnklff

...CertPrs8/OCA/OCP Java SE 7 Programmer I & II Study Guide (Exams 1Z0-803 & 1Z0-804)/Sierra/177200-6/FM CONTENTS AT A GLANCE Part I OCA and OCP 1 Declarations and Access Control .............................. 3 2 Object Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 3 Assignments 4 Operators 5 Working with Strings, Arrays, and ArrayLists .................... 257 6 Flow Control and Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 .............................................. 165 ................................................ 223 Part II OCP 7 Assertions and Java 7 Exceptions ............................. 377 8 String Processing, Data Formatting, Resource Bundles . . . . . . . . . . . . . . 417 9 I/O and NIO 477 10 Advanced OO and Design Patterns 11 Generics and Collections .............................................. ............................ 541 .................................... 573 12 Inner Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681 13 Threads 713 14 Concurrency 15 JDBC A About the CD Index .................................................. .............................................. 785 ................................................... 841 .....

Words: 2596 - Pages: 11

Premium Essay

Soot Framework

...1. Introduction Java language is a hybrid language neither compiled, nor interpreted. The Java language aims to provide the speed of a compiled language, as well as portability of an interpreted language. Because a java code can run on any platform with Java Virtual Machine installed some drawbacks are introduced in terms speed of the execution compared to compiler languages such as C and C++. To make the java code as portable as it is, after compilation, the java code is converted into a bytecode. A bytecode is then interpreted by the Java Virtual Machine. To take advantage of Java language and to speed up performance, sophisticated optimization techniques must be utilized. Among many methods of optimizations, such as directly manipulating the bytecode, or annotating the bytecode, “The Soot Framework” is a well developed tool for optimizing the java bytecode to improve performance. The Soot Framework manipulates and modifies any java code and generates an optimized bytecode. The optimized bytecode can be run on any Java Virtual Machine. The soot framework is designed in a way that java code can be optimized module by module, or the whole program. 2. The project Our team consists of Shivshankar Kanawade, Batbold Myagmarjav, and Taeghyun Kang. The project is to research the possibility of automatically detecting shared variables in a concurrent program utilizing The Soot Framework. The team also seeks to identify the shared variable characteristics with the help of intermediate...

Words: 1674 - Pages: 7

Premium Essay

Prog Research Paper Unit 1

...1970’s Dartmouth Basic- was created by John Kemeny and Thomas Kurtz on May 1, 1964. Basic stands for Beginners All-purpose Symbolic Instruction Code . The aims of the BASIC system were: to develop a system and language that was friendly, easy to learn and use, to introduce computing as an adjunct to other courses, to operate an open access policy (i-programmer.info, 2010). Pascal- was created by Niklaus Wirth in 1972. He wanted a language suitable for teaching but for teaching computer science. It is best described as a simplified version of Algol. It was simplified both to make it easier to learn and to make it easier to compile (i-programmer.info, 2010). C- Was created by Ken Thompson iin the form of B and tweaked by Dennis Ritchie and renamed C in the 1970’s. It was the original code Unix was written in. Its function was for ease of use (i-programmer.info, 2010). Forth- was created by Charles H Moore in the 1970’s. The motivation behind this language was for both interactive execution of commands and the ability to compile sequences of commands for later execution (i-programmer.info, 2010). PLEX (Programming Language for EXchanges)- was created by Goran Hemdahl at Ericsson in the 1970’s. It is a special-purpose, pseudo-parallel and event-driven real-time programming language dedicated for AXE telephone exchanges, It is a propriatary language (i-programmer.info, 2010). 1980’s Atari ST BASIC – Atari commissioned MetaComCo to write a version of BASIC that...

Words: 1761 - Pages: 8

Free Essay

License

...BY SELECTING THE "ACCEPT" BUTTON AT THE BOTTOM OF THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE TERMS, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THE AGREEMENT AND THE DOWNLOAD OR INSTALL PROCESS WILL NOT CONTINUE. 1. DEFINITIONS. "Software" means the identified above in binary form, any other machine readable materials (including, but not limited to, libraries, source files, header files, and data files), any updates or error corrections provided by Sun, and any user manuals, programming guides and other documentation provided to you by Sun under this Agreement. “Programs” mean Java applets and applications intended to run on the Java 2 Platform, Standard Edition (J2SETM platform) platform on Java-enabled general purpose desktop computers and servers. 2. LICENSE TO USE. Subject to the terms and conditions of this Agreement, including, but not limited to the Java Technology Restrictions of the Supplemental License Terms, Sun grants you a non-exclusive, non-transferable, limited license without license fees to reproduce and use internally Software complete and unmodified for the sole purpose of running Programs. Additional licenses for developers and/or publishers are granted in the Supplemental License Terms. 3. RESTRICTIONS. Software is confidential and copyrighted. Title to Software and all associated intellectual...

Words: 2235 - Pages: 9

Free Essay

Deadlock Detector and Solver Research Paper

...Deadlock Detector and Solver Abstract Deadlock is one of the most serious and complex problems concerning the reliability of concurrent Java Programs. This paper presents Deadlock Detector and Solver which detects and resolves circular deadlocks of a java program. An agent written in C++ runs parallel to Java Program and monitors the Java Virtual Machine for deadlocks. If the deadlock is detected, the solver agent is used to resolve the deadlock . Introduction The onset of multicore processors forces the programmers to use multiple threads in order to take advantage of hardware parallelism. Java is one of the first languages to make multithreading available to developers. Along with advantages of concurrent systems and multithreading, there are some challenges involved. Java has inter-process communication model which means it has set of methods for exchange of data among multiple threads and processes. It is based on shared data structures and meshes well with hardware architectures in which multiple cores share memory. However Java is susceptible to deadlocks. Deadlock is a condition under which the entire program is halted as each thread in a set attempts to acquire a lock already held by another thread in a set. Java is susceptible to deadlocks because (a) threads exchanges information by sharing variables that they lock with mutex locks and (b) the locking mechanism interacts with other language features, such as aliasing. Consider a simple banking transaction example...

Words: 3641 - Pages: 15

Free Essay

Differences Between C++ and Java

...Difference between C++ and JAVA:- 1. Java has no preprocessor. If you want to use classes in another library, you say Import and the name of the library. There are no preprocessors-like macros. 2. there are no pointers in the sense of C and C++. When you create an object with new, you get back a reference. 3. there are no destructors in Java. There is no “scope” of a variable per seen, to indicate when the object’s lifetime is ended-the lifetime of an object is determined instead by the garbage collection. 4. There is no GOTO statement in JAVA. 5. No INLINE methods. The java compiler might decide it’s own to inline a method, but you don’t have much control over this. You can suggest inlining in java by using FINAL keyword for a method. However , inline functions are only suggestions to the C++ compiler as well. 6. Java has method overloading that works virtually identically to C++ function overloading. 7. Java doesn’t create exe file after the execution of a program. 8. 9. > In Java, the sizes of int, long etc. are rigidly defined in terms of 10. > bits. In C++ they are platform−dependent. 11. > 12. > In Java, the JVM behaves at if it were big endian, even if internally 13. > it is actually little−endian. In C++, the endianness is platform 14. > dependent. 15. > 16. > In Java, garbage collection of unreferenced objects is automatic. In 17. > C++, you manually manage memory. 18. > 19. > In Java, references are constrained to point only to the beginnings of ...

Words: 1720 - Pages: 7

Free Essay

Watermarking

...(compsac2000), Taipei, Taiwan, Oct. 2000. A Practical Method for Watermarking Java Programs Akito Monden Graduate School of Information Science, Nara Institute of Science and Technology akito-m@is.aist-nara.ac.jp Hajimu Iida Information Technology Center, Nara Institute of Science and Technology iida@is.aist-nara.ac.jp Ken-ichi Matsumoto Graduate School of Information Science, Nara Institute of Science and Technology matumoto@is.aist-nara.ac.jp Katsuro Inoue Graduate School of Engineering and Science, Osaka University inoue@ics.es.osaka-u.ac.jp Koji Torii Nara Institute of Science and Technology torii@is.aist-nara.ac.jp Abstract viewers[6][22]. As shown in figure 1, class viewers expose the internals of a class file, displaying class structure (fields and methods), thus, program users may know how to use that class file without asking to the original programmer. To make matters worse, program users can obtain source codes of a class file by using Java decompilers[15], such as SourceAgain[2], Jad[14], Mocha[24], etc. In this situation, the Java program developer’s intellectual property will be infringed if a program user steals anyone else’s class file and builds it into his/her own program without the original programmer's permission. We call this copyright infringement a program theft, which is one of the reasons why many companies hesitate to use Java in the real software development. Although we have copyright law to prohibit...

Words: 4625 - Pages: 19

Free Essay

Snmp Tool Usage

...I R E A S O N I N G S N M P L I B R A R Y iReasoning SNMP API User Guide Copyright © 2002-2014 iDeskCentric Inc., All Rights Reserved. The information contained herein is the property of iDeskCentric Inc. This document may not be copied, reproduced, reduced to any electronic medium or machine readable form, or otherwise duplicated, and the information herein may not be used, disseminated or otherwise disclosed, except with the prior written consent of iDeskCentric Inc. I R E A S O N I N G S N M P L I B R A R Y Table of Contents INTRODUCTION....................................................................................................................................................................................................................1 About this document ................................................................................................................................................................................................................1 Target Audience .......................................................................................................................................................................................................................1 INSTALLATION .....................................................................................................................................................................................................................2 Requirements..............

Words: 5569 - Pages: 23

Premium Essay

Java

...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