Preview

Hrm 531 Week 2 Assignment

Powerful Essays
Open Document
Open Document
667 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Hrm 531 Week 2 Assignment
/*

Change request 4 - week 2 Assignment
Requestor: Ninfa Pendleton - Rapid City, SD
Description: Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage. Allow the user to loop back and enter new data or quit. Please insert comments in the program to document the program.
Version: 2.0.1

*/ import java.io.*; import java.text.DecimalFormat; import java.awt.*; import java.awt.event.*; import java.awt.Color; import java.awt.Graphics; import javax.swing.*; import java.applet.Applet; import java.util.*;

public class WK2MortCalcVer_2
…show more content…
} // Calculates data input from GUI public void clickCalculatePayment() { // GUI input double mortgageAmount = Double.parseDouble( mortgageAmountTextField.getText() ); double mortgageInterest = Double.parseDouble( mortgageInterestTextField.getText() ); int mortgageTerm = Integer.parseInt( mortgageTermTextField.getText() ); // new version of the loan mortgageLoan loan = new mortgageLoan( mortgageAmount, mortgageInterest, mortgageTerm ); // visual output to GUI based on user input response.setText( " Your Mortgage Loan Amount: " + dcm.format( mortgageAmount ) + "\n"); response.append( " Interest Rate: " + mortgageInterest + "\n" ); response.append( " Term of Mortgage Loan: " + ( mortgageTerm * 12 ) + " months\n" ); response.append( " Monthly Mortgage Payment: " + dcm.format( loan.mortgagePaymentCalculation() ) + "\n" ); } // new main public static void main( String[] args ) { WK2MortCalcVer_2 newloan = new WK2MortCalcVer_2(); // new instance of class }
}

class mortgageLoan
{
double mortgageAmount; double monthlyPayment; double mortgageInterest; //double monthyInterest = mortgageInterest/12; int

You May Also Find These Documents Helpful

  • Good Essays

    The applicant should submit an updated copy of its direct rate agreement letter with the HHS.…

    • 870 Words
    • 4 Pages
    Good Essays
  • Better Essays

    Fin221 Preflight

    • 9377 Words
    • 38 Pages

    What is the appropriate interest rate and number of time periods to use to find the monthly payment for a 30-year mortgage at 6% compounded monthly?…

    • 9377 Words
    • 38 Pages
    Better Essays
  • Good Essays

    Hrm/531 Week 3 Assignment

    • 374 Words
    • 2 Pages

    If upper management is interested in exploring more technologically advanced and interactive toys within my core brand, I would approach the process with an open mind, including a creativity aspect to accomplish this goal. Researching both current and past successes and failures with technologically advanced toys within the company would be the first step. To eliminate competing with yourself or repeating errors made in the past, research is always key (Ferrell & Hartline, 2014, p. 16). Next, creating an outline of the toys we currently produce and evaluating them to determine the best possible results for implementing the new technology. While doing so, this would be a great time to develop our target group for sales. Are we creating a product for teenagers, or tweens? This information will prove vital in determining the features to include or exclude during the development phase. While reviewing the current inventory, designers would be asked to assist with interfacing modifications to current products, to determine the pros and cons of making adjustments. With safety being the number one priority, we must ensure that the product maintains its highest level of standard. If deemed that the modifications will not be suitable for our core brand, I would create an alternative solution to the request from upper management, which may involve an entirely new product. If deemed suitable, the next phase would be testing the product and then preparing for the marketing campaign. Establishing an effective marketing campaign is a…

    • 374 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    HRM 4280 Project

    • 2675 Words
    • 11 Pages

    Trainees will be introduced to the trainer and will participate in group discussion and become comfortable with fellow participants they will be working with.…

    • 2675 Words
    • 11 Pages
    Satisfactory Essays
  • Powerful Essays

    * Use a graphical interface to allow a user to input a principle amount, interest rate…

    • 763 Words
    • 4 Pages
    Powerful Essays
  • Satisfactory Essays

    Week 8 FIN111

    • 422 Words
    • 2 Pages

    Where n = no. of periods, i = interest rate, FV= future value, PV = present value (principal)…

    • 422 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Minesweeper

    • 300 Words
    • 2 Pages

    import java.awt. BorderLayout; import java.awt. GridLayout; import java.awt.event. InputEvent; import java.io. DataInputStream;…

    • 300 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    To develop a date class in java similar to the one in java.util.package using java doc commands.…

    • 1459 Words
    • 6 Pages
    Good Essays
  • Good Essays

    1. Write a program in Java that allows the user to enter a number and then display its Pascal’s Triangle -The triangle is bordered by ones on the right and left sides, and each interior entry is the sum of the two entries above.…

    • 1391 Words
    • 6 Pages
    Good Essays
  • Powerful Essays

    Ameriquest

    • 1652 Words
    • 7 Pages

    Cited: "Ameriquest Mortgage." Wikipedia, The Free Encyclopedia. 7 Apr 2007, 21:40 UTC. Wikimedia Foundation, Inc. 22 May 2007 <http://en.wikipedia.org/w/index.php?title=Ameriquest_Mortgage&oldid=121055539>.…

    • 1652 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    java

    • 571 Words
    • 3 Pages

    System.out.println("The clerk's number is" + clerk.getEmpNum() + " and the friver's number is " + driver.getEmpNum());…

    • 571 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Java App

    • 278 Words
    • 2 Pages

    import javax.swing. *; import java.awt. *; import java.awt.event. *; public class adsubprodquoRadButton extends JFrame implements ActionListener { private JButton answer, clr; private JRadioButton r1,r2,r3,r4; //private JCheckBox c1; private JTextField txt1,txt2; //private JLabel lbl1; public adsubprodquoRadButton() {//CONSTRUCTOR Container p = getContentPane(); JPanel jp = new JPanel(); //JPanel jp1 = new JPanel(); ButtonGroup bg = new ButtonGroup(); //ButtonGroup bg1 = new ButtonGroup(); p.add(jp);…

    • 278 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Java Environments

    • 1345 Words
    • 14 Pages

    CSCI 1101 Computer Science II Assignment No. 2 Date Given: January 31, 2011 Due: February 18, 2011 David Mongrain B00554371 Parking ticket simulator ParkedCar.java //Object representation of a car. public class ParkedCar { private String carMake; private String carColor; private int carLicense; //Constructs the car, with given car make, car color, and car license.…

    • 1345 Words
    • 14 Pages
    Satisfactory Essays
  • Powerful Essays

    Actuarial Report

    • 1139 Words
    • 5 Pages

    6) After 5 investment models each of the variable mortgage loan (with an initial interest rate of 7.5% convertible monthly) and the fixed interest mortgage loan (fixed interest at 8.2%); the total repayments averaged:…

    • 1139 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    A home loan is usually repaid in monthly installments. Each monthly installment consists of a principal repayment and interest payment. The amount of the monthly installment depends on the loan amount, the term of the…

    • 706 Words
    • 3 Pages
    Good Essays