Let us worry about your assignment instead!

We Helped With This JAVA Programming Assignment: Have A Similar One?

More InfoJava Assignment

Assignment Description

ISM3230                                          Individual Assignment 3 – Conditional Logic                                             Fall 2017


You are developing an application for an insurance company that needs to categorize insurance quote requests based on some questions about the insured property. The inputs into the application are property data, the output is either an error message when insurance is not available, or a categorization of the property into one of six categories. Your classification routine will be only a small part of a larger program, so you may not use System.exit() method to terminate any of the branches. The relevant decision tree is given in the figure below:


Your task is to collect relevant data in the proper sequence and either finish the classification with a category number (an integer from 1 to 6) or with an error message that contains the appropriate status. All System.out.println() methods, either for the category or for the error, must occur at the end of the routine, after all the classification tree has been processed. Follow the requirements below. Make sure your prompts and error messages match the sample output.



1.       Define two named constants for the two values of house age that are used in one of the tests. This way any hard-coded values are consolidated at the top of the program and are easy to change in the future. The MAX_AGE is 90 years, the SAFE_AGE is 35 years. Use the named constants in the tests, not the values of 35 and 90.

2.       Declare a category variable as an integer. Declare an errorMessage variable as a string. Initialize both variables to their respective default values:  0 for category and “no error” for errorMessage.

3.       Create a scanner object for reading values from the keyboard. You can reuse the same object for reading all the values - you don't have to be creating multiple scanner objects.

Hint: When reading user data, use only nextLine(). If the data is numeric, convert it to a number with Integer.parseInt(). This will avoid the issue with the extra new line character when reading text after numbers with nextInt().

4.       Prompt user for property information, store it in appropriate variables, and use the values to make decisions. To simplify things, you can make your decisions on the basis of the first letter of the input. For example, if the prompt is “Own or rent?" you only need to check whether the input started with "O" or "o" to mean own.

Hint: extract the first letter and convert it to one case and check against that.

5.       For simplicity, you don't have to do error checking of user input. The prompts were chosen so that the words start with different letters. That allows you to assume that if it is not the option you're checking for, it must then be the other option. So in the case of "Own or rent?", if the input is not starting with "o" or "O", it must be rent. Alternatively, you could check the input for "r" or "R" to mean rent, and anything else would mean own.

6.       The information should be entered in the following order. Ask for the input only if it is relevant to the situation, for example, do not ask for the age of the house if we are renting:

a.       Prompt for "Own or rent? " and read the input. Store in a variable and make a classification decision.

b.       When appropriate, prompt for "Apartment or mobile home or house? " and read the input. Store in a variable and make a classification decision.

Hint: check for 2 of the 3 options, assume the 3rd option if the input does not match the other 2.

c.       When appropriate, prompt for "Enter house age in years:" and read the input. Store in a variable and make a classification decision. Hint: use nextLine() and Integer.parseInt() for input.

d.       When appropriate, prompt for "Passed inspection: yes or no?" and read the input. Store in a variable make a classification decision.

e.       When appropriate, prompt for " Windows: impact or regular or jalousie?" and read the input. Store in a variable make a classification decision.

f.        After the classification is done, your category variable should equal to a value from 1 to 6 or it should have its default value and the errorMessage variable should contain the message. In the first case, print out the category number, in the second case, print out the error message.


       Do not use System.exit()

       Use only one println to print the category value or one println to print the error message

       Use nesting as appropriate. Do not test for the same thing more than once. Do not use a boolean flag to indicate an error condition

       For string options, test only on the basis of the first letter of each choice.

       This is not required but if you decide to test against all string options, then handle the incorrect input by setting the errorMessage variable to some sensible value that describes the error. 


Sample Output:



Frequently Asked Questions

Is it free to get my assignment evaluated?

Yes. No hidden fees. You pay for the solution only, and all the explanations about how to run it are included in the price. It takes up to 24 hours to get a quote from an expert. In some cases, we can help you faster if an expert is available, but you should always order in advance to avoid the risks. You can place a new order here.

How much does it cost?

The cost depends on many factors: how far away the deadline is, how hard/big the task is, if it is code only or a report, etc. We try to give rough estimates here, but it is just for orientation (in USD):

Regular homework$20 - $150
Advanced homework$100 - $300
Group project or a report$200 - $500
Mid-term or final project$200 - $800
Live exam help$100 - $300
Full thesis$1000 - $3000

How do I pay?

Credit card or PayPal. You don't need to create/have a Payal account in order to pay by a credit card. Paypal offers you "buyer's protection" in case of any issues.

Why do I need to pay in advance?

We have no way to request money after we send you the solution. PayPal works as a middleman, which protects you in case of any disputes, so you should feel safe paying using PayPal.

Do you do essays?

No, unless it is a data analysis essay or report. This is because essays are very personal and it is easy to see when they are written by another person. This is not the case with math and programming.

Why there are no discounts?

It is because we don't want to lie - in such services no discount can be set in advance because we set the price knowing that there is a discount. For example, if we wanted to ask for $100, we could tell that the price is $200 and because you are special, we can do a 50% discount. It is the way all scam websites operate. We set honest prices instead, so there is no need for fake discounts.

Do you do live tutoring?

No, it is simply not how we operate. How often do you meet a great programmer who is also a great speaker? Rarely. It is why we encourage our experts to write down explanations instead of having a live call. It is often enough to get you started - analyzing and running the solutions is a big part of learning.

What happens if I am not satisfied with the solution?

Another expert will review the task, and if your claim is reasonable - we refund the payment and often block the freelancer from our platform. Because we are so harsh with our experts - the ones working with us are very trustworthy to deliver high-quality assignment solutions on time.

Customer Feedback

"Thanks for explanations after the assignment was already completed... Emily is such a nice tutor! "

Order #13073

Find Us On

soc fb soc insta

Paypal supported