Reference no: EM13943254
Write an Exception class called MortgageInputexception.java. this class will inherit from the Exception.class in the java API. The exception should be packaged in the src.calculator.gui package.
Modify MortgagedisplayGui.java to include a function called is ValidRate(String testValue) is Valid Term(String testValue) is ValidLoanAmount(String testValue) that will interrogate an input value for each of the entries, rate, term and loan amount. This function will throw the MortgageInputException if the entry is not valid. Use the String manipulation functions to determine if the content is appropriate. That is, the entry does not contain special characters and letters, and for rate does meet the format the calculator requires in order to use the rate in the equations.
Modify MortgageDisplayGui.java to try and catch for this MortgageInputException and upon error, report the Error to the user via a JoptionPane using the ERROR_MESSAGE and DEFAULT_OPTION constants provided by the JoptionPane class.
The new validation functions should throw the exception MortgageInputException.
Include in MortgagedisplayGui.java:
public static final String Rate_Error_MSG;
public static final String Amount_Error_MSG;
public static final String Term_Error_MSG;
private void calculate() {
try
catch
throw
}
isValidRate(in testValue : String) : double
is ValidLoanAmount(in testValue : String) : double
is ValidTerm(in testValue : String) : double
displayError(in message : String)
Attachment:- src.zip
Sources of risk are diversifiable in nature
: Which of the following sources of risk are diversifiable in nature?
|
Sql statements work without issue
: Use SQL to Create a table with at least 4 attributes one of which is the Primary key. Then, insert 2 records into the table. Finally, use a select statement to show the content of your table after the inserts. Be sure your SQL statements work with..
|
What is the interest tax shield
: Fleury Co. has a 34 percent tax rate. Its total interest payment for the year just ended was $37.4 million. What is the interest tax shield?
|
Explain why individual differences in attachment matter
: Explain why individual differences in attachment matter. What are their known sources? Describe the influences that family, or lack thereof, and environment have on the development of infants
|
Write an exception class called mortgageinputexception.java
: Modify MortgageDisplayGui.java to try and catch for this MortgageInputException and upon error, report the Error to the user via a JoptionPane using the ERROR_MESSAGE and DEFAULT_OPTION constants provided by the JoptionPane class.
|
Dividend changes-issues of debt-stock splits
: What is asymmetric information and how does it affect how investors view financial moves like dividend changes, issues of debt, stock splits, etc.?
|
Discuss situation you required to make management decision
: Using your local place of employment, business, or organization, discuss a situation when you were required to make a management- or leadership-related decision.
|
Explain the meaning of decentralization
: Explain Step Down Method. Describe Bundled Payments and Capitation. What do you about Reimbursement to PHYSICIAN for professional services. Explain the meaning of Decentralization. Describe Budget Variances.
|
Blend of the costs of the different sources of capital
: The firm's overall cost of capital that is a blend of the costs of the different sources of capital is known as the firm's
|