Question: 4 A ) Write a program which reads the integer value ( in the range of 1 - 1 0 0 ) . During the

4A) Write a program which reads the integer value (in the range of 1-100). During the process of
reading, if a user enters a value other than the range, then it will throw IllegalArgumentException ',
exception. On the occurrence of such an exception, your program should print "You entered invalid
range." If there is no such exception it will print the square root of the value.
4B) Write a Java program with a class Cyclist having the information about cyclistID, name, and
activityDuration in minutes. Create an array of Cyclist class objects, pass it to a method called void
displayActivists(Cyclist!) which prints the details of the longest activity in hours and minutes for
each cyclist.
Note: Consider a minimum of three cyclists for this program.
4C) What will be the output of the following program. Give reasons.
 4A) Write a program which reads the integer value (in the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!