Tutorial 3
1. Write a Java program using methods and a switch-case statement to implement a simple
calculator that performs addition, subtraction, multiplication, and division. The program
should display a menu repeatedly until the user enters 0 to exit.
2. Write a Java program using functions to check whether a given string and a given number
entered by the user are palindromes
3. Write a Java program to demonstrate runtime polymorphism by creating a base class
Shape with an area() method, and subclasses Rectangle and Circle that override
the method, then call area() using base class references.
4. Write a Java program to demonstrate abstraction by creating an abstract class Animal
with an abstract method sound(), and a subclass Dog that implements this method.