1.
Write a Java program to create an abstract class BankAccount with abstract
methods
deposit() and withdraw(). Create subclasses: SavingsAccount and CurrentAccount
that extend the BankAccount class and implement the respective methods to handle
deposits and withdrawals for each account type.also overrides the withdraw()
method to
prevent withdrawals if the account balance falls below one hundred.
2. Write a Java program to create a vehicle class hierarchy. The base class should
be Vehicle,
with subclasses Truck, Car and Motorcycle. Each subclass should have properties
such as make,
model, year, and fuel type. Implement methods for calculating fuel efficiency,
distance traveled, and maximum speed.
3. Write a Java program to implement a stack that checks if a given element is
present or not
in the stack.