Write an exception class called mortgageinputexception.java

Assignment Help Operating System
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

Reference no: EM13943254

Questions Cloud

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

Reviews

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd