WT Lab 10
WT Lab 10
5>
import java.util.*;
SecException(String s)
super(s);
MinException(String s)
super(s);
HrsException(String s)
super(s);
}
}
class five
if(h>24 || h<0)
else
int h=sc.nextInt();
int m=sc.nextInt();
int s=sc.nextInt();
try
{
checkTime(h,m,s);
catch(Exception e)
System.out.println(e);
sc.close();
}
10.6 >
CheckArgs(String s)
super(s);
class six
if(args.length!=4)
try
arg();
catch (Exception e)
{
System.out.println(e);
finally
System.exit(0);
for(int i=0;i<4;i++)
a[i] = Integer.parseInt(args[i]);
for(int i=0;i<4;i++)
System.out.print((a[i]*a[i])+" ");
}
10.7>
import java.util.*;
LessBalance()
LessBalance(String s)
super(s);
class Bank
int show()
return bal;
bal = bal-amt;
else
class seven
try
while(true)
int ch=sc.nextInt(),amt;
switch(ch)
case 1:
System.out.print("Enter amount to deposit : ");
amt = sc.nextInt();
obj.deposit(amt);
break;
case 2:
amt = sc.nextInt();
obj.withdraw(amt);
break;
case 3:
break;
case 4:
System.exit(0);
default :
catch (LessBalance e)