Question: 4 A ) Write a program which reads the integer value ( in the range of 1 - 1 0 0 ) . During the
A Write a program which reads the integer value in the range of 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.
B 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
displayActivistsCyclist 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.
C What will be the output of the following program. Give reasons.
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
