Ask C/C++ Expert


Home >> C/C++

Homework: Object Oriented Programming, Windows Controls, and Exception Handling

This is an individual homework assignment. Use VB.NET to develop a loan calculator as a Windows Form application.

1. User interface Design:

(1) The basic user interface requires the following Windows Form controls:

TextBox: Let the user specify a loan amount (p),
TextBox: Let the user specify an annual interest rate (r) as a percentage,
TextBox: Let the user specify the number of years for the calculation period (n),
ListBox: Is used to display the monthly payment (A) and remaining balance (B) after payment for each month over n years
CheckBox: Is used to Indicate if the loan is a simple interest loan or a compound interest loan
Button: Calculates the monthly payment and remaining balance after each
payment for each month over n years and display the result in the ListBox, Button: Clear all user inputs on the user interface.
Label controls should be used whenever they are needed.

The properties of the above controls should be specified as follows.

Control Property Value

(2) MenuStrip and ToolStrip: Add a MenuStrip and a ToolStrip control

(shown below) to the user interface. You need to specify the accelerator, shortcut keys, and incons as indicated in the screenshots below.

You can get the icon files from the SilkIcon Library (the icon file to be used are new.png, calculator.png, and door_out.png).

OOP Programming:

(1) Define the Loan class. This class assumes that the amount of loan rises because the interest is added to the principle amount at the end of each time period. This class has two properties: loan amount (p), annual interest rate r (0 =0). A constructor is needed for instantiation and initialization. The class has a function that calculates the monthly payment:

A = (r / 12) * p
      1- (1+ r / 12)
      -(n*12)

The class has another function that takes the number of months (N) as the input and returns the ending balance (B) at the end of month N:

(2) Define the SimpleInterestLoan class, which is a sub class of the Loan class.

This class assumes that the interest will not be added to the principle amount. This class has two overridden functions for calculating the monthly payment (A) and ending balance (B) at the end of month N, respectively:

(3) When the user enters a non-numeric value in any of the three TextBox controls, your program is going to throw an exception when the value is converted into a number. Use a Try...Catch statement to handle the exception without interrupting the program execution.

(4) Use the data validation technique to check if the annual interest rate percentage specified by the user is greater than or equal to 0 and less than or equal to 1.

(5) When the user clicks CalculateButton, your program should use the function defined either in Loan or SimpleInterestLoan class depending upon the status of LoanTypeCheckBox. Apply polymorphism to this programming task.

Display the amortization result showing the monthly payment and the end of balance for every month over the period of n years. The amortization result should be displayed in the ListBox in the following format (use vbTab as the separator between values):

(6) The ClearButton does the following after it is clicked:

• Clear the contents of all the TextBox controls
• Clear the items in DisplayListBox

(7) You also need to make sure that, when the user clicks a ToolStripMenuItem or a ToolStripButton, the corresponding function be executed. Use one event handler to respond to multiple events that are related.

When the user clicks the "About" ToolStripMenuItem, display the name of your application along with any information that you think necessary (version number, author, year, etc.)

Instructions for Homework Submission: Compress your entire VB project folder into a .zip file using Windows. To compress your VB project in Windows, you need to browse to the folder level where you can see your top project folder (one level above the folder where the .sln file is stored). Next, right click on the project folder and select "Send to" à "Compressed(zipped) Folder". You will see a file created with the extension ".zip".

Upload the zip file to our Scholar site.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91844484
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in C/C++

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As