Answer:(c) abstract class A { abstract void unfinished(); }
Explanation:
A legal abstract class must have the keyword abstract before the class and an abstract class has abstract functions with the keyword abstract written and a void as the return type.
Answer:
public class PostAccount
{
public void withdraw(float savings)
{
if (savings >=0 )
{
IllegalArgumentException exception
= new IllegalArgumentException("Savings cannot be negative");
throw exception;
}
balance = savings - withdraw;
}
}
Explanation:
IllgalArgumentException is a type of NumberFormatException of runtime exception. Here in the program we have created an object of IllgalArgumentException class and after that we have thrown the error to show the condition if it does not satisfy the if condition.
Answer:
18, 13, 19
Explanation:
Number of computer programmers proficient only in Java = 45 - ( 1+1+6) = 37
Number of computer programmers proficient only in C++ = 30 - (6+1+5) = 18
Number of computer programmers proficient only in python = 20 - ( 1+1+5) = 13
Number of computer programmers are not proficient in any of these three languages = 100 - ( 37 + 18 + 13 + 1+ 1+ 5+ 6 ) = 100 - 81 = 19
Answer:
a) 10.53
b) 9.53
Explanation:
a) Average Turnaround Time: ( (8-0)+(12-0.4)+(13-1.0) ) / 3 = 10.53
b) Average Turnaround Time: ( (8-0)+(13-0.4)+(9-1.0) ) / 3 = 9.53