Ayun salamat lods may pag babasehan nako pede ako makahinhi nung simula ng code?? Kahit yung unang system.out lang lods tas try ko kumpletuhin lang
Gawin mo lang base sa instruction magagawa mo yan.
(Assuming you already have the custom exception.)
1. Create a random number. (Binigay ko na.)
2. Declare variables for attempt count and loop trigger.
3. Create while loop.
4. Inside while loop create try-catch block.
5. Inside try block ask the user for input, then use if else-if to match the needed exceptions. If input is out of range throw an exception, if input is invalid throw an exception.
6. Inside catch block display the relevant message depending on the exception. (You need two catch block.)
Hinimay ko na kaya mo na yan. Effort, use google, use Y⊕ùTùbé. Mas rewarding pag na solve mo na alam mo na pinaghirapan mo.
lods ano ilalagay sa while?? tas yung sa try catch??