Get premium membership and access questions with answers, video lessons as well as revision papers.
- What is the main advantage of run-time polymorphism? What is its potential disadvantage?(Solved)
What is the main advantage of run-time polymorphism? What is its potential disadvantage?
Date posted: February 5, 2018.
- If in a class hierarchy, a derived class neglects to override a virtual function,what happens when an object of that derived class that function in...(Solved)
If in a class hierarchy, a derived class neglects to override a virtual function,what happens when an object of that derived class that function in a computer program?
Date posted: February 5, 2018.
- Is the following C++ fragment correct? If not, why not?
class base {
public:
virtual int f(int a)=0;
//...
};
class derived : public base {
public:
int f(int a, int b) {return...(Solved)
Is the following C++ fragment correct? If not, why not?
class base {
public:
virtual int f(int a)=0;
//...
};
class derived : public base {
public:
int f(int a, int b) {return a*b;}
//...
};
Date posted: February 5, 2018.
- Distinguish between an abstract and polymorphic classes.(Solved)
Distinguish between an abstract and polymorphic classes.
Date posted: February 5, 2018.
- What is a pure virtual function in a computer program?(Solved)
What is a pure virtual function in a computer program?
Date posted: February 5, 2018.
- How does virtual function help achieve run-time polymorphism in a computer program?(Solved)
How does virtual function help achieve run-time polymorphism in a computer program?
Date posted: February 5, 2018.
- Define the term computer system(Solved)
Define the term computer system.
Date posted: February 5, 2018.
- What is a program's virtual function?(Solved)
What is a program's virtual function?
Date posted: February 5, 2018.
- Give one advantage of using the C++ I/O functions instead of the C-like I/O system.(Solved)
Give one advantage of using the C++ I/O functions instead of the C-like I/O system.
Date posted: February 5, 2018.
- What functions report status information about the C++ I/O system?(Solved)
What functions report status information about the C++ I/O system?
Date posted: February 5, 2018.
- Show the statement that sets the put pointer to the 234th byte in a file linked to a stream called 'out'(Solved)
Show the statement that sets the put pointer to the 234th byte in a file linked to a stream called 'out'
Date posted: February 5, 2018.
- What function positions the get pointer and put program pointers?(Solved)
What function positions the get pointer and put program pointers?
Date posted: February 5, 2018.
- Given the following C++ fragment, in what order are the constructor functions called?
class myclass: public A, public B, public C {...(Solved)
Given the following C++ fragment, in what order are the constructor functions called?
class myclass: public A, public B, public C {...
Date posted: February 5, 2018.
- Explain what protected means in programming world.(Solved)
Explain what protected means in programming world.
Date posted: February 5, 2018.
- When a base class is inherited as public by the derived class, what happens to its public members?What happens to its private members? If...(Solved)
When a base class is inherited as public by the derived class, what happens to its public members?What happens to its private members? If the base is inherited as private by the derived class, what happens to its public and private members in computer programming?
Date posted: February 5, 2018.
- Why are the following two overloaded functions in C++ inherently ambiguous?
int f(int a);
int f(int &a);(Solved)
Why are the following two overloaded functions in C++ inherently ambiguous?
int f(int a);
int f(int &a);
Date posted: February 5, 2018.
- When you are assigning the address of an overloaded function to a pointer in a program,what is it that determines which version of the function...(Solved)
When you are assigning the address of an overloaded function to a pointer in a program,what is it that determines which version of the function is used?
Date posted: February 5, 2018.
- Using 4 bit numbers, for example (5)10 = ( 0101)2 Write all positive numbers and all negative numbers that can be represented....(Solved)
Using 4 bit numbers, for example (5)10 = ( 0101)2 Write all positive numbers and all negative numbers that can be represented with four bits in sign-magnitude, one’s complement, and two’s complement.
Date posted: February 4, 2018.
- What is the bool data type in programming?(Solved)
What is the bool data type in programming?
Date posted: February 3, 2018.
- How can comments be included in a C++ program?(Solved)
How can comments be included in a C++ program?
Date posted: February 3, 2018.
- Give brief descriptions of polymorphism,encapsulation, and inheritance as applied in programming.(Solved)
Give a brief descriptions of polymorphism, encapsulation, and inheritance as applied in programming.
Date posted: February 3, 2018.
- Describe importance of computers in education systems.(Solved)
Describe importance of computers in education systems.
Date posted: February 2, 2018.
- Outline three advantages of using a mouse as an input device.(Solved)
Outline three advantages of using a mouse as an input device.
Date posted: February 2, 2018.
- State THREE examples of utility softwares(Solved)
State THREE examples of utility softwares.
Date posted: January 28, 2018.
- State what technology was used to process data during the following stages of computer generations. (a)1st Generation (b)2nd Generation (c)3rd Generation (Solved)
State what technology was used to process data during the following stages of computer generations. (a)1st Generation (b)2nd Generation (c)3rd Generation
Date posted: January 28, 2018.
- The following is a java call of a method :
justDoIt(‘’oranges’’);
and the method itself:
private void justDoIt (String fruit) {
JOptionPane.showMessageDialog(null, fruit);
}
Explain what happens when the method is...(Solved)
The following is a java call of a method :
justDoIt(‘’oranges’’);
and the method itself:
private void justDoIt (String fruit) {
JOptionPane.showMessageDialog(null, fruit);
}
Explain what happens when the method is called
Date posted: January 26, 2018.
- Explain the problem in the following java calls :
drawLogo (paper , 50, ‘’10’’);
drawLogo (50, 10, paper);
drawLogo (paper, 10);
(Solved)
Explain the problem in the following java calls :
drawLogo (paper , 50, ‘’10’’);
drawLogo (50, 10, paper);
drawLogo (paper, 10);
Date posted: January 26, 2018.
- We could rewrite the drawLogo method so that it has a single parameter: the drawing area.The rewritten method could use input dialogs to obtain...(Solved)
We could rewrite the drawLogo method so that it has a single parameter: the drawing area.The rewritten method could use input dialogs to obtain the drawing position from the user.What is the drawback of this approach considering a program in java programming language?
Date posted: January 26, 2018.
- Whereabouts will the logos be drawn in the following java codes
Int a = 10;
Int b = 20;
drawLogo (paper , a, b);
drawLogo(paper, b + a, b...(Solved)
Whereabouts will the logos be drawn in the following java codes
Int a = 10;
Int b = 20;
drawLogo (paper , a, b);
drawLogo(paper, b + a, b – a);
drawLogo (paper, b + a -3, b +a -4);
Date posted: January 26, 2018.
- There are 2.54 cm in an inch.Declare a constant in java programming language named cmPerInch, with the correct value.Show how it might be used in...(Solved)
There are 2.54 cm in an inch.Declare a constant in java programming language named cmPerInch, with the correct value.Show how it might be used in a calculation to convert inches to cm.
Date posted: January 26, 2018.