Define the simpleinterestloan class which is a sub class of


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.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Define the simpleinterestloan class which is a sub class of
Reference No:- TGS01475779

Now Priced at $40 (50% Discount)

Recommended (97%)

Rated (4.9/5)