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

  C program that prompts the user to enter some data

If the user enters -999 as the first account number, the program should simply exit, and display an appropriate message of your choice.

  Power management settings in bios

Every day at 2PM a client's computer at work reboots itself. You have made sure the power management settings in the BIOS and in the Windows Control Panel are not responsible.

  Windows client server environment

Describe and critically evaluate the similarities between the Windows and Unix operating systems and Identify and Describe the processes involved in the Windows Client Server environment.

  When a customer buys an item from the store

When a customer buys an item (or several) from the store, several changes to database tables will occur. Explain what those might be.

  Create a page translation table that meets the requirements

Create a page translation table that meets the requirements of the virtual memory system shown below.

  Security administrators to monitor servers

Discuss techniques used by security administrators to monitor servers for security purposes? For example, how are event logs and task or system monitors used?

  Explain the impact on the disks cache of several queries

Explain the impact on the disk's cache of several queries running concurrently, each scanning a different file. Can the above problem be addressed by the DBMS buffer manager doing its own prefetching? Explain.

  Provide the design and justification for your mechanism

Provide the design and justification for your mechanism that supports process dispatching and is operating system reliability and protection enhanced with the microkernel approach to system design?

  Program verification and performance tuning process

Discuss how do you envision ways program verification and performance tuning will be accomplished in future and will it still be a work of art?

  Intermediate level tasks

Intermediate Level Tasks :  Below is a simple program. It creates 2 threads. The first thread keeps printing out X on the screen, and the second thread keeps printing out O on the screen.

  Discuss the purpose of operating systems

Discuss the purpose of operating systems and Describe the components that comprise operating systems and the functions of each of these components

  Why do you think that embedded systems are so popular

Why do you think that embedded systems are so popular? Is it because of how reliable they are? Are they also secure

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