Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please code in Java. Formula Classication Problem Today you are commissioned to create a program that will receive one double user input, record a transformation

Please code in Java.

image text in transcribed
Formula Classication Problem Today you are commissioned to create a program that will receive one double user input, record a transformation of the input, and attempt to classify the result based on explicit specifications. Here are the steps your program is to follow: 1. Prompt the user for an input value using the message Input value to analyze: (Refer to sample output below.) 2. The user is to enter their value on the same line as the message. Notice there is exactly one space between the: (semicolon) at the end of the message and the user input. 3. Record in modinput the result of the following equation: modlnput = (userlnput t userlnput) + 2 4. Next, based on the rules below, determine which class the variable modinput belongs to and display the corresponding message as per in the sample output below. 0 if modlnput is even or modinput greater than or equal to 75, modlnput maybe belongs to class 1. o if modinput is less than or equal to 250 and modl'nput greater than 60, modlnput maybe belongs to class 2. o If modlnput does not fulll the previous requirements, modlnput maybe belongs to class 3. In this scenario you are to assume that only 2 and 3 (above) are mutually exclusive, that is, when modinput is evaluated it may output more than one statement. 5. Based on the previous specications your program should behave and look m as shown in the cases below: Input value to analyze: 44 Input value to analyze: 9 Input value to analyze: 14 Output is: Output is: Output is: Maybe in C1. Maybe in C3. Maybe in C1. Mabeinca. Habeincz. Input value to analyze: 11 N You are to expect a perfect user who will always enter valid double Output is: . Ma be in C: ' values, that Is, do not verify the validity of user input. m All calculations, inputs and outputs should be in double format and the use of libraries other than java . util . Scanner- is prohibited. m Remember that your solution is case-sensitive and space-sensitive; fulfill the above instructions carefully and precisely

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Which kind of lens is used to make a magnifying glass?

Answered: 1 week ago