Test1 Ovp - 2010

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Mitre
M
Mitre
Community Contributor
Quizzes Created: 1 | Total Attempts: 65
| Attempts: 65
SettingsSettings
Please wait...
  • 1/72 Questions

    Доколку сакаме да ги направиме членките на класата јавни (достапни и од надвор од класата) тогаш треба:

    • пред нивното декларирање на стои клучниот збор public
    • не треба да се декларира ништо
    • пред нивното декларирање да стои клучниот збор void
Please wait...
Test1 Ovp - 2010 - Quiz
About This Quiz

Test1 OVP - 2010 evaluates understanding of object-oriented programming principles, focusing on class member attributes, object creation, and access modifiers. It assesses key skills in defining public members and using access operators, essential for learners in computer science.


Quiz Preview

  • 2. 

    Со наредбата   int i, j;  

    • се декларира променлива i

    • се декларира променлива j

    • се доделува вредност на i и j

    Correct Answer(s)
    A. се декларира променлива i
    A. се декларира променлива j
    Explanation
    The given answer is a correct explanation of the code provided. It correctly states that the code declares variables i and j, and then assigns values to them.

    Rate this question:

  • 3. 

    Кога се дефинира класа:

    • таа може да содржи јавни податочни членки

    • таа може да содржи приватни податочни членки

    • таа може да содржи само приватни податочни членки

    Correct Answer(s)
    A. таа може да содржи јавни податочни членки
    A. таа може да содржи приватни податочни членки
    Explanation
    When a class is defined, it can contain public data members and private data members.

    Rate this question:

  • 4. 

    Дадена е класата Ptica public abstract class Ptica {       public void leta(){             System.out.println(" Pticata leta... ");       }       public abstract void jade(); } и класата Papagal public class Papagal extends Ptica {       public void jade()       {             System.out.println(" Papagalot jade... ");       } } Што ќе се случи ако се извршат следните наредби? Ptica pt=new Papagal(); pt.leta(); pt.jade ();

    • Грешка! Не може да се изврши наредбата Ptica pt=new Papagal();

    • Грешка! Не може да се изврши наредбата pt.jade();

    • Ќе се отпечати: Pticata leta...

    • Ќе се отпечати: Pticata leta... Papagalot jade...

    Correct Answer
    A. Ќе се отпечати: Pticata leta... Papagalot jade...
    Explanation
    The correct answer is that the output will be "Pticata leta... Papagalot jade...". This is because the object "pt" is of type Ptica, but it is referring to an instance of the Papagal class. Since the Papagal class extends the Ptica class and overrides the jade() method, when the jade() method is called on the "pt" object, it will execute the implementation in the Papagal class. Similarly, the leta() method is called on the "pt" object, which is inherited from the Ptica class and will execute the implementation in the Ptica class. Therefore, both "Pticata leta..." and "Papagalot jade..." will be printed.

    Rate this question:

  • 5. 

    Сите функциски членки мора да бидат:

    • јавни

    • приватни

    • може да има и јавни и приватни функциски членки

    Correct Answer
    A. може да има и јавни и приватни функциски членки
    Explanation
    The correct answer is that the function members can be both public and private.

    Rate this question:

  • 6. 

    Да се означи кои од наведените се особини на класните конструктори:

    • се функции што не враќаат вредности

    • се функции на кои најчесто повратниот тип им е int или float

    • се функции кои не можат да имаат параметри

    Correct Answer
    A. се функции што не враќаат вредности
    Explanation
    The correct answer is "се функции што не враќаат вредности" which means "are functions that do not return values". This means that class constructors are functions that are used to initialize objects of a class, but they do not return any values. They are typically used to set initial values for the member variables of the class.

    Rate this question:

  • 7. 

    Класата се наследува како јавна со зборот

    • Private

    • Public

    • Protected

    • friend

    Correct Answer
    A. Public
    Explanation
    The correct answer is "public" because when a class is inherited as "public", all the public members of the base class become public members of the derived class. This means that the derived class can access the public members of the base class.

    Rate this question:

  • 8. 

    Конструкторите при повеќекратно наследување се повикуваат

    • по редослед на наведување на основните класите

    • по обратен редослед на наведување на основните класи

    Correct Answer
    A. по редослед на наведување на основните класите
    Explanation
    When multiple inheritance is used in a program, the constructors are called in the order of listing the base classes. This means that the constructors of the base classes are invoked in the same order as they are mentioned in the class declaration.

    Rate this question:

  • 9. 

    Класата B ја наследува класата A ако

    • објектите од класата B ги имаат сите карактеристики на објектите од класата A и уште некои нивни посебни карактеристики

    • објектите од класата A ги имаат сите карактеристики на објектите од класата B и уште некои нивни посебни карактеристики

    • класата А ги има сите карактеристики од класта B и уште некои нејзини посебни карактеристики

    • класата A ги има истите својства и методи како и клсата B

    Correct Answer
    A. објектите од класата B ги имаат сите карактеристики на објектите од класата A и уште некои нивни посебни карактеристики
    Explanation
    The correct answer states that class B inherits class A if objects of class B have all the characteristics of objects of class A and some additional specific characteristics. This means that class B can access and use all the attributes and methods of class A, and can also have its own unique attributes and methods. Inheritance allows for code reuse and promotes a hierarchical organization of classes.

    Rate this question:

  • 10. 

    Наредбите кои следат во do-while циклусот

    • мора да се извршат барем еднаш

    • мора да се извршат барем двапати

    • не мора да се извршат ниеднаш

    Correct Answer
    A. мора да се извршат барем еднаш
    Explanation
    The correct answer is "мора да се извршат барем еднаш" which means "must be executed at least once". This is because a do-while loop is a type of loop where the condition is checked at the end of the loop. This means that the statements inside the loop will always be executed at least once, even if the condition is initially false.

    Rate this question:

  • 11. 

    Пристапот до податочните членки на класа се извршува:

    • преку операторот за достап "."

    • секогаш преку операторот за достап "->"

    • преку името на објектот

    Correct Answer
    A. преку операторот за достап "."
    Explanation
    The correct answer is "преку операторот за достап "." (through the dot operator)". This means that access to the data members of a class is performed using the dot operator in the given programming language.

    Rate this question:

  • 12. 

    Кога се дефинира класа:

    • таа мора да содржи само приватни податочни членки

    • таа мора да содржи само јавни податочни членки

    • се препорачува да содржи приватни податочни членки

    Correct Answer
    A. се препорачува да содржи приватни податочни членки
    Explanation
    When defining a class, it is recommended to include private data members. This is because private data members cannot be accessed or modified directly from outside the class, providing encapsulation and data hiding. By keeping the data members private, we can control their access and ensure that they are only modified through the class's public member functions, maintaining the integrity and consistency of the class's data.

    Rate this question:

  • 13. 

    Објектите се:

    • множество на податочни објекти

    • инстанци на класи

    • дефинираат секогаш кога ќе се креира нова класа

    Correct Answer
    A. инстанци на класи
    Explanation
    The correct answer is "инстанци на класи". This means that objects are instances of classes. In object-oriented programming, a class is a blueprint for creating objects. When we create a new object, we are creating an instance of that class. Therefore, objects are instances of classes.

    Rate this question:

  • 14. 

    Кога се дефинира класа:

    • таа може да содржи јавни податочни членки

    • таа може да содржи приватни податочни членки

    • таа може да содржи само приватни податочни членки

    Correct Answer(s)
    A. таа може да содржи јавни податочни членки
    A. таа може да содржи приватни податочни членки
    Explanation
    When defining a class, it can contain both public and private data members. Public data members can be accessed and modified by any part of the program, while private data members can only be accessed and modified within the class itself. Therefore, the correct answer states that a class can contain both public and private data members.

    Rate this question:

  • 15. 

    Кои од следните наредби спаѓаат во наредби за повторување

    • While

    • Switch

    • Repeat-until

    • For

    Correct Answer(s)
    A. While
    A. For
    Explanation
    The correct answer is while and for. These are both loop control structures that allow for repetitive execution of a block of code. The while loop continues executing as long as a certain condition is true, while the for loop specifies a specific number of iterations to be executed. Switch and repeat-until are not loop control structures, but rather conditional and iterative structures respectively.

    Rate this question:

  • 16. 

    При декларирање објект од изведената класа прво се побикува конструкторот на

    • изведената класа

    • основната класа

    Correct Answer
    A. основната класа
    Explanation
    When declaring an object of a derived class, the constructor of the base class is invoked first. This is because the derived class inherits the properties and behaviors of the base class, and the base class needs to be initialized before the derived class can be. Therefore, the constructor of the base class is called before the constructor of the derived class when creating an object of the derived class.

    Rate this question:

  • 17. 

    Пристап до функциските членки се врши со:

    • преку операторот за достап "."

    • секогаш преку операторот за достап "->"

    • преку името на објектот

    Correct Answer
    A. преку операторот за достап "."
    Explanation
    The correct answer is "преку операторот за достап "." (through the dot operator)". This means that access to function members is done by using the dot operator in the programming language. The dot operator is used to access the functions or members of an object.

    Rate this question:

  • 18. 

    Класа е

    • класа на типови на податоци

    • со неа се дефинира почеток на програма

    • множество на податочни објекти

    • е апстрактен тип со кој се создава множество на објекти кои делат (поседуваат) заедничко однесување и структура

    Correct Answer
    A. е апстрактен тип со кој се создава множество на објекти кои делат (поседуваат) заедничко однесување и структура
    Explanation
    The correct answer is that a class is an abstract type that creates a collection of objects that share common behavior and structure.

    Rate this question:

  • 19. 

    Модификацијата на постоечките програми е овозможена од следните концепти на објектно ориентираните јазици:

    • полиморфизам

    • наследување

    • апстрактни податоци

    • претпроцесорски наредби

    Correct Answer(s)
    A. полиморфизам
    A. наследување
    Explanation
    The modification of existing programs is made possible by the concepts of polymorphism and inheritance in object-oriented languages. Polymorphism allows objects of different types to be treated as objects of a common type, which makes it easier to modify and extend the functionality of a program. Inheritance allows new classes to be created based on existing classes, inheriting their properties and behaviors. This facilitates code reuse and makes it easier to modify and customize existing programs.

    Rate this question:

  • 20. 

    Извршувањето на наредбите во do-while циклусот се одвива сé додека

    • е исполнет условот после while

    • не е исполнет условот после while

    • исто како repeat-until во Pascal

    Correct Answer
    A. е исполнет условот после while
    Explanation
    The correct answer is "е исполнет условот после while" (the condition after while is satisfied). In a do-while loop, the code block is executed at least once before checking the condition. If the condition after while is satisfied, the loop will continue executing. If the condition is not satisfied, the loop will terminate. This behavior is similar to the repeat-until loop in Pascal.

    Rate this question:

  • 21. 

    Низа е

    • основен вграден тип во java

    • секвенца од објекти со ист тип

    • посебен податочен објект во кој објектите се неподредени

    • податочен објект кој го сочинуваат елементи исклучиво од вградените основни податочни типови

    Correct Answer
    A. секвенца од објекти со ист тип
    Explanation
    The correct answer is "секвенца од објекти со ист тип" which means "a sequence of objects of the same type". This is the correct answer because it accurately describes what an array is in Java. An array is a data structure that stores a fixed-size sequence of elements of the same type. Each element in the array can be accessed using its index, which starts from 0.

    Rate this question:

  • 22. 

    Објектите во ООП

    • имаат свои податоци

    • имаат свое однесување

    • не може да се прошируваат (фиксни се по големина)

    Correct Answer(s)
    A. имаат свои податоци
    A. имаат свое однесување
    Explanation
    The correct answer is "имаат свои податоци, имаат свое однесување" because objects in Object-Oriented Programming (OOP) have their own data, which is represented by attributes or properties, and they also have their own behavior, which is represented by methods or functions. This is one of the fundamental principles of OOP, where objects encapsulate both data and behavior, allowing for modular and reusable code.

    Rate this question:

  • 23. 

    Кои од следниве наредби се наредби за декларирање

    • Int i;

    • char c;

    • Real r;

    • Double d;

    Correct Answer(s)
    A. Int i;
    A. char c;
    A. Double d;
    Explanation
    The given declarations are examples of variable declarations in different data types. "int i" declares a variable named "i" of type integer, "char c" declares a variable named "c" of type character, and "double d" declares a variable named "d" of type double. These declarations are valid and follow the syntax for declaring variables in their respective data types. The declaration "real r" is not a valid declaration in most programming languages, which is why it is not included in the correct answer.

    Rate this question:

  • 24. 

    Кога се дефинира класа, ако на почеток не се наведе каков достап има до членките:

    • членките што следат се јавни

    • членките што следат се приватни

    Correct Answer
    A. членките што следат се приватни
    Explanation
    When a class is defined and the access level of its members is not specified, the default access level is private.

    Rate this question:

  • 25. 

    Објектите:

    • имаат два атрибути: податоци и функции членки

    • се создаваат веднаш со самото креирање на класа

    • може да се повикуваат само од други објекти

    • може да се создаваат само во својата класа

    Correct Answer
    A. имаат два атрибути: податоци и функции членки
    Explanation
    The correct answer states that objects have two attributes: data and member functions. This means that objects in this context have both data, which represents the state or characteristics of the object, and member functions, which are the actions or behaviors that the object can perform. These attributes are essential for objects to interact with each other and manipulate their own data. Additionally, the answer implies that objects are created immediately when the class is created and can only be called by other objects. It also suggests that objects can only be created within their own class.

    Rate this question:

  • 26. 

    Декларацијата на некој интерфејс ...

    • содржи потпис

    • содржи имплементација на методите

    • не смее да содржи константи

    • дефинира наследување

    Correct Answer
    A. содржи потпис
    Explanation
    The correct answer is "содржи потпис" (contains a signature). In object-oriented programming, an interface declaration defines a contract that a class must adhere to. It specifies the methods that the class must implement, but it does not provide the actual implementation of those methods. Therefore, an interface declaration only includes the signatures of the methods, not their actual implementation.

    Rate this question:

  • 27. 

    Конструктори се

    • специјален тип на класи

    • податочен тип

    • специјални функции за иницијализација

    • контролни структури

    Correct Answer
    A. специјални функции за иницијализација
    Explanation
    The correct answer is "специјални функции за иницијализација" (special functions for initialization). Constructors are special functions in programming languages that are used to initialize objects of a class. They are called automatically when an object is created and are used to set initial values for the object's attributes. Constructors can have parameters to accept values that are used for initialization.

    Rate this question:

  • 28. 

    Објектите:

    • имаат два атрибути: податоци и функции членки

    • се создаваат веднаш со самото креирање на класа

    • може да се повикуваат само од други објекти

    • може да се создаваат само во својата класа

    Correct Answer
    A. имаат два атрибути: податоци и функции членки
    Explanation
    The correct answer states that objects have two attributes: data and member functions. This means that objects in programming languages have both data, which represents the state or characteristics of the object, and member functions, which define the behavior or actions that the object can perform. These attributes are essential for objects to encapsulate data and functionality into a single entity, allowing for modular and reusable code. Additionally, the answer implies that objects are created immediately upon the creation of a class, and they can only be accessed or invoked by other objects.

    Rate this question:

  • 29. 

    При повеќекартно наследување

    • сите класи се наследуваат со исто ниво на достап

    • секоја класа може да се наследи со различно ниво на достап

    Correct Answer
    A. секоја класа може да се наследи со различно ниво на достап
    Explanation
    In multiple inheritance, each class can be inherited with a different level of access. This means that each class can have a different level of accessibility for its inherited members or methods. This allows for more flexibility in designing and implementing the inheritance hierarchy, as each class can have its own specific access level requirements.

    Rate this question:

  • 30. 

    Статичките податоци членови на класите

    • не може да се иницијализираат надвор од класата

    • може да се од било кој тип

    • се достапуваат од функциите членки на класата исклучиво со операторите за пристап

    Correct Answer
    A. може да се од било кој тип
    Explanation
    The correct answer is "може да се од било кој тип" (can be of any type). This means that static data members in a class can be initialized with values of any data type. Additionally, these static data members can only be accessed by the member functions of the class using the access operators.

    Rate this question:

  • 31. 

    Наследување е

    • релација помеѓу објектите

    • релација помеѓу класите

    • релација помеѓу методите и својствата на објектите

    Correct Answer
    A. релација помеѓу класите
    Explanation
    The correct answer is "релација помеѓу класите" which translates to "a relationship between classes" in English. In object-oriented programming, inheritance is a mechanism that allows a class to inherit properties and methods from another class. This relationship between classes is important for code organization, reusability, and creating hierarchies of related classes.

    Rate this question:

  • 32. 

    Кои од следните наредби се наредби за избор?

    • If

    • if – else

    • For

    • While

    • Switch

    Correct Answer(s)
    A. If
    A. if – else
    A. Switch
    Explanation
    The correct answer is if, if-else, and switch. These are all conditional statements used in programming languages to control the flow of the program based on certain conditions. The "if" statement allows the program to execute a block of code if a specified condition is true. The "if-else" statement extends the "if" statement by providing an alternative block of code to execute if the condition is false. The "switch" statement allows the program to select one of many code blocks to be executed based on the value of a variable.

    Rate this question:

  • 33. 

    Да се означи кои од наведените се особини на класните конструктори:

    • името им е исто со името на класата

    • се функции што се извршуваат автоматски при креирање на инстанца од класата

    • името им е исто со името на класата, со додаден void

    • се функции што се извршуваат автоматски при уништување на објект од класата

    Correct Answer(s)
    A. името им е исто со името на класата
    A. се функции што се извршуваат автоматски при креирање на инстанца од класата
    Explanation
    Class constructors are special functions that are automatically executed when an instance of a class is created. They have the same name as the class and do not have a return type. Therefore, the given answer correctly states that the characteristics of class constructors include having the same name as the class and being functions that are automatically executed when an instance of the class is created.

    Rate this question:

  • 34. 

    Основната задача на конструкторите на класата е:

    • иницијализација на податочните членки од класата

    • динамичка алокација на меморија

    • енкапсулација на променливите во класата

    • ниту еден од наведените одговори

    Correct Answer
    A. иницијализација на податочните членки од класата
    Explanation
    The main task of class constructors is to initialize the data members of the class. They are responsible for setting the initial values of the variables within the class. This ensures that the object created from the class starts with the desired state and can be used correctly. Constructors are called automatically when an object is created, and they can have parameters to allow for different initialization values. The other options listed, such as dynamic memory allocation and encapsulation of variables, are not the main tasks of class constructors.

    Rate this question:

  • 35. 

    Класниот конструктор кај локалните објекти:

    • се повикува секогаш кога се извршува декларациска наредба

    • се повикува еднаш, кога програмата првпат започнува со извршување

    • се повикува два пати: на почетокот и на крајот од извршувањето на програмата

    • не се повикува ниту еднаш

    Correct Answer
    A. се повикува секогаш кога се извршува декларациска наредба
    Explanation
    The correct answer is "It is called every time a declaration statement is executed." This means that the class constructor is invoked every time a declaration statement is executed in the program.

    Rate this question:

  • 36. 

    Во ООП објектите

    • имаат свои атрибути

    • немаат карактеристики

    • може да се прошируваат

    Correct Answer(s)
    A. имаат свои атрибути
    A. може да се прошируваат
    Explanation
    In object-oriented programming, objects have their own attributes and can be extended. This means that objects can have characteristics or properties that define their state, and they can also be expanded or modified to include additional attributes or behaviors. This allows for flexibility and customization in designing and implementing object-oriented systems.

    Rate this question:

  • 37. 

    Кои од следните својства важат за интерфејсите?

    • Интерфејс може да инстанцира објект

    • Методите кај интерфејсите немаат тело

    • Интерфејсите се наследуваат

    • Интерфејсите се имплементираат

    Correct Answer(s)
    A. Методите кај интерфејсите немаат тело
    A. Интерфејсите се имплементираат
    Explanation
    The correct answer is that methods in interfaces do not have a body and interfaces are implemented. This means that interfaces only declare the methods that must be implemented by any class that implements the interface. The lack of a body for methods in interfaces is because interfaces are meant to provide a contract of behavior rather than implementation details. Implementing an interface means that a class provides the actual implementation for the methods declared in the interface.

    Rate this question:

  • 38. 

    Наредбата за избор ако-тогаш во C++ е

    • if (uslov) then { naredbi; }

    • If (uslov) { naredbi; }

    • if (uslov) naredbi;

    • If (uslov) then naredbi;

    Correct Answer
    A. If (uslov) { naredbi; }
    Explanation
    The correct answer is the third option, "if (uslov) naredbi;". This is because in C++, the syntax for an if statement is "if (condition) { statements; }". The third option follows this syntax correctly by having the condition "uslov" followed by the statement "naredbi;" without any unnecessary keywords or braces.

    Rate this question:

  • 39. 

    Наредбите кои следат во while циклусот

    • мора да се извршат барем еднаш

    • мора да се извршат барем двапати

    • не мора да се извршат ниеднаш

    Correct Answer
    A. не мора да се извршат ниеднаш
    Explanation
    The correct answer is "не мора да се извршат ниеднаш" (do not have to be executed at all). This is because the question is asking about the requirements that must be followed in a "while" loop. In a "while" loop, the code block may not be executed at all if the condition is initially false. Therefore, the correct answer is that the code block does not have to be executed at all.

    Rate this question:

  • 40. 

    Изведената класа ги наследува карактеристиките на основната класа со

    • преклопување на функциите и податоците од основната класа

    • со наследување на функциите и податоците на основната класа

    • со предефинирање на функциите од основната класа

    • со дефинирање на покажувачи до функциите и податоците од основната класа

    Correct Answer
    A. со наследување на функциите и податоците на основната класа
    Explanation
    The correct answer is "со наследување на функциите и податоците на основната класа" which means "with inheritance of the functions and data of the base class". This means that the derived class inherits all the characteristics of the base class, including its functions and data.

    Rate this question:

  • 41. 

    Што поставуваме во делот try, кој е дел од try…catch блокот за справување со исклучоци?

    • Кодот кој може да даде исклучок

    • Кодот кој се справува со исклучок

    • Делење со нула

    • Грешна класа

    Correct Answer
    A. Кодот кој може да даде исклучок
    Explanation
    The try block is used to enclose the code that may potentially throw an exception. In this case, the correct answer states that we put the code that can potentially throw an exception in the try block. This means that if any exception occurs within this code, it will be caught and handled by the corresponding catch block. This is an important mechanism for handling exceptions and preventing the program from crashing.

    Rate this question:

  • 42. 

    При инстанцирање на објект од некоја класа

    • се креираат сите податоци и сите методи на објектот

    • само податоците

    • само методите

    Correct Answer
    A. само податоците
    Explanation
    When an object is instantiated from a class, all the data of the object is created. This means that the object will have all the variables and their corresponding values. However, the methods of the object are not created during instantiation. Methods are defined in the class and can be accessed by the object, but they are not created again for each individual object.

    Rate this question:

  • 43. 

    Името на функција – членка на некоја класа не може да биде исто со името на класата.

    • неточно

    • точно

    Correct Answer
    A. неточно
    Explanation
    The statement is incorrect because the name of a member function in a class can be the same as the name of the class. This is known as a constructor, which is a special member function that has the same name as the class and is used to initialize objects of that class.

    Rate this question:

  • 44. 

    Објектот може да има

    • атрибути

    • можности

    • недостатоци

    • однесување

    Correct Answer(s)
    A. атрибути
    A. однесување
    Explanation
    The object can have attributes and behavior.

    Rate this question:

  • 45. 

    Хиерархија на класи е кога

    • објектот наследува атрибути само од една класа

    • објектот наследува од повеќе класи

    • објектот наследува од изведена класа

    Correct Answer
    A. објектот наследува од изведена класа
  • 46. 

    Дефинирањето (создавањето) на објекти се извршува во:

    • самата класа

    • било каде каде што има референца до соодветниот објект

    • само во функцијата main

    • во било која функција, која може да биде необјектна или функција членка на некој објект

    Correct Answer
    A. во било која функција, која може да биде необјектна или функција членка на некој објект
    Explanation
    The definition (creation) of objects can be performed in any function that can be either non-member or a member function of an object. This means that objects can be created and defined in any function, regardless of whether it is a member function of a specific object or not. The objects can be created and defined in any function that has a reference to the corresponding object. Therefore, the correct answer is "во било која функција, која може да биде необјектна или функција членка на некој објект" (in any function, which can be non-member or a member function of some object).

    Rate this question:

  • 47. 

    За да имаме полиморфизам треба да имаме

    • референцна променлива од суперкласа

    • референцна променлива од апстрактна класа

    • објект од поткласа

    • објект од суперкласа

    Correct Answer(s)
    A. референцна променлива од суперкласа
    A. објект од суперкласа
    Explanation
    To achieve polymorphism, we need a reference variable of the superclass and an object of the superclass. This is because polymorphism allows us to treat objects of different classes as objects of the same superclass, allowing us to use the same methods and behaviors defined in the superclass. By having a reference variable of the superclass and an object of the superclass, we can dynamically bind the appropriate method implementation at runtime based on the actual object type.

    Rate this question:

  • 48. 

    При структурно програмирање

    • проблемот се дели на поедноставни проблеми

    • се користи техника „програмирање оддолу нагоре” (bottom-up programming)

    • се користи модуларно програмирање

    Correct Answer(s)
    A. проблемот се дели на поедноставни проблеми
    A. се користи модуларно програмирање
    Explanation
    In structural programming, the problem is divided into simpler problems and modular programming is used. This approach allows for breaking down complex problems into smaller, more manageable parts, making it easier to solve them. By dividing the problem into simpler problems, it becomes easier to understand and solve each part individually. Modular programming further enhances this approach by allowing for the creation of reusable modules or functions that can be used to solve different parts of the problem. This promotes code reusability, maintainability, and improves overall program structure.

    Rate this question:

  • 49. 

    Ако во класата се декларирани еден или повеќе конструктори тогаш при дефинирање на објект

    • мора да се искористи еден од нив

    • не мора да се искористи некој од нив

    • може да се искористат неколку

    Correct Answer
    A. мора да се искористи еден од нив
    Explanation
    The correct answer is "мора да се искористи еден од нив" which means "one of them must be used" in English. This implies that if there are one or more constructors declared in a class, at least one of them must be used when defining an object.

    Rate this question:

Quiz Review Timeline (Updated): Mar 20, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 02, 2010
    Quiz Created by
    Mitre
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.