Question: Q1. a program to implement the interface of a Bank by any two classes, and provide implementation for the functionalities an interface that supports the

Q1. a program to implement the interface of a Bank by any two classes, and provide implementation for the functionalities an interface that supports the following operations:

1. Deposit a certain amount into an account

2. Withdrawing a certain amount from an account

3. Return a value specifying the balance in an amount

Q2. a program to create two Threads. 1st Thread printing first character of each word in the sentence entered by the user and using same input of 1st Thread in 2nd Thread to print each 2nd character of the sentence entered, after a period of 1 sec. Input from Thread A to be passed to Thread B and ensure that Thread A gets executed completely first.

Q3. a program to compute the squares of natural numbers and store the squares obtained in a 1D array. Squares of the numbers must not go beyond 100. If the square of the number goes beyond 100, then a User-defined Exception must be thrown and the exception raised must be handled. Discuss with all the appropriate inputs and outputs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!