Get premium membership and access questions with answers, video lessons as well as revision papers.
- Modify the following program so that all member functions are automatically in-lined:
#include
using namespace std;
class myclass {
int i, j;
public:
myclass (int x, int y);
void show();
};
myclass ::...(Solved)
Modify the following program so that all member functions are automatically in-lined:
#include
using namespace std;
class myclass {
int i, j;
public:
myclass (int x, int y);
void show();
};
myclass :: myclass(int x, int y)
{
i=x;
j=y;
}
void myclass :: show()
{
cout << i << " " <
Date posted: May 12, 2018.
- What does the following program display?
#include
using namespace std;
int main()
{
int i = 10;
long 1 = 1000000;
double d = -0.0009;
cout << i << ' ' <<1<<...(Solved)
What does the following program display?
#include
using namespace std;
int main()
{
int i = 10;
long 1 = 1000000;
double d = -0.0009;
cout << i << ' ' <<1<< ' '<
Date posted: May 12, 2018.
- Create a C++ class called line that draws a line on the screen.Store the line length in a private integer variable called len.Have line's constructor...(Solved)
Create a C++ class called line that draws a line on the screen.Store the line length in a private integer variable called len.Have line's constructor take one parameter: the line length.Have the constructor store the length and actually draw the line .If the system does not support graphics, display the line by using *. Give the line a destructor that erases the line.
Date posted: May 12, 2018.
- Why might the following function not be in-lined by the computer' s compiler
void f1()
{
int i;
for(i=0; i<10; i++) cout <(Solved)
Why might the following function not be in-lined by the computer' s compiler
void f1()
{
int i;
for(i=0; i<10; i++) cout <
Date posted: May 12, 2018.
- Explain what an anonymous union is and how it differs from a normal union.(Solved)
Explain what an anonymous union is and how it differs from a normal union.
Date posted: May 12, 2018.
- Use a C++ union class to swap the low- and high-order bytes of an integer (assuming 16-bit integer; if the computer uses 32-bit integers, swap...(Solved)
Use a C++ union class to swap the low- and high-order bytes of an integer (assuming 16-bit integer; if the computer uses 32-bit integers, swap the bytes of a short int)
Date posted: May 12, 2018.
- Given the following base C++ class,
class area_cl {
public:
double height;
double width;
};
Create two derived classes called rectangle and isosceles that inherit area_cl. Have each class include a...(Solved)
Given the following base C++ class,
class area_cl {
public:
double height;
double width;
};
Create two derived classes called rectangle and isosceles that inherit area_cl. Have each class include a function called area()
that returns the area of a rectangle or isosceles triangle, as appropriate. Use parameterized constructors to initialize height and width.
Date posted: May 12, 2018.
- Difference between Virus and Trojan(Solved)
Difference between Virus and Trojan
Date posted: May 12, 2018.
- Under network security infrastructure, what do you understand by term Vulnerability (or Weakness)?(Solved)
Under network security infrastructure, what do you understand by term Vulnerability (or Weakness)?
Date posted: May 12, 2018.
- Define with explanations the following terms as used in IT security: (i) Confidentiality (ii) Integrity (iii) Availability (iv) Privacy (v) Identification (vi) Authentication (vii) Authorization (viii) Accountability(Solved)
Define with explanations the following terms as used in IT security
i) Confidentiality
ii) Integrity
iii) Availability
iv) Privacy
v) Identification
vi) Authentication
vii) Authorization
viii) Accountability
Date posted: May 12, 2018.
- Why is information security policy critical in the protection of information and keeping of information systems and data from danger? (Solved)
Why is information security policy critical in the protection of information and keeping of information systems and data from danger?
Date posted: May 12, 2018.
- There are too many situations where the ICC workflows don't produce as well as results as one would hope for and rightfully expect. What accounts...(Solved)
There are too many situations where the ICC workflows don't produce as well as results as one would hope for and rightfully expect. What accounts for these less-than-expected results?
Date posted: May 11, 2018.
- Create a class called box whose constructor function is passed three double values, each of which represents the length of one side of a box.Have...(Solved)
Create a class called box whose constructor function is passed three double values, each of which represents the length of one side of a box.Have the box class compute the volume of the box and store the result in a double variable.Include a member function called vol() that displays the volume of each box object.
Date posted: May 5, 2018.
- Create a class C++ class called t_and_d that is passed the current system time and date as a parameter to its constructor when it is...(Solved)
Create a class C++ class called t_and_d that is passed the current system time and date as a parameter to its constructor when it is created.Have the class include a member function that displays this time and date on the screen.
Date posted: May 5, 2018.
- Illustrate the change of a C++ stack so it dynamically allocates memory for the stack.Have the size of the stack specified by a parameter to...(Solved)
Illustrate the change of a C++ stack so it dynamically allocates memory for the stack.Have the size of the stack specified by a parameter to the constructor function.(Free this memory with a destructor function)
Date posted: May 5, 2018.
- Create a C++ class called stopwatch that emulates a stopwatch that keeps track of elapse time. Use a constructor to initially set the elapse time...(Solved)
Create a C++ class called stopwatch that emulates a stopwatch that keeps track of elapse time. Use a constructor to initially set the elapse time to 0.Provide two member function called start() and stop() that turns on and off the timer, respectively. Include a member function called show() that displays the elapsed time.Also, have the destructor function automatically display elapsed when stopwatch object is destroyed.
Date posted: May 5, 2018.
- Create an overload rotate() function using C++ new style that left-rotates the bits in its argument and returns the result.Overload it so it accepts ints...(Solved)
Create an overload rotate() function using C++ new style that left-rotates the bits in its argument and returns the result.Overload it so it accepts ints and longs.(A rotate is similar to a shift except that the bit shifted off one end is shifted onto the other end)
Date posted: May 5, 2018.
- Create a class in C++ language that holds name and address information.Store all the information in character strings that are private members of the class.Include...(Solved)
Create a class in C++ language that holds name and address information.Store all the information in character strings that are private members of the class.Include a public function that stores the name and address.Also include a public function that displays the name and address. (Call these functions store() and display() )
Date posted: May 5, 2018.
- Write a program that uses C++ style I/O to prompt the user for a string and then display its length.(Solved)
Write a program that uses C++ style I/O to prompt the user for a string and then display its length.
Date posted: May 5, 2018.
- Given the following new-style C++ program, show how to change it into its old-style form.#include using namespace std;into f(into a);into main(){cout << f(10);return 0;}int f(int...(Solved)
Given the following new-style C++ program, show how to change it into its old-style form.
#include
using namespace std;
into f(into a);
into main()
{
cout << f(10);
return 0;
}
int f(int a)
{
return a * 3.1416;
}
Date posted: May 5, 2018.
- Create a function in C++ language called rev_str() that reverses a string.Overload rev_str() so it can be called with either one character array or two.When...(Solved)
Create a function in C++ language called rev_str() that reverses a string.Overload rev_str() so it can be called with either one character array or two.When it is called with one string, have that one string contain the reversal.When it is called with two strings, return the reversed string in second argument.For example
char s1[80], s2[80];
strcpy (s1, "hello");
rev_str(s1, s2; //reversed string goes in s2, s1 untouched
rev_str(s1); //reversed string is returned in s1
Date posted: May 5, 2018.
- Outline four main steps in computer forensics(Solved)
Outline four main steps in computer forensics.
Date posted: May 4, 2018.
- Properties of a firewall (Solved)
Properties of a firewall
Date posted: May 4, 2018.
- Define controversial content(Solved)
Define controversial content.
Date posted: April 28, 2018.
- State the methods of verification giving examples(Solved)
State the methods of verification giving examples
Date posted: April 28, 2018.
- What is verification? (Solved)
What is verification?
Date posted: April 28, 2018.
- Why is authentication important?
(Solved)
Why is authentication important?
Date posted: April 28, 2018.
- State the examples of biometric devices (Solved)
State the examples of biometric devices
Date posted: April 28, 2018.
- What is authentication?
(Solved)
What is authentication?
Date posted: April 28, 2018.
- Why do we need privacy?
(Solved)
Why do we need privacy?
Date posted: April 28, 2018.