logo

Crowdly

Browser

Add to Chrome

Об'єктно-орієнтоване програмування

Looking for Об'єктно-орієнтоване програмування test answers and solutions? Browse our comprehensive collection of verified answers for Об'єктно-орієнтоване програмування at virt.ldubgd.edu.ua.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Результат

компіляції програми

class One {

       int a;

       int b;

       int c;

      

       One(int a) {

             this.a = a;

             this.b = a;

             this.c = a;

       }

      

       One(int a, int b) {

             this.a = a;

             this.b = b;

             this.c = b;

       }

 

       void arithmetic() {

             int d = a + b + c;

             System.out

.print(d + "

");

       }

}

 

public class Main {

 

       public static void main(String[] args) {

             One one_1 = new One(2);

             One one_2 = new One(1, 2);

            

             one_1.arithmetic();

             one_2.arithmetic();

       }

}

View this question

Яка

структура даних використовується при виконанні рекурсивних методів

0%
0%
0%
0%
View this question

Результат

компіляції програмного коду

class One {

       void test(int а) {

             System.out.println(а);

       }

 

       void test(int а, int b) {

             System.out

.println(а + "

" + b);

       }

}

 

public class OneMain {

       public static void main(String[] args) {

             One one = new One();

             one.test(5);

one.test(10);

       }

}

0%
0%
0%
0%
View this question

Методи, що

виконують різну (або

споріднену) логіку в різних класах, проте володіють спільним інтерфейсом

(носять спільне ім’я) мають назву:

View this question

Причина

помилки компіляції

public class Two {

       double arithmetic (double a) {

             return a + (a * a);

       }

       int arithmetic(int a) {

             return a / a;

       }

}

View this question

Методи, що виконують подібну

логіку, розміщені в одному класі та мають спільний інтерфейс (носять спільне

ім’я):

View this question

Причина помилки компіляції програми

public class Two {

       int arithmetic (int a) {

             return a + (a * a);

       }

       int arithmetic(int a) {

             return a / a;

       }

}

View this question

Основні

умови, які дозволяють створити декілька методів в одному класі з спільним

іменем

0%
0%
0%
0%
View this question

Інструментальний

засіб програмування, який дозволяє методу викликати самого себе – це?

View this question

Результат

компіляції програмного коду

class One {

       double test(double a, double b) {

             return a + b;

       }

       int test(int a) {

             return a;

       }

}

 

public class OneMain {

       public static void main(String[] args) {

             One one = new One();

             System.out.println(one.test(3, 9));

       }

}

View this question

Want instant access to all verified answers on virt.ldubgd.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome