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

  How to illustrate decision table to represent treatment

How to illustrate decision table to represent treatment? Create a structured English version based on the following dialogue obtained by the Systems Analyst from the client interview below.

  Explain what fields may be used as keys and indexes

select an information system in a health care organization that uses a database. The application can be simple or complex, but it must utilize a database that is part of an overall system to collect, store, process, and disseminate information.

  Create a compensation structure

Evaluates both approaches (job-based and person-based) and creates a compensation structure based on both approaches. In considering both approaches, what would the compensation structure look like for each position? Justify your recommendations w..

  How to produce a data model segment

Some mechanics are specialized in engine (EN) maintenance. Some mechanics are specialized in the airframe (AF) maintenance. Some mechanics are specialized in avionics (AV) maintenance.

  Securing the web passwords

Describe how the Web passwords can be more secure. Give examples and/or details in order to support your ideas.

  Explain examples of type of knowledge industry

Explain examples of type of knowledge industry

  Routing process

Access control is handled at the ____ layer at the time of routing process; the router consults the list of rules before forwarding the incoming packet.

  Think about a cellular system with a total bandwidth

Think about a cellular system with a total bandwidth

  What is a work breakdown structure

What is  a work breakdown structure

  Characteristics of rdbms

Explain the characteristics of the Relational Database Management System (RDBMS).

  Translation of this into a generic assembly language

A compiler for a RISC machine would introduce delay slots into this code so that the processor can employ the delayed branch mechanism.

  How many cars in every team called chevy and ford

How many cars in every team called Chevy and Ford There are eight cars in every team called Chevy and Ford. One car from each team races its opponent on drag strip.

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