Premium Essay

Cis 279 Unit 3 Assignment

Submitted By
Words 458
Pages 2
/* Amanda Kong ** September 26, 2014 ** CIS 279, Module 4 ** Programming Assignment 4.3 ** Programming Exercise from 7.12 ** ** Purpose: Create a program that calculates the tax from user's input of filling ** status and taxable income. The tax rates are in an array of doubles and the ** tax brackets are in a 2D array of ints. */

import java.util.Scanner;

public class Assign4_3 {

public static void main(String[] args) {

double taxableIncome; int fillingStatus;

Scanner input = new Scanner(System.in); System.out .print("(0-single filer, 1-married jointly or qualifying widow(er),"); System.out.println("2-married separately, 3-head of household)"); System.out.print("Enter the filling status: "); fillingStatus = …show more content…
System.out.print("Enter the taxable income: "); taxableIncome = input.nextDouble(); double tax = taxCalculation(taxableIncome, fillingStatus); System.out.printf("Tax is %.2f", tax);

}

// taxCalculations takes a double representing income and an int for filing // status // the method then returns a double after calculating the taxable income public static double taxCalculation(double income, int status) {

double tax = 0;

// rates and brackets copied from book double[] rates = { 0.10, 0.15, 0.25, 0.28, 0.33, 0.35 };

int[][] brackets = { { 8350, 33950, 82250, 171550, 372950 }, // …show more content…
// if income is less than the limit of the first bracket // just multiply income by the first rate, else // multiply bracket limit and first rate if (income <= brackets[status][0]) { tax += income * rates[0]; // leave method and return tax return tax; }

Similar Documents

Premium Essay

Jessica

...实用审计英语词汇 1 ability to perform the work 能力履行工作 2 acceptance procedures 承兑程序过程 3 accountability 经管责任,问责性 4 accounting estimate 会计估计 5 accounts receivable listing 应收帐款挂牌 6 accounts receivable 应收账款 7 accruals listing 应计项目挂牌 8 accruals 应计项目 9 accuracy 准确性 10 adverse opinion 否定意见 11 aged analysis 年老的分析(法,学)研究 12 agents 代理人 13 agreed-upon procedures 约定审查业务 14 analysis of errors 错误的分析(法,学)研究 15 anomalous error 反常的错误 16 appointment ethics 任命伦理学 17 appointment 任命 18 associated firms 联合的坚挺 19 association of chartered certified accounts(ACCA) 特计的证(经执业的结社 (ACCA) 20 assurance engagement 保证债务 21 assurance 保证 22 audit 审计,审核,核数 23 audit acceptance 审计承兑 24 audit approach 审计靠近 25 audit committee 审计委员会,审计小组 26 ahudit engagement 审计业务约定书 27 audit evaluation 审计评价 28 audit evidence 审计证据 29 audit plan 审计计划 30 audit program 审计程序 31 audit report as a means of communication 审计报告如一个通讯方法 32 audit report 审计报告 33 audit risk 审计风险 34 audit sampling 审计抽样 35 audit staffing 审计工作人员 36 audit timing 审计定时 37 audit trail 审计线索 38 auditing standards 审计准则 39 auditors duty of care...

Words: 2307 - Pages: 10

Free Essay

Hostel Management

...------------------------------------------------- Data compression From Wikipedia, the free encyclopedia   (Redirected from Video compression) "Source coding" redirects here. For the term in computer programming, see Source code. In digital signal processing, data compression, source coding,[1] or bit-rate reduction involves encoding information using fewer bits than the original representation.[2]Compression can be either lossy or lossless. Lossless compression reduces bits by identifying and eliminating statistical redundancy. No information is lost in lossless compression. Lossy compression reduces bits by identifying unnecessary information and removing it.[3] The process of reducing the size of a data file is referred to as data compression. In the context of data transmission, it is called source coding (encoding done at the source of the data before it is stored or transmitted) in opposition to channel coding.[4] Compression is useful because it helps reduce resource usage, such as data storage space or transmission capacity. Because compressed data must be decompressed to use, this extra processing imposes computational or other costs through decompression; this situation is far from being a free lunch. Data compression is subject to a space–time complexity trade-off. For instance, a compression scheme for video may require expensive hardware for the video to be decompressed fast enough to be viewed as it is being decompressed, and the option to decompress the video...

Words: 12347 - Pages: 50

Free Essay

Advanced Algorithms

...Vijay V. Vazirani College of Computing Georgia Institute of Technology Copyright c 2001 Approximation Algorithms Springer Berlin Heidelberg NewYork Barcelona Hong Kong London Milan Paris Singapore Tokyo To my parents Preface Although this may seem a paradox, all exact science is dominated by the idea of approximation. Bertrand Russell (1872–1970) Most natural optimization problems, including those arising in important application areas, are NP-hard. Therefore, under the widely believed conjecture that P = NP, their exact solution is prohibitively time consuming. Charting the landscape of approximability of these problems, via polynomial time algorithms, therefore becomes a compelling subject of scientific inquiry in computer science and mathematics. This book presents the theory of approximation algorithms as it stands today. It is reasonable to expect the picture to change with time. The book is divided into three parts. In Part I we cover a combinatorial algorithms for a number of important problems, using a wide variety of algorithm design techniques. The latter may give Part I a non-cohesive appearance. However, this is to be expected – nature is very rich, and we cannot expect a few tricks to help solve the diverse collection of NP-hard problems. Indeed, in this part, we have purposely refrained from tightly categorizing algorithmic techniques so as not to trivialize matters. Instead, we have attempted to capture, as accurately as possible, the individual character...

Words: 140657 - Pages: 563

Free Essay

Management

...Op"erations Research This page intentionally left blank Copyright © 2007, 2005 New Age International (P) Ltd., Publishers Published by New Age International (P) Ltd., Publishers All rights reserved. No part of this ebook may be reproduced in any form, by photostat, microfilm, xerography, or any other means, or incorporated into any information retrieval system, electronic or mechanical, without the written permission of the publisher. All inquiries should be emailed to rights@newagepublishers.com ISBN (13) : 978-81-224-2944-2 PUBLISHING FOR ONE WORLD NEW AGE INTERNATIONAL (P) LIMITED, PUBLISHERS 4835/24, Ansari Road, Daryaganj, New Delhi - 110002 Visit us at www.newagepublishers.com PREFACE I started my teaching career in the year 1964. I was teaching Production Engineering subjects till 1972. In the year 1972 I have registered my name for the Industrial Engineering examination at National Institution of Industrial Engineering, Bombay. Since then, I have shifted my field for interest to Industrial Engineering subjects and started teaching related subjects. One such subject is OPERATIONS RESEARCH. After teaching these subjects till my retirement in the year 2002, it is my responsibility to help the students with a book on Operations research. The first volume of the book is LINEAR PORGRAMMING MODELS. This was published in the year 2003. Now I am giving this book OPERATIONS RESEARCH, with other chapters to students, with a hope that it will help them to understand...

Words: 242596 - Pages: 971

Premium Essay

Operational Performance Measurement

...Decision Making,” by Kennard T. Wing, Management Accounting Quarterly (Winter 2000), pp. 1-9. This article points out that oversimplifications of fixed and variable costs can result in the standard costing system not being used or, if used, can lead to bad decisions. That is, misclassifications of cost behavior patterns make variance analyses “paper tigers.” For variance reporting to be useful, financial managers need to develop cost models that reflect how costs actually behave. Discussion Questions: 1. Describe the implications for variance analysis of analyzing a semi-variable cost as either a variable or fixed cost. 2. Describe the implications for variance analysis of analyzing a step-fixed cost as either a variable or fixed cost. 3. Describe the implications on operating decisions of analyzing an operation with mixed costs as either a variable or fixed cost. 15-2: “Variance Analysis Refines Overhead Cost Control,” by J. C. Cooper and J. D. Suver, Healthcare Financial Management (February 1992). This article attempts to analyze the full costs of selected medical procedures using examples from a healthcare organization. A key feature of the analysis is how the overhead variances are handled, and in...

Words: 28719 - Pages: 115

Free Essay

Kkhksanfklhaklfh

.... . . . . . . . . . 1.7 The C++ memory model . . . . . . . . . . 1.8 The C++ object model . . . . . . . . . . . 1.9 Program execution . . . . . . . . . . . . . 1.10 Multi-threaded executions and data races 1.11 Acknowledgments . . . . . . . . . . . . . . 2 Lexical conventions 2.1 Separate translation . . . . 2.2 Phases of translation . . . . 2.3 Character sets . . . . . . . . 2.4 Trigraph sequences . . . . . 2.5 Preprocessing tokens . . . . 2.6 Alternative tokens . . . . . 2.7 Tokens . . . . . . . . . . . . 2.8 Comments . . . . . . . . . . 2.9 Header names . . . . . . . . 2.10 Preprocessing numbers . . . 2.11 Identifiers . . . . . . . . . . 2.12 Keywords . . . . . . . . . . 2.13 Operators and punctuators 2.14 Literals . . . . . . . . . . . 3 Basic 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 Contents concepts Declarations and definitions One definition rule . . . . . Scope . . . . . . . . . . . . Name lookup . . . . . . . . Program and linkage . . . . Start and termination . . . Storage duration . . . . . . Object lifetime . . . . . . . Types . . . . . . . . . . . . Lvalues and rvalues . . . . . ii x xiv 1 1 1 2 5 5 6 6 7 8 11 14 16 16 16 17 18 19 20 20 20 20 21 21 22 22 23 32 32 34 36 42 55 58 62 65 69 74 ii . . . . . . . . . . ....

Words: 144120 - Pages: 577

Premium Essay

Evidence Based Medicine Research

...Matt Fowler RES 297 11/12/13 Evidence Based Medicine Research Assignment 1) In Vitro Evaluation of Heat and Moisture Exchangers Designed for Spontaneously Breathing Tracheostomized Patients Claudia Brusasco, MD⇑ Dipartimento di Scienze Chirurgiche e Diagnostiche Integrate, Sezione Anestesia e Rianimazione Francesco Corradi, MD PhD Dipartimento Cardio-Nefro-Polmonare, Sezione Terapia Intensiva Cardiochirurgica, Azienda Ospedaliero Universitaria di Parma, Italy. Maria Vargas, MD Dipartimento di Scienze Chirurgiche e Diagnostiche Integrate, Sezione Anestesia e Rianimazione Dipartimento di Anestesia e Terapia Intensiva, Università di Napoli Federico II, Napoli, Italy. Margherita Bona, MD Dipartimento di Scienze Chirurgiche e Diagnostiche Integrate, Sezione Anestesia e Rianimazione Federica Bruno, MD Dipartimento di Scienze Chirurgiche e Diagnostiche Integrate, Sezione Anestesia e Rianimazione Maria Marsili, MD Dipartimento di Scienze Chirurgiche e Diagnostiche Integrate, Sezione Anestesia e Rianimazione Francesca Simonassi, MD Dipartimento di Scienze Chirurgiche e Diagnostiche Integrate, Sezione Anestesia e Rianimazione Gregorio Santori, MD Dipartimento di Scienze Chirurgiche e Diagnostiche Integrate, Università Degli Studi di Genova, Istituto di Ricovero e Cura a Carattere Scientifico, Azienda Ospedaliera Universitaria San Martino, Genova, Italy. Paolo Severgnini, MD Dipartimento Scienza ed Alta Tecnologia, Sezione Ambiente Salute Sicurezza...

Words: 4847 - Pages: 20

Free Essay

Magt

...i Computational Complexity: A Modern Approach Draft of a book: Dated January 2007 Comments welcome! Sanjeev Arora and Boaz Barak Princeton University complexitybook@gmail.com Not to be reproduced or distributed without the authors’ permission This is an Internet draft. Some chapters are more finished than others. References and attributions are very preliminary and we apologize in advance for any omissions (but hope you will nevertheless point them out to us). Please send us bugs, typos, missing references or general comments to complexitybook@gmail.com — Thank You!! DRAFT ii DRAFT About this book Computational complexity theory has developed rapidly in the past three decades. The list of surprising and fundamental results proved since 1990 alone could fill a book: these include new probabilistic definitions of classical complexity classes (IP = PSPACE and the PCP Theorems) and their implications for the field of approximation algorithms; Shor’s algorithm to factor integers using a quantum computer; an understanding of why current approaches to the famous P versus NP will not be successful; a theory of derandomization and pseudorandomness based upon computational hardness; and beautiful constructions of pseudorandom objects such as extractors and expanders. This book aims to describe such recent achievements of complexity theory in the context of the classical results. It is intended to both serve as a textbook as a reference for self-study. This means...

Words: 210134 - Pages: 841

Free Essay

Fuzzy Control

...mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Printed simultaneously in Canada. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and AddisonWesley was aware of a trademark claim, the designations have been printed in initial caps or in all caps. MATLAB is a registered trademark of The MathWorks, Inc. Library of Congress Cataloging-in-Publication Data Passino, Kevin M. Fuzzy control / Kevin M. Passino and Stephen Yurkovich. p. cm. Includes bibliographical references and index. ISBN 0-201-18074-X 1. Automatic control. 2. Control theory. 3. Fuzzy systems. I. Yurkovich, Stephen. II. Title. TJ213.P317 1997 629.8’9--DC21 97-14003 CIP Instructional Material Disclaimer: The...

Words: 211473 - Pages: 846

Premium Essay

Adidas

...77 Other Businesses Strategy 86 Global Operations 94 Research and Development 99 Employees105 Sustainability111 G R O U P M A N A G E M E N T R E P O R T: This report contains the Group Management Report of the adidas Group, comprising adidas AG and its consolidated subsidiaries, and the Management Report of adidas AG. 1 Group Management Report – Our Group adidas Group Worldwide / 02.1  / adidas Group Worldwide Percentage of Group sales 26  23  Western Europe North America 8 3 1 4 2 13  6 12  Greater China 7 10 European Emerging Markets 5 9 20 13 66 11  15  Latin America Other Asian Markets 1 adidas North America,  Portland/Oregon, USA 6 adidas International Trading,  Amsterdam, Netherlands 2 TaylorMade-adidas Golf Headquarters,  Carlsbad/California, USA 7 adidas Group Headquarters,  Herzogenaurach, Germany 3 Reebok-CCM Hockey Headquarters,  Montreal/Quebec, Canada 8 adidas Group Russia, Moscow, Russia 9 4 Reebok International Headquarters,  The Rockport Company Headquarters, Canton/Massachusetts, USA adidas Global Sourcing,  Hong Kong, China 10 adidas Group China, Shanghai, China 11 adidas Group Japan, Tokyo, Japan 5 adidas Group Latin America,  Panama City, Panama adidas Group   /  2013 Annual Report 11 2 Group Management Report – Our Group Major Sporting...

Words: 71297 - Pages: 286

Free Essay

Most Harmless Econometrics

...Mostly Harmless Econometrics: An Empiricist’ Companion s Joshua D. Angrist Massachusetts Institute of Technology Jörn-Ste¤en Pischke The London School of Economics March 2008 ii Contents Preface Acknowledgments Organization of this Book xi xiii xv I Introduction 1 3 9 10 12 16 1 Questions about Questions 2 The Experimental Ideal 2.1 2.2 2.3 The Selection Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Random Assignment Solves the Selection Problem . . . . . . . . . . . . . . . . . . . . . . . . Regression Analysis of Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II The Core 19 21 22 23 26 30 36 38 38 44 47 51 51 3 Making Regression Make Sense 3.1 Regression Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 3.1.2 3.1.3 3.1.4 3.2 Economic Relationships and the Conditional Expectation Function . . . . . . . . . . . Linear Regression and the CEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Asymptotic OLS Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Saturated Models, Main E¤ects, and Other Regression Talk . . . . . . . . . . . . . . . Regression and Causality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 3.2.2 3.2.3 The Conditional Independence Assumption . . . . . . . . . . . . . . . . . . . . . . . . The Omitted Variables Bias Formula . ....

Words: 114745 - Pages: 459

Premium Essay

Daimler-Chrysler Merger Portrayal

...directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, e-mail: permissions@elsevier.com.uk. You may also complete your request on-line via the Elsevier homepage (http://elsevier.com), by selecting “Customer Support” and then “Obtaining Permissions.” Recognizing the importance of preserving what has been written, Elsevier prints its books on acid-free paper whenever possible. Library of Congress Cataloging-in-Publication Data Rao, Madanmohan. KM tools and techniques : practitioners and experts evaluate KM solutions / Madanmohan Rao. p. cm. Includes bibliographical references and index. ISBN 0-7506-7818-6 (alk. paper) 1. Knowledge management. 2. Organizational learning. 3. Knowledge management—Data processing. 4. Management information systems. 5. Information resources management. 6. Database management. I. Title Knowledge management tools and techniques. II. Title. HD30.2.R356 2004 658.4¢038—dc22 2004050698 British Library...

Words: 182966 - Pages: 732

Free Essay

Business Process Management

...Mendling Stefan Tai (Eds.) Business Process Management 8th International Conference, BPM 2010 Hoboken, NJ, USA, September 13-16, 2010 Proceedings 13 Volume Editors Richard Hull IBM Research, Thomas J. Watson Research Center 19 Skyline Drive, Hawthorne, NY 10532, USA E-mail: hull@us.ibm.com Jan Mendling Humboldt-Universität zu Berlin, Institut für Wirtschaftsinformatik Unter den Linden 6, 10099 Berlin, Germany E-mail: contact@mendling.com Stefan Tai Karlsruhe Institute of Technology (KIT) Englerstraße 11, Gebäude 11.40, 76131 Karlsruhe, Germany E-mail: stefan.tai@kit.edu Library of Congress Control Number: 2010933361 CR Subject Classification (1998): D.2, F.3, D.3, D.1, D.2.4, F.2 LNCS Sublibrary: SL 3 – Information Systems and Application, incl. Internet/Web and HCI ISSN ISBN-10 ISBN-13 0302-9743 3-642-15617-7 Springer Berlin Heidelberg New York...

Words: 147474 - Pages: 590

Premium Essay

Econometrics Solutions Wooldrige

...data sets that have both a cross-sectional and time dimension. I spend almost an entire lecture talking about the problems inherent in drawing causal inferences in the social sciences. I do this mostly through the agricultural yield, return to education, and crime examples. These examples also contrast experimental and nonexperimental data. Students studying business and finance tend to find the term structure of interest rates example more relevant, although the issue there is testing the implication of a simple theory, as opposed to inferring causality. I have found that spending time talking about these examples, in place of a formal review of probability and statistics, is more successful (and more enjoyable for the students and me). 3 CHAPTER 2 TEACHING NOTES This is the chapter where I expect students to follow most, if not all, of the algebraic derivations. In class I like to derive at least the unbiasedness of the OLS slope coefficient, and usually I derive the variance. At a minimum, I talk about the factors affecting the variance. To simplify the notation, after I emphasize the assumptions in the population model, and assume random sampling, I just condition on the values of the explanatory variables in the sample. Technically, this is justified by random...

Words: 73034 - Pages: 293

Premium Essay

Wooldridge - Introductory Econometrics 2nd Ed. Solutions

...data sets that have both a cross-sectional and time dimension. I spend almost an entire lecture talking about the problems inherent in drawing causal inferences in the social sciences. I do this mostly through the agricultural yield, return to education, and crime examples. These examples also contrast experimental and nonexperimental data. Students studying business and finance tend to find the term structure of interest rates example more relevant, although the issue there is testing the implication of a simple theory, as opposed to inferring causality. I have found that spending time talking about these examples, in place of a formal review of probability and statistics, is more successful (and more enjoyable for the students and me). 3 CHAPTER 2 TEACHING NOTES This is the chapter where I expect students to follow most, if not all, of the algebraic derivations. In class I like to derive at least the unbiasedness of the OLS slope coefficient, and usually I derive the variance. At a minimum, I talk about the factors affecting the variance. To simplify the notation, after I emphasize the assumptions in the population model, and assume random sampling, I just condition on the values of the explanatory variables in the sample. Technically, this is justified by random sampling...

Words: 73034 - Pages: 293