Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java, no main method, no scanners (API design) Java contains several primitive data types built into the programming language. All algorithms fundamentally rely on these
Java, no main method, no scanners
(API design) Java contains several primitive data types built into the programming language. All algorithms fundamentally rely on these types to model all possible software objects. You're tasked to create a Datatype utility class that allows a developer to get the type of data for any primitive value. Recall that Java is an extensible language, which means you can expand the programming language with new functionality by adding new classes. Utility classes are typically helper classes that contain a collection of related static methods. For example, Math is a utility class. DataType Util Method API: Modifier and Type Method and Description static String getType(double data) static String get Type(float data) static String getType(int data) static String get Type(long data) static String getType(char data) static Stri static String getType(String data) Returns "double" as a String Returns "float" as a String Returns "int" as a String Returns "long" as a String Returns "char" as a String Returns "boolean" as a String Returns "String" as a String ng getType (boolean data) Facts Your DatatypeUtil class implementation should not have a main method. NO Scanner for input& NO System.out for output Input The DatatypeUtil class will be accessed by an external Java Application within Autolab. This Java app will send data in as arguments into each of the methods parameters Output The DatatypeUtil class should return the correct data calculations back to the invoking client code Sample Method Calls Sample Method Returns (Not Printouts) getType(1.e); getType(1.ef); getType(1); getType(1L); getType('1); getType(true); getType("Hello"); double" "float" "int" "long char "boolean" String Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started