Question: java Problem 1 : Write a Generic Class that adds two numbers of different data types ( Integer , Double, Long ) and test it
java
Problem :
Write a Generic Class that adds two numbers of different data types Integer Double, Long and
test it using your own examples.
Problem :
Write a Generic Class, that performs bubble sorting for an array, whose elements extend Comparable
class. Test it for sorting an array of Integer, Double and String data types.
Problem :
Modify your solution to Problem introducing your own fancy compare method. This method
should compare the String data types taking into account the total number of characters; Integer
data types taking into account the total number of nonzero digits, and Double data types taking
into the significand the mantissa of the number.
Problem :
Use Upper Bounded Wildcard to sum all elements of the list of elements, which the extend Number
class. Test it using your own examples for different data types.
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
