Purchase Solution

Data Structures C++

Not what you're looking for?

Ask Custom Question

Suppose that a class employeeType is derived from the class personType. Give examples of data and function members that can be added to the class employeeType.

For example:
myClock yourClock
hr: 2 hr: 14
min: 26 min: 39
sec: 47 sec: 28

Consider the following statements:

class yClass
{
public:
void one();
void two(int, int);
yClass();
private:
int a;
int b;
};

class xClass : public yClass
{
public:
void one();
xClass();
private:
int z;
};

yClass y;
xClass x;

a. The private members of yClass are public members of xClass. True or False?
b. Mark the following statements as valid or invalid. If a statement is invalid, explain why.

(i)
void yClass : :one()
{
cout<<a+b<<endl;
}

(ii)
y?a = 15;
x?b = 30;

(iii)
void xClass::one()
{
a = 10;
b = 15;
z = 30;
cout<<a+b+z<<endl;
}

(iv)
cout<<y?a<<" "<<y?b<<" "<<x?z<<endl;

Purchase this Solution

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C# variables and classes

This quiz contains questions about C# classes and variables.