Get premium membership and access questions with answers, video lessons as well as revision papers.
•?A certificate issued by a certificate authority (CA) authenticates that its possessor is who he/she claims to be.
•?To obtain a certificate, a user presents his public key to the CA. Said simply, a certificate is your public key signed by the CA’s private key.
•?CA based authentication of a user is based on the assumption that when a new user applies to the CA for a certificate, the CA can authenticate the identity of the applicant through other means.
•?At its minimum, a certificate assigned to a user consists of the user’s public key, the identifier of the key owner, a time stamp (in the form of a period of validity). The whole block encrypted with the CA’s private key. Encrypting of the block with the CA’s private key is referred to as the CA having signed the certificate.
lydiajane74 answered the question on May 13, 2018 at 23:25
- Given this class fragment,
class samp {
double *p;
public:
samp (do d) {
p = (double *) malloc(sizeof(double));
if (!p) exit (1); //allocation error
*p = d;
}
~samp() {free(p) ;}
//...
}; ...(Solved)
Given this class fragment,
class samp {
double *p;
public:
samp (do d) {
p = (double *) malloc(sizeof(double));
if (!p) exit (1); //allocation error
*p = d;
}
~samp() {free(p) ;}
//...
};
//...
samp ob1(1, ob2(0.0);
//...
ob2 = ob1;
what problem is caused by the assignment of ob1 to ob2?
Date posted: May 12, 2018. Answers (1)
- To illustrate exactly when an object is constructed and destructed when returned from a function, create a C++ class called who. Have who's constructor take...(Solved)
To illustrate exactly when an object is constructed and destructed when returned from a function, create a C++ class called who. Have who's constructor take one character argument that will be used to identify an object.Have the constructor display a message similar to this when constructing an object:
Constructing who #X
where x is the identifying character associated with each object when an object is destroyed, have a message similar to this displayed:
Destroying who #x
where, again, x is the identifying character. Finally, create a function called make_who() that returns a who object. Give each object a unique name.Note the output displayed by the program.
Date posted: May 12, 2018. Answers (1)
- other than the incorrect freeing of dynamically allocated memory, think of a situation in which it would be improper to return an object from a...(Solved)
other than the incorrect freeing of dynamically allocated memory, think of a situation in which it would be improper to return an object from a function.
Date posted: May 12, 2018. Answers (1)
- As you know, when an object is passed to a function, a copy of that object is made.Further, when that function returns, the copy's destructor...(Solved)
As you know, when an object is passed to a function, a copy of that object is made.Further, when that function returns, the copy's destructor function is called.Keeping this in mind, what is wrong with the following program?
// This program contains an error.
#include
#include
using namespace std;
class dyna {
int *p;
public:
dyna(int i);
~dyna() { free(p); cout << "freeing \n"; }
int get() { return *p; }
};
dyna::dy*) malloc(sizeof(int));
if(!p) {
cout << "Allocation failure\";
exit(1);
}
*p = i;
}
// Return negative value of *ob.p
int neg(dyna ob)
{
retur.get();
}
int main()
{
dyna 0(-10);
cout << o.get() << "\n";
cout << neg(o) << "\n";
dyna o2(20);
cout << o2.get () << "\n";
cout << neg (o2)\n";
cout << o.get () << "\n";
cout << neg (o) << "\n";
return 0;
}
Date posted: May 12, 2018. Answers (1)
- If a queue dynamically allocates memory to hold the queue, explain the reason for that occurence and state whether in such a situation it...(Solved)
If a queue dynamically allocates memory to hold the queue, explain the reason for that occurence and state whether in such a situation it is possible to block one queue from being assigned to another.
Date posted: May 12, 2018. Answers (1)
- What is wrong with the following fragment?
//This program has an error.
#include
using namespace std;
class c11 {
int i, j;
public:
c11 (it a, int b) { i =...(Solved)
What is wrong with the following fragment?
//This program has an error.
#include
using namespace std;
class c11 {
int i, j;
public:
c11 (it a, int b) { i = a; j = b; }
// ...
};
class c12 {
int i; j;
public:
c12 (int a, int b) { i = a; j = b; }
// ...
};
int main()
{
c11 x(1c12 y(0, 0);
x = y;
// ...
}
Date posted: May 12, 2018. Answers (1)
- Given the following class, show how an object called ob that passes the value 100 to a and X to c would be declared
class sample...(Solved)
Given the following class, show how an object called ob that passes the value 100 to a and X to c would be declared
class sample {
int a;
char c;
public:
sample(int x, char ch) {a = x; c = ch;}
//...
};
Date posted: May 12, 2018. Answers (1)
- Given the following base class, show how it can be inherited by a derived class called mars
class planet {
int moons;
double dist_from_sun;
double diameter;
double mass
public:
// ...
};(Solved)
Given the following base class, show how it can be inherited by a derived class called mars
class planet {
int moons;
double dist_from_sun;
double diameter;
double mass
public:
// ...
};
Date posted: May 12, 2018. Answers (1)
- Given the following class, what are the names of its constructor and destructor functions?
class widgit {
int x, y;
public :
//.....fill in constructor and destructor functions
};(Solved)
Given the following class, what are the names of its constructor and destructor functions?
class widgit {
int x, y;
public :
//.....fill in constructor and destructor functions
};
Date posted: May 12, 2018. Answers (1)
- Create a class called dice that contains one private integer variable.Create a function called roll() that uses the standard randomn number generator, rand(), to generate...(Solved)
Create a class called dice that contains one private integer variable.Create a function called roll() that uses the standard randomn number generator, rand(), to generate a number between 1 and 6. Then have roll() display that value.
Date posted: May 12, 2018. Answers (1)
- Create a class called prompt in C++ language.Pass its constructor function a prompting string of your choice.Have the constructor display the string and then input...(Solved)
Create a class called prompt in C++ language.Pass its constructor function a prompting string of your choice.Have the constructor display the string and then input an integer.Store this value in a private variable called count.When an object of type prompt is destroyed, ring the bell on the terminal as many times as the user entered.
Date posted: May 12, 2018. Answers (1)
- Is the following fragment valid?
union {
float f;
unsigned int bits;
};(Solved)
Is the following fragment valid?
union {
float f;
unsigned int bits;
};
Date posted: May 12, 2018. Answers (1)
- 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 << " " <}
int main()
{
myclass count (2, 3);
count.show();
return 0;
}
Date posted: May 12, 2018. Answers (1)
- 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<< ' '<cout << "\n";
return 0;
}
Date posted: May 12, 2018. Answers (1)
- 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. Answers (1)
- 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. Answers (1)
- 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. Answers (1)
- 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. Answers (1)
- 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. Answers (1)
- Difference between Virus and Trojan(Solved)
Difference between Virus and Trojan
Date posted: May 12, 2018. Answers (1)