Question: Program Specification: Write a Java program that does the following: Prompts the user to input exactly four characters, which constitude a valid double literal in
Program Specification:
Write a Java program that does the following:
Prompts the user to input exactly four characters, which constitude a valid double literal in Java.
Gets whatever the user enters and stores it into a String variable, using the the Scanner's nextLine method.
Determines if the input string is indeed a valid four character double literal :
Consists of exactly the following characters: decimal point and through
Either the or character may appear only as the first character
The decimal point character must appear exactly once
All other characters must be the through characters
Displays this determination to the user in a reasonable report format.
Grading:
tablePerformance Indicator,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
