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 | Questions: 72
Please wait...
Question 1 / 72
0 %
0/100
Score 0/100
1. Доколку сакаме да ги направиме членките на класата јавни (достапни и од надвор од класата) тогаш треба:

Explanation

In order to make the members of a class public (accessible from outside the class), the keyword "public" should be placed before their declaration.

Submit
Please wait...
About This Quiz
Object Oriented Programming Quizzes & Trivia

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... see moreand using access operators, essential for learners in computer science. see less

2. Со наредбата   int i, 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.

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

Explanation

When a class is defined, it can contain public data members and private data members.

Submit
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 ();

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.

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

Explanation

The correct answer is that the function members can be both public and private.

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

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.

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

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.

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

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.

Submit
9. Класата 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.

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

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.

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

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.

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

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.

Submit
13. Објектите се:

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.

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

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.

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

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.

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

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.

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

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.

Submit
18. Класа е

Explanation

The correct answer is that a class is an abstract type that creates a collection of objects that share common behavior and structure.

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

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.

Submit
20. Извршувањето на наредбите во do-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.

Submit
21. Низа е

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.

Submit
22. Објектите во ООП

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.

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

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.

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

Explanation

When a class is defined and the access level of its members is not specified, the default access level is private.

Submit
25. Објектите:

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.

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

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.

Submit
27. Конструктори се

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.

Submit
28. Објектите:

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.

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

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.

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

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.

Submit
31. Наследување е

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.

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

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.

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

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.

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

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.

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

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.

Submit
36. Во ООП објектите

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

Explanation

The object can have attributes and behavior.

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

Explanation

not-available-via-ai

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

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).

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

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.

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

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.

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

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.

Submit
50. Објектите на класите

Explanation

The correct answer is "може да се користат како аргументи на функции" and "може да се вратат како резултат на функција". This means that objects of classes can be used as arguments in functions and can also be returned as results from functions.

Submit
51. Интерфејсите овозможуваат

Explanation

Interfaces in programming allow for the implementation of shared properties among classes that do not necessarily need to be in a class hierarchy. This means that multiple classes can implement the same interface and share common behavior without needing to be related through inheritance. Interfaces provide a way to define a contract of methods that must be implemented by any class that implements the interface, allowing for polymorphism and code reusability.

Submit
52. Функцијата членка на класата

Explanation

The correct answer is that a member function of a class is in the scope of the class if it is defined within the class itself. It can use both public and private members of the class. Additionally, it can access the members of its class using the dot operator.

Submit
53. Во делот finally од try…catch блокот...

Explanation

Finally блокот се користи за да се извршат постапките кои би сакале да се случат доколку не се случи исклучок. Ова значи дека кодот во finally блокот ќе се изврши независно дали имало исклучок или не. Од друга страна, try...catch блокот се користи за да се фатат исклучоците и да се изврши одредена логика за нивно третирање. Така, finally блокот не гарантира дека нема да се дели со нула и не е наменет за ослободување на ресурси кои прават истекување.

Submit
54. Карактеристики на објектно ориентирани јазици се

Explanation

The characteristics of object-oriented languages include the ability to solve problems when building large projects, dividing the program into program segments, and easier maintenance of correct programs.

Submit
55. Кај наредбата while условот се испитува

Explanation

The condition in a while loop is checked at the beginning of each cycle. This means that the condition is evaluated before the code inside the loop is executed. Therefore, the correct answer is "на почетокот на првиот циклус" and "на почетокот на секој циклус".

Submit
56. При повикување на функција

Explanation

The correct answer states that if the number of actual arguments is different from the number of formal arguments, an error message will be displayed. It also states that the actual arguments can be variables. This means that if the function is called with a different number of arguments than expected, an error will occur. Additionally, the actual arguments can be variables, allowing for flexibility in the values passed to the function.

Submit
57. До јавен член на класа се пристапува

Explanation

The correct answer is "from a function in which an object of the class is created". This means that a public member of a class can be accessed from any function in the program, but specifically from a function where an object of the class is created. In other words, once an object of the class is created, its public members can be accessed from any function within the program.

Submit
58. Полиморфизмот

Explanation

Polymorphism allows the type of an object to be determined at runtime. It is implemented if we have a superclass reference variable.

Submit
59. Во Java, throws ...

Explanation

In Java, the "throws" keyword is used to specify the types of exceptions that can be thrown by a method. It is placed before the body of the method, indicating the possible exceptions that can be thrown by that method. This allows the caller of the method to handle or propagate the exceptions as needed. Therefore, the correct answer is "specifies the types of exceptions that can be thrown" and "is placed before the body of the method".

Submit
60. Апстрактна класа е

Explanation

An abstract class is a class of general purpose that does not perform any specific task. It is used to define the behavior of some data structures, to which the derived classes add details.

Submit
61. Преклопените функции

Explanation

The correct answer is that overloaded functions are functions that have the same name but different number or types of arguments.

Submit
62. Статичките членови на класата

Explanation

The correct answer is that static members of a class can be data, can be functions, and have only one copy in memory regardless of how many times they are invoked.

Submit
63. Статичкиот податочен член на класата

Explanation

The static data member of a class has only one copy in memory regardless of how many times it is referenced during the program execution. It can also be an argument of a member function of the class.

Submit
64. Јавните членки се достапни:

Explanation

The correct answer is "од другите членки на класата, од било кој дел од програмата". This means that the public members of a class can be accessed by other members of the same class as well as from any part of the program.

Submit
65. Апстрактна класа е класа

Explanation

The correct answer is "која се дефинира со клучниот збор abstract, од која можеме да искористиме референцна променлива" because it accurately describes an abstract class. An abstract class is a class that contains abstract methods, can be instantiated, is defined with the keyword "abstract," and can be used with a reference variable.

Submit
66. До приватен член на класа се пристапува

Explanation

A private member of a class can be accessed with a function from the private part of the class or with a member function of the class.

Submit
67. Кои од следниве искази се точни

Explanation

The correct answer is that a definition is a declaration when a value is given to the object's name, and a scope is a set of program code where the object can be used.

Submit
68. Две функции се преклопени ако

Explanation

The correct answer is that two functions are considered overlapping if they have the same name, different argument lists, and are declared in the same scope. This means that the functions have the same identifier, but they accept different types or numbers of arguments. Additionally, they must be declared within the same scope, meaning they are defined within the same block of code or function.

Submit
69. За членовите на некоја класа важи

Explanation

If a member of a class is declared as private, it cannot be accessed directly through the main() function. However, if it is declared as private, it can be accessed directly through other friend functions. On the other hand, if it is declared as public, it is directly accessible from where it is invoked.

Submit
70. Наследувањето овозможува

Explanation

Inheritance allows for the reuse of the class definition without making significant changes to the code. It also enables derived classes to add behavior that is unique to their own needs. Additionally, inheritance allows for the inheritance of the data representation and behavior of the base class.

Submit
71. Преклопувањето на функции

Explanation

The correct answer is "овозможува флексибилна работа со различни типови податоци" (enables flexible handling of different data types) and "овозможува полиморфизам" (enables polymorphism). This is because function overloading allows the same function name to be used with different types and numbers of arguments, which enables flexibility in handling different data types. It also allows polymorphism, which means that a function can have multiple forms depending on the type of object it is called with.

Submit
72. Статичките функции членки на некоја класа

Explanation

Static member functions in a class are declared using the keyword "static" and can be invoked without creating an object of that class. They can be called for any object member of that class, using the dot operator. Additionally, they can also be called by specifying the class to which they belong.

Submit
View My Results

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
Cancel
  • All
    All (72)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Доколку ...
Со наредбата   int i, j;  
Кога се дефинира класа:
Дадена е класата Ptica ...
Сите ...
Да се означи кои од ...
Класата ...
Конструкторите ...
Класата B ја наследува класата A ако
Наредбите кои следат во do-while циклусот
Пристапот ...
Кога се дефинира класа:
Објектите се:
Кога се дефинира класа:
Кои од следните наредби ...
При ...
Пристап ...
Класа е
Модификацијата на ...
Извршувањето на наредбите ...
Низа е
Објектите во ООП
Кои од следниве наредби се ...
Кога се ...
Објектите:
Декларацијата на некој интерфејс ...
Конструктори се
Објектите:
При повеќекартно наследување
Статичките податоци членови на...
Наследување е
Кои од следните наредби се ...
Да се ...
Основната ...
Класниот конструктор кај ...
Во ООП објектите
Кои од ...
Наредбата за избор ако-тогаш во C++ е
Наредбите кои следат во while циклусот
Изведената ...
Што ...
При ...
Името на ...
Објектот може да има
Хиерархија на класи е кога
Дефинирањето ...
За да ...
При структурно програмирање
Ако во ...
Објектите на класите
Интерфејсите овозможуваат
Функцијата членка на класата
Во делот finally од try…catch блокот...
Карактеристики ...
Кај наредбата while условот се испитува
При повикување на функција
До јавен член на класа се пристапува
Полиморфизмот
Во Java, throws ...
Апстрактна класа е
Преклопените функции
Статичките членови на класата
Статичкиот податочен член на класата
Јавните членки се достапни:
Апстрактна класа е класа
До ...
Кои од следниве искази се точни
Две функции се преклопени ако
За членовите на некоја класа важи
Наследувањето овозможува
Преклопувањето на функции
Статичките функции членки на некоја...
Alert!

Advertisement