ICSE Computer Applications 2024 Boards Paper Solved Section B - Question 4.

Ayush VanvaryAyush Vanvary
1 min read
                                                     // IG @vanvaryClasses.in
class Overload
{
    void perform(double r, double h)
    {
        double l=Math.sqrt(r*r+h*h);
        double CSA = Math.PI*r*l;
        System.out.println("CSA="+CSA);
    }

    void perform(int r, int c)
    {
        for(int i=1;i<=r;i++)
        {
            for(int j=1;j<=c;j++)
            {
                System.out.println(j+" ");
            }
            System.out.println();
        }
    }

    void perform(int m,int n,char ch)
    {
        if(ch=='Q')
        {
            System.out.println(m/n);
            System.out.println(n/m);
        }
        else
        {
            System.out.println(m%n);
            System.out.println(n%m);
        }

    }
}

Follow Ayush Vanvary

Instagram- @vanvaryclasses.in

#icseJava #Boards2024 #javaprogramming

#functionOverloading

0
Subscribe to my newsletter

Read articles from Ayush Vanvary directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ayush Vanvary
Ayush Vanvary

Hello, I'm Ayush Vanvary. Skilled in Python Django and MySQL, I'm equally passionate about sharing my expertise as a tech educator. With experience as a Java tutor, I've honed both my coding prowess and teaching abilities. Additionally, I regularly contribute insights through straightforward, informative tech blogs, enriching readers and nurturing a vibrant community