The private members of yclass are public members of xclass

Assignment Help C/C++ Programming
Reference no: EM13938251

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;

Reference no: EM13938251

Questions Cloud

Prepare journal entries to record depletion : Prepare journal entries to record depletion for the 2,500,000 cubic feet of natural gas recovered and sold. Is the goodwill amortized? Explain your reasoning.
Challenges faced by digital enterprises : Demonstrate an understanding of the key drivers and challenges faced by digital enterprises that include infrastructure, business processes, social media, consumer behaviour and global markets and firms (Problem solving)
The hotel is in a resort area that is particularly busy from : The hotel is in a resort area that is particularly busy from November through February.
Calculate each fund managers average alpha : Calculate each fund manager's average "alpha" (i.e., actual return minus expected return) over the five-year holding period. Show graphically where these alpha statistics would plot on the security market line and explain whether you can conclude f..
The private members of yclass are public members of xclass : 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.
Ethical debate on our information privacy : One lives in a world where the internet plays a pinnacle role in our day to day lives. Discuss how the internet has caused an ethical debate on our information privacy
How the note and the accrued interest would appear : Indicate how the note and the accrued interest would appear in the balance sheet at December 31, 2008. Prepare the entry to record the repayment of the note on March 31, 2009.
Electrical methods of power generation : Task 1: Carry out a detailed comparison between mechanical, fluid and electrical methods of power generation for a typical aircraft usage
What, specifically, is a polyp : The surgical consult recommends a bowel resection 15 centimeters in both directions from the site of the polyp. How much (what percentage) of the entire colon would be removed in this procedure?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd