COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3: *Sample Development Loan Calculator.

Slides:



Advertisements
Similar presentations
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 6 Repetition Statements.
Advertisements

©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 3 Numerical Data.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 5 Selection Statements.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Four Defining Your Own Classes.
Microsoft Visual Basic: Reloaded Chapter Seven More on the Repetition Structure.
Chapter 3 Digital Logic Structures
Flow Charts, Loop Structures
Discussion 3. Questions? Term test? Lectures? Labs?
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 10 2D Arrays.
© 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.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 3 Sample Development Loan Calculator.
CS Sept 2006 Pick ups from chapters 4 and 5.
©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.
CS 1400 Pick ups from chapters 4 and 5. if-else-if Chained if statements can be useful for menus… Enter savings plan choice: (A) economy rate (B) saver.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Topics Creating DFD Physical and logical DFD Event driven modeling
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3: Numeric Data *Variables *Numeric data.
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Sample Development: HiLo Game *Chapter 6: Console.
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Four: Defining Your Own Classes *Instantiable.
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.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Spring 2005 Chapter 8  Errors and Exceptions Throwable class.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Slide 7B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
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.
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.
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3: IO *Standard Output *Formatting Decimal.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Sample Development Revisiting the Loan.
Moving To Code 3 More on the Problem-Solving Process §The final step in the problem-solving process is to evaluate and modify (if necessary) the program.
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.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 6 – Car Payment Calculator Application: Introducing.
CS1101X: Programming Methodology Recitation 2 Classes.
Copyright © 2008, The McGraw-Hill Companies, Inc.McGraw-Hill/Irwin Chapter Four Systems Design: Process Costing.
Software Engineering 1 (Chap. 1) Object-Centered Design.
Chapter 8 Traffic-Analysis Techniques. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-1.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 9 Car Payment Calculator Application Introducing the Do While...Loop and Do Until...Loop.
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.
Chapter 31 The Cost of Credit. Interest Calculations - Determining Factors  Interest Rates – The percentage that is applied to your debt expressed as.
Contemporary Engineering Economics, 6 th edition Park Copyright © 2016 by Pearson Education, Inc. All Rights Reserved Equivalence Calculations with Effective.
©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.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 6 – Car Payment Calculator Application: Introducing.
©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.
Writing JavaScript Functions. Goals By the end of this unit, you should understand … How to breakdown applications into individual, re-usable modules.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Selection Statements Selection Switch Conditional.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Image Slides.
CS110 Programming Language I Lab 4: Control Statements I Computer Science Department Spring 2014.
Calculating mortgage payments (Paying back your student loans)
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Getting Started with Java: Object declaration and creation Primitive.
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.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Fifteen Approximate Analysis of Indeterminate Structures.
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
Intro to OOP with Java, C. Thomas Wu Numerical Data
Tutorial 9 - Car Payment Calculator Application Introducing the while Repetition Statement Outline 9.1 Test-Driving the Car Payment Calculator Application.
Data types, Expressions and assignment, Input from User
Defining Your Own Classes
Chapter 3 Numerical Data
Presentation transcript:

COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3: *Sample Development Loan Calculator

COMPSCI 125 Spring 2005 ©The McGraw-Hill Companies,Inc. Permission required for reproduction or display. Sample Development: Loan Calculator *Problem Statement Write a loan calculator that computes monthly payments and total payments for a loan based on loan amount, annual interest rate and loan period *Program flow: Get three input values: loanAmount, interestRate, and loanPeriod. Compute the monthly and total payments. Output the results. *What classes do we need?

COMPSCI 125 Spring 2005 ©The McGraw-Hill Companies,Inc. Permission required for reproduction or display. UML Diagram for Loan Calculator

COMPSCI 125 Spring 2005 ©The McGraw-Hill Companies,Inc. Permission required for reproduction or display. Loan Calculator *Steps in implementation: 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.

COMPSCI 125 Spring 2005 ©The McGraw-Hill Companies,Inc. Permission required for reproduction or display. Loan Calculator: Step 1 *Input Three Data Values *Choices: Call showInputDialog method for each of three input values: Use a Scanner *Question: What format should the data be in? loan amount - use double for dollars and cents annual interest rate - percentage needs to be a double loan period - usually an even number of years so use an int

COMPSCI 125 Spring 2005 ©The McGraw-Hill Companies,Inc. Permission required for reproduction or display. Step 2: Output Values *We must determine an appropriate format to display the computed results, so that the results will be comprehensible to the user. How much information do we need to show? *For now, put placeholders in the position the actual results will go

COMPSCI 125 Spring 2005 ©The McGraw-Hill Companies,Inc. Permission required for reproduction or display. Possible D isplay Formats *Only the computed values displayed Monthly payment:$ Total payment:$ * Input values displayed. For Loan Amount:$ Annual Interest Rate:12% Loan Period(years):10 Monthly payment is$ Total payment is$

COMPSCI 125 Spring 2005 ©The McGraw-Hill Companies,Inc. Permission required for reproduction or display. Step 3: Compute Loan Amount *Complete the program by implementing the formula derived in the design phase. *We must convert the annual interest rate (input value) to a monthly interest rate (per the formula) the loan period to the number of monthly payments.

COMPSCI 125 Spring 2005 ©The McGraw-Hill Companies,Inc. Permission required for reproduction or display. Step 4: Finishing Up *Finalize the program by making necessary modifications or additions. *We will add a program description and format the monthly and total payments to two decimal places.