HW1.docx - Linh Ma Section1 ISYS 350 Homework 1 ISYS 350 Part 1 Screenshot Code Form Form1.cs Name section Monthly Payment Application using using using

HW1.docx - Linh Ma Section1 ISYS 350 Homework 1 ISYS 350...

This preview shows page 1 - 3 out of 3 pages.

Linh Ma Section1 ISYS 350 Homework 1 ISYS 350 Part 1: Screenshot Code Form: Form1.cs /* * Name * section * Monthly Payment Application * */ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApp9 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } // Button calculate click method // executes when button Calculate Monthly Payment is clicked private void btnCalculate_Click( object sender, EventArgs e) { // variables to store the input data double amount, rate; double monthlyPayment; // variable to store the monthly payment int years; // parsing and storing the input values in the variables double .TryParse(tb_amount.Text, out amount); double .TryParse(tb_rate.Text, out rate); int .TryParse(tb_term.Text, out years);
Image of page 1
Linh Ma Section1 ISYS 350 monthlyPayment = amount * rate / 12 / (1 - Math.Pow((1 + rate / 12), (-12 * years))); tb_monthlyPayment.Text = monthlyPayment.ToString( "C" , new System.Globalization.CultureInfo(
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 3 pages?

  • Fall '10
  • LI
  • Windows Forms, October 12, Linh Ma, int textbox2

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture