©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter 3 - 1 Chapter 3 Sample Development Loan Calculator.

Slides:



Advertisements
Similar presentations
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 3 Numerical Data.
Advertisements

Sound Card Calibration. Determine computer audio device. Determine computer audio device. In XP, go to Control Panel – Sounds & Audio Devices – Audio.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Four Defining Your Own Classes.
Chapter 13 Control Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Control Structures Conditional.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Four Trusses.
McGraw-Hill/Irwin ©2011 The McGraw-Hill Companies, All Rights Reserved Chapter 10 Simple Interest.
Microsoft Visual Basic: Reloaded Chapter Seven More on the Repetition Structure.
© 2005 The McGraw-Hill Companies, Inc., All Rights Reserved McGraw-Hill/Irwin Slide 1 Fin 5413 Introduction Loan Amortization Use of Financial Calculator.
Flow Charts, Loop Structures
Chapter Ten SIMPLE INTEREST Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin.
Discussion 3. Questions? Term test? Lectures? Labs?
Title Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 18 Image Slides.
Insertion Sort.
© 2003 The McGraw-Hill Companies, Inc. All rights reserved. Working with Financial Statements Chapter Three.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Development Software Life Cycle UML Diagrams.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 6: Odds and Ends  Formatted Output  Random numbers.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter N - 1 Polymorphism.
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Four: Defining Your Own Classes *Instantiable.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Defining Your Own Classes Part 1 Animated.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Numerical Data.
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3: *Sample Development Loan Calculator.
Slide 7B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Microsoft Excel How to do a quick loan using PMT.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 4 Image Slides.
Chapter 4 MATLAB Programming Logical Structures Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Copyright © The McGraw-Hill Companies, Inc
بسم الله الرحمن الرحيم CPCS203: Programming II. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display., Modifications by Dr.
Chapter 3b Standard Input and Output Sample Development.
Title Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Image Slides.
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3: IO *Standard Output *Formatting Decimal.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Sample Development Revisiting the Loan.
Chapter Four Defining Your Own Classes continued.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Engineering Software Development Process.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Image Slides.
CS1101X: Programming Methodology Recitation 2 Classes.
Chapter 8 Traffic-Analysis Techniques. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-1.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Exploring Formulas.
© 2009 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Career Education Computers in the Medical Office Chapter 3: Introduction to.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Numerical Data Animated Version.
CHAPTER 13 Multiple Integrals Slide 2 © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 13.1DOUBLE INTEGRALS 13.2AREA,
Loop Exercise 1 Suppose that you want to take out a loan for $10,000, with 18% APR, and you're willing to make payments of $1,200/month. How long will.
General, Organic, and Biological Chemistry Fourth Edition Karen Timberlake 1.6 Significant Figures in Calculations Chapter 1 Chemistry and Measurements.
Chapter 10 Creating Pop-Up Windows, Adding Scrolling Messages, and Validating Forms HTML5 & CSS 7 th Edition.
Chapter 10 Simple Interest McGraw-Hill/Irwin Copyright © 2011 by the McGraw-Hill Companies, Inc. All rights reserved.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 3 Numerical Data.
CS1101X: Programming Methodology Recitation 1 Java Basics Numerical Data.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 3: Numerical Data Manipulating Numbers Variables.
17.16 Synthesis of Thyroid Hormone (TH) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Slide number: 1.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Chapter 5 Percents.
Programming with Visual C++: Concepts and Projects Chapter 2B: Reading, Processing and Displaying Data (Tutorial)
Writing JavaScript Functions. Goals By the end of this unit, you should understand … How to breakdown applications into individual, re-usable modules.
© 2009 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Career Education Chapter 8: Posting Insurance Payments and Creating Patient.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Image Slides.
Calculating mortgage payments (Paying back your student loans)
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 24.1 Test-Driving the Enhanced Car Payment.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Eight Live Load Forces: Influence Lines for Determinate.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Three Statics of Structures Reactions.
Chapter 2 Excel Fundamentals Logical IF (Decision) Statements Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Fifteen Approximate Analysis of Indeterminate Structures.
1 Project 4: Computing Distance. 222 Computing Distance Write a program to compute the distance between two points. Recall that the distance between the.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7.
Chapter 13 Transportation Demand Analysis. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display
BY Sandi Tschritter. Take the prescription for the patient. Verify that all the necessary information is correct. - name, address, phone number - insurance.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Enhanced Car Payment Calculator Application Introducing Exception Handling.
Chapter 5, section 2 Calculating interest.
Intro to OOP with Java, C. Thomas Wu Numerical Data
Chapter 4 MATLAB Programming
Chapter 4 MATLAB Programming
Defining Your Own Classes
Chapter 3 Numerical Data
Presentation transcript:

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 3 Sample Development Loan Calculator

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Problem Statement Problem statement: Write a loan calculator program that computes both monthly and total payments for a given loan amount, annual interest rate, and loan period.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Overall Plan Tasks: –Get three input values: loanAmount, interestRate, and loanPeriod. –Compute the monthly and total payments. –Output the results.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Required Classes

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Development Steps We will develop this program in four steps: 1.Start with code to accept three input values. 2.Add code to output the results. 3.Add code to compute the monthly and total payments. 4.Update or modify code and tie up any loose ends.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Step 1 Design Call the showInputDialog method to accept three input values: –loan amount, –annual interest rate, –loan period. Data types are InputFormatData Type loan amountdollars and centsdouble annual interest ratein percent (e.g.,12.5) double loan periodin yearsint

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Step 1 Test In the testing phase, we run the program multiple times and verify that –we can enter three input values –we see the entered values echo-printed correctly on the standard output window

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Step 2 Design We will consider the display format for out. Two possibilities are (among many others)

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Step 2 Test We run the program numerous times with different types of input values and check the output display format. Adjust the formatting as appropriate

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Step 3 Design The formula to compute the geometric progression is the one we can use to compute the monthly payment. The formula requires the loan period in months and interest rate as monthly interest rate. So we must convert the annual interest rate (input value) to a monthly interest rate (per the formula), and the loan period to the number of monthly payments.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Step 3 Test We run the program numerous times with different types of input values and check the results.

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Step 4: Finalize We will add a program description We will format the monthly and total payments to two decimal places using DecimalFormat. –Better yet, use the NumberFormat class