Create a class Doctor with attributes id, name, age and department. Initialize values through parameterized constructor. If age of Doctor is not in between 25 and 65 then generate user-defined exception “AgeNotWithinRangeException”. If name contains numbers or special symbols raise exception “NameNotValidException”.
SIKSHAPATH Latest Questions
Retrieve the odd numbers till given input number. add and subtract it consecutively and return the result. Input:9 Output:1+3-5+7-9=-3
Write a method that prints out a 3N+1 sequence starting from a given integer, N. Thestarting value should be a parameter to the method. If the parameter is less than or equalto zero, throw an IllegalArgumentException. If the number in ...
Rohan wants to buy a t-shirt for him. The problem is there are numbers written on t-shirts but not the size. He saw a chart according to which SMALL, MEDIUM and LARGE are labelled. He needs you to write a ...
Your cell phone rings. Return true if you should answer it. Normally you answer, except in the morning you only answer if it is your mom calling. In all cases, if you are asleep, you do not answer. answerCell(false, false, false) ...
Create a row trigger which ensures that whenever salary is updated in the emp table, then some message is displayed to the user and if new salary is lesser than old salary display the difference between both the salaries.