Find the class declaration

Assignment Help Computer Engineering
Reference no: EM1331937

Consider the class declaration

class demoClass
{
public:
// assign arguments as initial values for the data members
demoClass(int a = 5, int b = 10);
// function returns the maximum of itemA and itemB
// int max() const;
private:
int itemA, itemB;
};

(a) Give the implementation of the constructor using an initialization list.
(b) Implement the member function max() as an external function.
(c) For each of the following object declarations, give the corresponding initial values for attributes itemA and itemB:

demoClass obj1(7,9); // itemA = ________ itemB = ________
demoClass obj2(12); // itemA = ________ itemB = ________
demoClass obj3; // itemA = ________ itemB = ________

(d) What is the output from each statement, assuming the previous declarations?

cout << obj2.max(); // Output: _________
cout << obj3.max(); // Output: _________

Reference no: EM1331937

Questions Cloud

Difference between stocks and bonds : What is the difference between stocks and bonds? Which represents more risk to the company? Why?
How to change the employee class : design a program, employe_data.cpp, with the Employee class that has two employees; sets their age, yearsOfService, and salary (rounded to the nearest thousands of dollars; and prints their values.
Are you qualified for the hr mgr. role : What skills would you need to develop to be extraordinary in the job and If you would not want the job, what other role would you want in a global organization
Explain website functionality and e-marketing research : Explain website functionality and e-marketing research
Find the class declaration : utalize the member function max() as an external function.
Accident in school gym : You are responding to a basketball game at the local high school with report of multiple persons down. You are the first to arrive and notice numerous cars and two buses in the parking lot, but no sound from the gym.
Hr polices and programs : HR polices and programs - Give a potential explanation for at least two of these organizational policy decisions?
Explaining contemporary social problem : Summarize your views on how a specific contemporary social problem is having an impact on your workplace or on workplaces known to you.
Explain client-side and server-side scripting : Explain client-side and server-side scripting

Reviews

Write a Review

Computer Engineering Questions & Answers

  Design an application that finds all 4 digit numbers

make an application that finds all 4 digit numbers (those would be the numbers in the range 1000-9999) whose value is equal to the sum of each digit raised to the fourth power. MEANINGFUL output should be sent to the screen.

  How to protect your network to keep data safe

describe how to protect your network to keep data safe from loss or damage.

  Illustrate the constraint graph

Illustrate the constraint graph

  What are the advantages of using the scsi devices

What will be different about performing a hard-drive-to-tape backup with IDE devices and with SCSI devices? What are the advantages of using SCSI devices over IDE devices for the backups.

  When the user presses the start button

When the user presses the start button, a menu display of potential destinations is activated along with a message to user to choose a destination.

  Subnet mask and ip addresses

Which subnet mask would they utilize? How many IP addresses would they have per subnet?

  How to explain capacity of the queue

How to explain capacity of the queue

  Providing the summary of current event article

Current event article is based upon how an expert’s deposition helped the case at trial. Include the specification on how deposition was delivered and what was done in order to assure that it was given truthfully and concisely.

  What is csma/cd

What do you feel is the future for Token Ring? What are its advantages or disadvantages.

  What is the maximum rate

assume an 802.11b station is configured to always reserve the channel with the RTS/CTS sequence. Suppose this station suddenly wants to transmit 1,000 bytes of data, and all other stations are idle at this time.

  What are important considerations for an organization

Different types of storage devices are optimal for different situations. Explain what situations are appropriate for the following devices and explain.

  Analyzing the companys problem

Utilizing the standard content of a system request as your guide, prepare a list of the questions that Harry requires to have answered about this project.

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