Creating a class named Module3 containing the following data members and methods (note that all data members and methods are for objects unless

Creating a class named Module3 containing the following data members and methods (note that all data members and methods are for objects unless specified as being for the entire class)

  1. 1)Data members: 
  2. a.A Scanner object named reader (your class will need to import the Scanner class)
  3. b.Two int variables named format and pointIndex
  4. c.A double variable named inputDouble
  5. d.A String object named outputString, initialized to “” (an empty String)
  6. 2)Methods:
  7. a.A main method that, in order:
  • •Creates a new Module3 object
  • •Prints the text “starting application” to the console
  • •Calls method b) with the argument “Please enter a floating point number” and assigns its returned double value to inputDouble
  • •Calls method c) with the argument “How many decimal places to display?” and assigns its returned int value to format
  • •Calls method d) with the argument format and the String “The formatted number is: “
  • •Prints the text “ending application” to the console
  1. b.A method named getInput that accepts a String parameter, prints the parameter String to the console, accepts a user-entered double via the console (use Scanner.nextDouble()), prints “Thank you” to the console, and returns the user-entered double value.
  2. c.A method named getFormat that accepts a String parameter, prints the parameter String to the console, accepts a user-entered int via the console (use Scanner.nextInt()), prints “Thank you” to the console, and returns the user-entered int value. For error-checking, if the user enters a negative value, the program should print the message “invalid input. halting.” to the console, then exit the program by calling System.exit(1);
  3. d.A method named convert that:
  • •Accepts two parameters: a String parameter and an int named places
  • •Assigns outputString the text “” + inputDouble
  • •Assigns to pointIndex the index of the decimal point (use String.indexOf())
  • •If places is greater than 0, places should be incremented by one (to account for the decimal point’s extra character)
  • •Extracts the substring from outputString starting from index zero to the specified number of decimal places (i.e., pointIndex + places)
  • •Displays via the console the parameter String concatenated with the substring from the previous bullet point 
Calculate your essay price
(550 words)

Approximate price: $

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)
Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more