Question

Using C# and Windows Forms (WinForms), design and implement a standalone desktop application that fulfils the...

Using C# and Windows Forms (WinForms), design and implement a standalone desktop
application that fulfils the following requirements:
1. The user shall be able to enter the following values:
a. Gross monthly income (before deductions).
b. Estimated monthly tax deducted.
c. Estimated monthly expenditures in each of the following categories:
i. Groceries
ii. Water and lights
iii. Travel costs (including petrol)
iv. Cell phoneand& telephone
v. Other expenses
2. The user shall be able to choose between renting accommodation or buying a property.
3. If the user selects to rent, the user shall be able to enter the monthly rental amount.
4. If the user selects to buy a property, the user shall be required to enter the following
values for a home loan:
a. Purchase price of property.
b. Total deposit.
c. Interest rate (percentage).
d. Number of months to repay (between 240 and 360).
5. The software shall calculate the monthly home loan repayment for buying a property
based on the values that the user entered. (See
https://www.siyavula.com/read/maths/grade-10/finance-and-growth/09-finance-andgrowth-
03 for more information on how to calculate this).
6. If the monthly home loan repayment is more than a third of the user’s gross monthly
income, the software shall alert the user that approval of the home loan is unlikely.
7. The user shall be able to choose whether to buy a vehicle.
8. If the user selects to buy a vehicle, the user shall be required to enter the following values
for vehicle financing:
a. Model and make.
b. Purchase price.
c. Total deposit.
d. Interest rate (percentage).
e. Estimated insurance premium.
9. The software shall calculate the total monthly cost of buying the car (insurance plus loan
repayment). Assume that all cars will be repaid over a period of five years.
10. The software shall calculate the available monthly money after all the specified deductions
have been made.
11. The software shall not persist the user data between runs. The data shall only be stored in
memory while the software is running.
Non-functional requirements:
1. You are required to use internationally acceptable coding standards (as practised in
previous modules e.g. PROG6211). Include comprehensive comments explaining variable
names, methods and the logic of programming code.
2. You are required to use a generic collection to store all the expenses. To facilitate this, you
can create an abstract class Expense, from which HomeLoan, etc. can be derived.
3. You are required to create a custom class library that contains the classes related to the
logic of calculating the various values. The application project should make use of the
custom class library.
18; 19; 20 2020
© The Independent Institute of Education (Pty) Ltd 2020
Page 6 of 18
Submit the following items for this task:
1. Source code including both the class library and WinForms application.
2. Unified Modelling Language (UML) class diagram showing the classes in both the class
library and WinForms application. You may use any software of your choosing to create the
diagram, but the file that you submit must be a .PDF export of your diagram.
3. A readme file with instructions for how to compile and run the software.

Homework Answers

Answer #1

The following code shows how the program performs its calculations.

// Calculate the interest compounded monthly.
private void btnGo_Click(object sender, EventArgs e)
{
    // Get the parameters.
    decimal monthly_contribution = decimal.Parse(
        txtMonthlyContribution.Text, NumberStyles.Any);
    int num_months = int.Parse(txtNumMonths.Text);
    decimal interest_rate = decimal.Parse(
        txtInterestRate.Text.Replace("%", "")) / 100;
    interest_rate /= 12;

    // Calculate.
    lvwBalance.Items.Clear();
    decimal balance = 0;
    decimal total_interest = 0;
    decimal total_principle = 0;
    for (int i = 1; i <= num_months; i++)
    {
        // Display the month.
        ListViewItem new_item = lvwBalance.Items.Add(i.ToString());

        // Display the interest.
        decimal interest = balance * interest_rate;
        new_item.SubItems.Add(interest.ToString("c"));
        total_interest += interest;
        new_item.SubItems.Add(total_interest.ToString("c"));

        // Add the contribution.
        balance += monthly_contribution;
        total_principle += monthly_contribution;
        new_item.SubItems.Add(total_principle.ToString("c"));

        // Display the balance.
        balance += interest;
        new_item.SubItems.Add(balance.ToString("c"));
    }

    // Scroll to the last entry.
    lvwBalance.Items[lvwBalance.Items.Count - 1].EnsureVisible();
}

The code first gets the input parameters. It passes the parameter NumberStyles.Any to decimal.Parse so it can parse currency values. It also removes the percentage symbol from the interest rate, if it present.

The program then clears its ListView and then loops through the months being studied.

For each month, the code calculates and displays the interest on the current balance. It then adds the current interest to the total interest and displays that.

Next the program adds this month’s contribution to the total balance and the total principle, and displays those values. Finally it displays the new balance.

After it finishes the loop, the code calls the EnsureVisible method for the ListView control’s last entry to scroll to the end of the list.

This kind of investment has two benefits. First it makes you contribute a relatively small amount or principle each month so over time the principle adds up. Second the interest is added to the balance so over time older interest generates more interest. In this example during the final month the accumulated interest is about 30% of the total balance so roughly 30% if the interest is generated by the interest. If you continued this example for 18 years and 1 month, the total interest would exceed the total principle.



Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
C# Step 1: Create a Windows Forms Application. Step 2: Create a BankAccount class. Include: Private...
C# Step 1: Create a Windows Forms Application. Step 2: Create a BankAccount class. Include: Private data fields to store the account holder's name and the account balance A constructor with 0 arguments A constructor with 1 argument (account holder's name) A constructor with 2 arguments(account holder's name and account balance) Public properties for the account holder's name and the account balance. Do not use auto-implemented properties. A method to increase the balance (deposit) A method to decrease the balance...
C# Programming Using the Example provided in this Week Folder,Create a Console application that solve the...
C# Programming Using the Example provided in this Week Folder,Create a Console application that solve the following problem: The heating system in a school should be switched on if the average temperature is less than 17 degrees Celsius. The average temperature is found from the temperatures in the Math, English and IT departments. You are required to write a program that allows the user to input 3 temperatures. The program calculates and displays the average temperature and then displays "heating...
For this assignment, you will create a BPMN diagram to depict the business process to get...
For this assignment, you will create a BPMN diagram to depict the business process to get a home mortgage based on the following narrative. You can use either DrawIO or BizAgi to create the process drawing. For this process, you can assume that the loan is a refinance not a home purchase. There are some small differences in the process to refinance an existing mortgage than to get a new mortgage. In the following narrative, I'm explaining all of the...
Mandy would like to buy an apartment and needs a mortgage for $280,000. She was able...
Mandy would like to buy an apartment and needs a mortgage for $280,000. She was able to qualify for a loan at 7.2% for 30 years. What is the amount of her monthly payment? Use a spreadsheet program like Microsoft Excel. Start with a blank worksheet. In your spreadsheet, create a TVM DataFrame TVM DataFrame c n i PV PMT FV 1 From the problem, fill-in the values for Mandy's mortgage annuity into your spreadsheet. Place a question mark in...
Description In this project you will practice what we have learned in class about Design, ER...
Description In this project you will practice what we have learned in class about Design, ER Diagrams, Relational Models, DDL, SQL, CRUD (Create, Update, Delete) operations, associated queries, and mock data population. The goal is to create a realistic professional database/development experience. This assignment will describe the requirements for the database as you might receive them. You will need to fill in the details as you work on it. You will find that your work may be iterative, and you...
Develop a 2018 individual tax return (with all required forms and supporting schedules) for Rob and...
Develop a 2018 individual tax return (with all required forms and supporting schedules) for Rob and Laura Petrie that is both professional in appearance and technically correct. The use of tax software or a professional tax preparer to complete this project is prohibited. You can access fill-in forms (in pdf format) on the IRS website (www.irs.gov) by clicking on “More” on the left side of the homepage in the “Forms and Pubs” section. Next, click on the “Current Forms and...
Beth R. Jordan lives at 2322 Skyview Road, Mesa, AZ 85201. She is a tax accountant...
Beth R. Jordan lives at 2322 Skyview Road, Mesa, AZ 85201. She is a tax accountant with Mesa Manufacturing Company, 1203 Western Avenue, Mesa, AZ 85201 (employer identification number 11-1111111). She also writes computer software programs for tax practitioners and has a part-time tax practice. Beth is single and has no dependents. Beth was born on July 4, 1972, and her Social Security number is 123-45-6789. She wants to contribute $3 to the Presidential Election Campaign Fund. The following information...
Using the model proposed by Lafley and Charan, analyze how Apigee was able to drive innovation....
Using the model proposed by Lafley and Charan, analyze how Apigee was able to drive innovation. case:    W17400 APIGEE: PEOPLE MANAGEMENT PRACTICES AND THE CHALLENGE OF GROWTH Ranjeet Nambudiri, S. Ramnarayan, and Catherine Xavier wrote this case solely to provide material for class discussion. The authors do not intend to illustrate either effective or ineffective handling of a managerial situation. The authors may have disguised certain names and other identifying information to protect confidentiality. This publication may not be...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
In narrative essay format, I want you to address a business/organization case study using multiple concepts...
In narrative essay format, I want you to address a business/organization case study using multiple concepts from class. The case question and case text begin on page 5 of this document. You need to demonstrate their best understanding of management and organizational behavior theory, and the application of those ideas to improve the understanding of various issues. You need to clearly identify at least 3 distinct, substantive issues. For each issue you need to 1), identify evidence from the case...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT